Home Linux & Systems Cybersecurity Cloud & DevOps Networks & Infrastructure SIEM & Monitoring DFIR & Threat Intel Development & Other All categories Projects About Tools

Install NVIDIA graphics in Debian

Leer en espanol
Install NVIDIA graphics in Debian

Table of contents

1. Introduction 2. Installation 2.1. Free driver “nv” 2.2. “Nouveau” free driver 23. Proprietary “nvidia” driver 23.1. Using module-assistant 23.2. Using the nVidia installer (.run) ===

Index

1. Introduction

2. Installation

2.1. Free driver “nv”
2.2. “Nouveau” free driver
23. Proprietary “nvidia” driver
2.3.1. Using module-assistant
2.3.2. Using the nVidia installer (.run)

3. Xorg configuration

4. Uninstall

4.1. free drivers
4.2. Proprietary driver
4.2.1. Installed using module-assistant
4.2.2. Installed using the nVidia installer (.run)

5. Common problems

nVidia certainly offers drivers of acceptable quality for its graphics cards, but there are also free alternatives achieved through reverse engineering and a lot of effort on the part of the community.

Free drivers such as 'nv' or 'nouveau' have 2D acceleration capacity, and 'nouveau' also has some 3D acceleration capacity. These are sufficient if desktop effects or the use of 3D applications, such as games or modeling programs, are not required.

If you need 3D acceleration, and as long as 'nouveau' does not reach acceptable stability, the only option is to use the proprietary drivers. For this, Debian can make the task easier for us or we can go to the official nVidia installer.

This article tries to explain the installation, configuration and uninstallation of all the drivers.

In the standard Debian installation, this is the driver that will be installed if your graphics card is nvidia, so this guide (at the moment) does not explain its installation.

