Nvidia Graphics Drivers

Nvidia Graphics Drivers

Identification

We can usually be identified installed video card using the lspci command. For example:

$ lspci -nn | egrep -i "3d|display|vga"
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation G80 [GeForce 8800 GTS] [10de:0193] (rev a2)

Installation

Debian 9 “Stretch”

1. Add “contrib” and “non-free” components to /etc/apt/sources.list, for example:

deb http://httpredir.debian.org/debian/ stretch main contrib non-free

2. Update the list of available packages. Install the appropriate linux-headers and kernel module packages:

 aptitude update
 aptitude -r install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') nvidia-driver

This will install the NVIDIA-driver package. DKMS will build the NVIDIA module for your system, via the NVIDIA-kernel-dkms package.

3. Create a Xorg server configuration file.
4. Restart your system to enable the nouveau blacklist
5. To allow a higher resolution.

Resolution 1920×1080

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       30.0 - 80.0
    VertRefresh     55.0 - 75.0
    DisplaySize     400 225
    Modeline       "1920x1080_60.00"  172.80  1920 2040 2248 2576  1080 1081 1084 1118  -HSync +Vsync
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    BusID          "PCI:1:0:0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Viewport    0 0
        Depth       24
        Modes      "1920x1080_60.00"
    EndSubSection
EndSection

Resolution 1920×1080