I recently wanted to install my older Dell computer that has a NVIDIA GeForce GT640 graphics card but ran into some trouble so I thought I might just share it here.
First off, find out what graphics card you have.
lspci | grep -i vga
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09) 01:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GT 640 OEM] (rev a1)
Then go to NVIDIA’s website and download the correct drivers.
I downloaded the 343.22 driver for Linux x64 (downloads the file: NVIDIA-Linux-x86_64-343.13.run).
Make sure you have the required packages that the installation requires.
sudo apt-get install make gcc linux-headers-`uname -r`
Now give the downloaded installer (NVIDIA-Linux-x86_64-343.13.run) executable permission and run it.
Make sure that you have closed any X sessions you might have, else the installer will fail and give you an error message.
sudo chmod +x NVIDIA-Linux-x86_64-343.13.run sudo ./NVIDIA-Linux-x86_64-343.13.run
You will get a warning from the installer if your GCC version is different from the one that compiled the kernel, it will usually work fine compiling the NVIDIA driver anyway but if you want to make sure that it’s done completely correct set the CC export variable to the GCC version that compiled your kernel.
Walk through the installation, I said yes to installing ia32/32bit libraries too.
The last step will ask you if you want to run nvidia-xconfig in order to generate the /etc/X11/xorg.conf configuration for the NVIDIA card, I said yes.
Up to this point all worked OK.
I made sure that the driver was loaded and was just about to start X when I got problem.
sudo lsmod | grep -i nvidia
nvidia 11053965 39 drm 236561 4 i915,drm_kms_helper,nvidia i2c_core 28324 6 drm,i915,i2c_i801,drm_kms_helper,i2c_algo_bit,nvidia
[ 83255.555] (EE) No devices detected. [ 83255.555] (EE) Fatal server error: [ 83255.555] (EE) no screens found(EE)
You can confirm that it was indeed loading the NVIDIA driver.
[ 83255.542] (II) LoadModule: "glx" [ 83255.542] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so [ 83255.554] (II) Module glx: vendor="NVIDIA Corporation" [ 83255.554] compiled for 4.0.2, module version = 1.0.0 [ 83255.554] Module class: X.Org Server Extension [ 83255.554] (II) NVIDIA GLX Module 343.13 Thu Jul 31 18:36:09 PDT 2014 [ 83255.554] (II) LoadModule: "nvidia" [ 83255.554] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so [ 83255.554] (II) Module nvidia: vendor="NVIDIA Corporation" [ 83255.554] compiled for 4.0.2, module version = 1.0.0 [ 83255.554] Module class: X.Org Video Driver [ 83255.554] (II) NVIDIA dlloader X Driver 343.13 Thu Jul 31 18:16:01 PDT 2014 [ 83255.554] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
I dont care! How did you resolve it?
What I did was setting the BusID in the xorg.conf configuration.
Section "Device" Identifier "Device0" Driver "nvidia" VendorName "NVIDIA Corporation" BusID "PCI:01:00:0" EndSection
The BusID is the ID you see when running lspci.
01:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GT 640 OEM] (rev a1)
My complete xorg.conf configuration looks like this, I have only changed the BusID nothing else, all other configuration is generated by the nvidia-xconfig command.
# nvidia-xconfig: X configuration file generated by nvidia-xconfig # nvidia-xconfig: version 343.13 (buildmeister@swio-display-x64-rhel04-10) Thu Jul 31 19:30:08 PDT 2014 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 28.0 - 33.0 VertRefresh 43.0 - 72.0 Option "DPMS" EndSection Section "Device" Identifier "Device0" Driver "nvidia" VendorName "NVIDIA Corporation" BusID "PCI:01:00:0" EndSection Section "Screen" Identifier "Screen0" Device "Device0" Monitor "Monitor0" DefaultDepth 24 SubSection "Display" Depth 24 EndSubSection EndSection
If this still does not resolve your problem, then try to block the Nouveau driver if your NVIDIA installation didn’t do this for you.
blacklist vga16fb blacklist nouveau blacklist rivafb blacklist nvidiafb blacklist rivatv
The easiest way to make sure the driver get’s blocked is to restart the computer.
I hope this helped you.