IMPORTANT NOTE: All the packaging (presumably, what will go into Squeeze) is already available in the Sid branch, both the DRM part (kernel 2.6.32-4 (note the 4) as the X part.

The new free driver, which inherits the 2D acceleration of the 'nv' driver and implements 3D acceleration by reverse engineering the proprietary driver, is currently available in the experimental branch.

To install it, you must take into account the following:

  • It is advisable to install it from sid (unstable), or know how to deal with dependencies on various branches (pinning).
  • The driver as such is not yet stable, 3D (and even 2D) acceleration is not fully functional for all cards.
  • The driver as provided by the Debian package does not have 3D acceleration capability (at the request of the nouveau developers). If you want to have support for 3D acceleration (completely experimental, and only works on some cards), go to the nouveau site, which explains how to compile drivers with Gallium3D support.

Facility:
The "nvidia-glx" package conflicts with the 'nouveau' package, so it is advisable not to use the proprietary driver (installed with m-a) while installing the 'nouveau' driver, either by installing from a tty, or from the graphics server using a driver such as 'nv' or 'vesa'.

Likewise, if it is necessary to update xorg, it is advisable to do so and check that the new version is working properly before installing 'nouveau'.

Installation steps:

  • Add the sid repository to the sources.list.
  • Update package list
text
# aptitude update
  • Install the latest available kernel from that branch (nouveau available from 2.6.32-4) and the Xorg part
text
# aptitude install linux-image-2.6.32-4-686 (alternativamente -amd64 o la arquitectura que estés usando).

# aptitude install xserver-xorg-video-nouveau
  • Add to /etc/initramfs-tools/modules “nouveau modeset=1”
  • Edit xorg.conf and replace the current driver ('nv', 'vesa' or 'nvidia') with 'nouveau' (and eliminate options from other drivers). This step is very important. By default (and despite having the kernel modesetting activated) the X will try to boot with the "nv" driver and the machine will remain practically blocked (although it responds to a REISUB).
  • Reboot the system or load the module “modprobe nouveau modeset=1” and restart the X

Note: If you have had the proprietary driver installed, it will be necessary to download the 'nvidia' module before starting xorg with the new driver.

General installation method
First make sure you have the non-free section of our repositories activated.

Then, installing Nvidia's proprietary drivers in Debian using module-assistant is as simple as doing the following:

text
# aptitude install module-assistant

# m-a prepare

# m-a a-i nvidia

Please refer to the module-assistant manual in console to see the available options, especially if you use the "purge" option, run to do so:

text
#man m-a

Check the error messages first since most likely you will not be able to install it because there was previously an erroneous compilation or "remnants" of a bad installation. If it is not installed for this reason, execute:

text
#m-a clean nvidia

Go back to step “2.3.1” to try again or continue with the next method:

text
# m-a a-i nvidia-kernel-source

Then, to make sure we have everything up to date:

text
# aptitude install nvidia-glx

At this point, if everything has gone well, all that remains is to edit the xorg.conf so that we use the driver:
In the "Device" section the 'nvidia' driver must be specified:

text
Section	«Device»

…

…

Driver          «nvidia»

…

EndSection

What advantages does this method have over nvidia's .run?

Everything will be much more integrated into Debian, and uninstalling these drivers will be much easier (aptitude purges whatever_packages_were).

Special cases in the different branches of Debian

The complete drivers are not available in Lenny. In Etch I seem to remember yes, and in Sid too (of course, in the non-free branches). This is easy to see if using the lenny repositories we do:

text
# apt-cache search nvidia
cpufreqd - fully configurable daemon for dynamic frequency and voltage scaling

dmraid - Device-Mapper Software RAID support tool

nvclock - Allows you to overclock your nVidia card under GNU/Linux

nvclock-gtk - Allows you to overclock your nVidia card under GNU/Linux

nvclock-qt - Allows you to overclock your nVidia card under GNU/Linux

nvidia-xconfig - The NVIDIA X Configuration Tool

nvtv - tool to control TV chips on NVidia cards under Linux

sensors-applet - Display readings from hardware sensors in your Gnome panel

trigger - free 3D rally racing car game

trigger-data - free 3D rally racing car game - data files

xserver-xorg-video-nv - X.Org X server -- NV display driver

nvidia-cg-toolkit - NVIDIA Cg Toolkit Installer

nvidia-kernel-common - NVIDIA binary kernel module common files

nvidia-settings - Tool of configuring the NVIDIA graphics driver

python-cg - nVidia Cg driver binding for Python
Que paquetes (básicos) nos faltan:

nvidia-glx (o nvidia-glx-legacy-loquesea)

nvidia-kernel-source
Así, metemos los repositorios de sid:

deb http://ftp.fr.debian.org/debian sid non-free
# apt-cache search nvidia
cpufreqd - fully configurable daemon for dynamic frequency and voltage scaling

dmraid - Device-Mapper Software RAID support tool

nvclock - Allows you to overclock your nVidia card under GNU/Linux

nvclock-gtk - Allows you to overclock your nVidia card under GNU/Linux

nvclock-qt - Allows you to overclock your nVidia card under GNU/Linux

nvidia-xconfig - The NVIDIA X Configuration Tool

nvtv - tool to control TV chips on NVidia cards under Linux

sensors-applet - Display readings from hardware sensors in your Gnome panel

trigger - free 3D rally racing car game

trigger-data - free 3D rally racing car game - data files

xserver-xorg-video-nv - X.Org X server -- NV display driver

nvidia-cg-toolkit - NVIDIA Cg Toolkit Installer

nvidia-kernel-common - NVIDIA binary kernel module common files

nvidia-settings - Tool of configuring the NVIDIA graphics driver

python-cg - nVidia Cg driver binding for Python

nvidia-glx - NVIDIA binary Xorg driver

nvidia-glx-dev - NVIDIA binary Xorg driver development files

nvidia-glx-legacy-71xx - NVIDIA binary Xorg driver (71xx legacy version)

nvidia-glx-legacy-71xx-dev - NVIDIA binary Xorg driver development files

nvidia-glx-legacy-96xx - NVIDIA binary Xorg driver (96xx legacy version)

nvidia-glx-legacy-96xx-dev - NVIDIA Xorg driver development files (96xx legacy version)

nvidia-kernel-2.6-486 - NVIDIA binary kernel module for 2.6 series compiled for 486

nvidia-kernel-2.6-686 - NVIDIA binary kernel module for 2.6 series compiled for 686

nvidia-kernel-2.6-k7 - NVIDIA binary kernel module for 2.6 series compiled for k7

nvidia-kernel-2.6.18-4-486 - NVIDIA binary kernel module for Linux 2.6.18-4-486

nvidia-kernel-2.6.18-4-686 - NVIDIA binary kernel module for Linux 2.6.18-4-686

nvidia-kernel-2.6.18-4-k7 - NVIDIA binary kernel module for Linux 2.6.18-4-k7

nvidia-kernel-legacy-2.6-486 - NVIDIA binary kernel module for 2.6 series compiled for 486

nvidia-kernel-legacy-2.6-686 - NVIDIA binary kernel module for 2.6 series compiled for 686

nvidia-kernel-legacy-2.6-k7 - NVIDIA binary kernel module for 2.6 series compiled for k7

nvidia-kernel-legacy-2.6.18-4-486 - NVIDIA binary kernel module for Linux 2.6.18-4-486 (legacy version)

nvidia-kernel-legacy-2.6.18-4-686 - NVIDIA binary kernel module for Linux 2.6.18-4-686 (legacy version)

nvidia-kernel-legacy-2.6.18-4-k7 - NVIDIA binary kernel module for Linux 2.6.18-4-k7 (legacy version)

nvidia-kernel-legacy-71xx-2.6-686 - NVIDIA binary kernel module for 2.6 series compiled for 686

nvidia-kernel-legacy-71xx-2.6-k7 - NVIDIA binary kernel module for 2.6 series compiled for k7

nvidia-kernel-legacy-71xx-2.6.18-4-686 - NVIDIA binary kernel module for Linux 2.6.18-4-686 (legacy version)

nvidia-kernel-legacy-71xx-2.6.18-4-k7 - NVIDIA binary kernel module for Linux 2.6.18-4-k7 (legacy version)

nvidia-kernel-legacy-71xx-source - NVIDIA binary kernel module source (71xx legacy version)

nvidia-kernel-legacy-96xx-2.6-686 - NVIDIA binary kernel module for 2.6 series compiled for 686

nvidia-kernel-legacy-96xx-2.6-k7 - NVIDIA binary kernel module for 2.6 series compiled for k7

nvidia-kernel-legacy-96xx-2.6.18-4-686 - NVIDIA binary kernel module for Linux 2.6.18-4-686 (legacy version)

nvidia-kernel-legacy-96xx-2.6.18-4-k7 - NVIDIA binary kernel module for Linux 2.6.18-4-k7 (legacy version)

nvidia-kernel-legacy-96xx-source - NVIDIA binary kernel module source (96xx legacy version)

nvidia-kernel-source - NVIDIA binary kernel module source

Now we can install the drivers using module-assistant.

To get the driver we must go to the following URL HERE

Facility:

– We enter a terminal (CTRL+ALT+F1) and log in as root:

text
$su root

– We deactivate the X:

Depending on what you use, you will have to execute:
GDM: #/etc/init.d/gdm stop
KDM: #/etc/init.d/kdm stop
XDM: #/etc/init.d/xdm stop

Alternatively, you can switch to single-user mode with:

text
#init 1

– We verify the version of our installed Kernel:

text
#uname -r

either

text
#uname -a

And we write down the result to use it in the next step.

– We add the following components to the installation of our system:

Bash
apt-get install linux-headers-«aqui colocamos la versión que nos aparecio al hacer uname -r» gcc make

Example for version "2.6.25-2-486" of the kernel (this may vary depending on the result of the previous step):

text
#apt-get install linux-headers-2.6.25-2-486 gcc make

– We install the driver; We go to the place where we have downloaded it and write:

text
#sh NVIDIA-Linux-x86-173.14.12-pkg1.run

The screens that will appear later are simple dialog boxes in English, I suggest you translate them and make a decision (it is not difficult at all).

In the part that tells us about type of compiler that we are using (gcc) and that is perhaps not the same one that we have installed, we just give it aNO and we continue with our installation.

The installer will ask us almost at the end if we want it to auto configure the "xorg.conf" file, so we tell it YEAH.

Note: Let's read the dialog boxes carefully..!!

To finish, we restart the X. Depending on what you use, you will execute:

GDM: /etc/init.d/gdm restart
KDM: /etc/init.d/kdm restart
XDM: /etc/init.d/xdm restart

If you switched to single-user mode:

text
#init 2 && startx

– Finally, we verify that everything is going well: perhaps our keyboard language has changed, but we restore that by copying or modifying the section corresponding to the keyboard and that we have saved in our backup of the xorg.conf.old files)

Section «ServerLayout»
Identifier    “Layout0”
Screen      0 “Screen0”
InputDevice    <strong>»Generic Keyboard»</strong> «CoreKeyboard»
InputDevice    «Mouse0» «CorePointer»
EndSection

Those highlighted in black must be written the same, otherwise it would throw an error (it's simple, just caution)

text
Section «InputDevice»

Identifier	<strong>»Generic Keyboard»</strong>

Driver	 «kbd»

Option	 «XkbRules»	«xorg»

Option	 «XkbModel»	«pc105»

Option	 «XkbLayout»	«latam»

EndSection

In this manual, for the moment, the xorg configuration was explained above in the corresponding section of the chapter .

As simple as writing in the console (as root):

# aptitude purge nvidia

As simple as writing in the console (as root):

text
# nvidia-uninstall

And it does everything automagically.

Fountain: Instalar graficas nvidia en debian

Comments