Nvidia Driver Install - The Debian/Nvidia way

From MEPIS Documentation Wiki

Jump to: navigation, search


Installing Nivida Graphics Drivers - Manually

Although the MEPIS X-Windows Assistant offers an easy way to install Nvidia drivers, sometimes it is necessary to have to install them manually, for example - when you are running a different kernel version to the standard Mepis one, or you want the latest and greatest from nvidia or you are having problems getting the Debian one to run.
  • Note - if you have previously installed Nvidia drivers either using the Mepis X Assistant, Synaptic or apt-get, it is important to remove them completely beforehand:
In Synaptic - choose to 'completely remove' all nvidia packages installed.
  • If you re-boot after removing the Nvidia drivers - make sure you edit your /etc/X11/xorg.conf file to use the 'vesa' drivers first, or you will have no Xserver once re-booted. Alternatively you can use the Mepis X Assistant from a live CD session to restore the X config.

The Debian Way

This how-to is based on info from Debian wiki - Nvidia install page To use this method you will need:

  • An nvidia graphics card - supported by the version of the driver you wish to use
  • The kernel headers of the kernel you have installed and want to be using with the nvidia drivers
  • nvidia-kernel-common
  • nvidia-glx
  • module-assistant
apt-get install module-assistant nvidia-kernel-common
m-a a-i nvidia
apt-get install nvidia-glx

And it's done - you will need to edit your /etc/X11/xorg.conf to use the new drivers (see instructions below).

Note- the module-assistant method is subject to package dependencies - it may be necessary to find a workaround in order to install the correct versions of the kernel-headers - depending on which kernel you are using. If you have upgraded your system to a newer release of Debian (i.e. to unstable or testing) - you will have problems as the module-assistant uses the gcc compiler, and this has to be the same version that was used to compile the kernel you are currently using.

The Nvidia Way

If you need the very latest Nvidia driver available, fetch them from the Nvidia drivers portal:


and save them in a directory of your choice (~/ or ~/Desktop/ usually)

You will also need to install the kernel headers for the kernel you are currently using:

apt-get install linux-headers-$(uname -r)

will install the correct kernel headers for you using the string: $ uname -r

stop X and KDE (as root from command line):

telinit 3

which takes you out of X and to a command line login prompt. Log in as root then change to the directory where you saved the Nvidia binary installer file:

cd /home/youruserhomefolder/

Now start the installer

sh NVI

Hit the <Tab> key to auto-complete the long file name (if it doesn't work - check you are in the correct location - i.e. the file is in this working directory:


will list all files and folders in the current directory.

Hit return and follow the instructions as the installer prompts you. (The installer uses the Ncurses interface - use <Tab> to navigate selections.)

Choose to not search the ftp server for a pre compiled driver (it won't find one) and then choose to compile the driver. All being well (sometimes the installer can't find the kernel-headers and fails) your driver will then be compiled and installed.

All that is left is to edit the /etc/X11/xorg.conf file to use the new driver. The Nvidia installer will do this for you (using nvidia-xconfig) backing up your existing version of xorg.conf. You may prefer to edit the file manually yourself to change the two instances of "nv" (or perhaps "vesa") to read "nvidia". It is no longer necessary to hash (#) out the Load "dri" and Load "GLCore" lines - xorg will ignore what it can't use, but make sure 'Load "GLX"' is in the Module section.

cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup

to backup the existing xorg.conf

nano /etc/X11/xorg.conf

will open the file in nano for editing from the command line. Use <Ctrl>+o to save (hit return to confirm file name+location) <Ctrl>+x to quit. Save the file and re-boot:


to fire up your shiny new Nvidia powered Xserver!


Personal tools
In other languages