Cannot install nvidia driver for ubuntu 14.04
First of all I suggest removing all nvidia drivers.
sudo apt-get purge nvidia*
For Ubuntu 14.04 the default and preferred driver is nvidia-331.
It can be installed by
sudo apt-get install nvidia-331
As an option you can upgrade kernel and install newer drivers.
Upgrade kernel to 3.19
sudo apt-get install linux-generic-lts-vivid
reboot
Then install nvidia-346 from xorg-edgers
sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-346 nvidia-prime nvidia-settings
sudo add-apt-repository -r ppa:xorg-edgers/ppa
Look for errors when install. In most cases the driver works well, but it depends on graphical stack version installed, your integrated adapter model, etc.
If the driver does not work and graphics does not start, press Ctrl+Alt+F1, login to console and run
sudo apt-get purge nvidia*
Related videos on Youtube
Jame
Updated on September 18, 2022Comments
-
Jame over 1 year
I am using Ubuntu 14.04 (64 bit) with kernel version is 3.16.0-40-generic. And my nvidia is
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK107M [GeForce GT 650M] [10de:0fd1] (rev a1) (prog-if 00 [VGA controller]) Subsystem: Samsung Electronics Co Ltd Device [144d:c0d1] Flags: bus master, fast devsel, latency 0, IRQ 16 Memory at f6000000 (32-bit, non-prefetchable) [size=16M] Memory at e0000000 (64-bit, prefetchable) [size=256M] Memory at f0000000 (64-bit, prefetchable) [size=32M] I/O ports at e000 [size=128] Expansion ROM at f7000000 [disabled] [size=512K] Capabilities: <access denied> Kernel driver in use: nvidia
That mean it is GeForce GT 650M. Hence, I went to nvidia search to check which nvidia is good for my laptop. I found version 346.72. However, when I install it. I cannot log-in my computer. It allway repeat log-in screen when I login. I need to uninstall it. Then it can log-in again. What is my problem? How to resolve it? I also tried do with other method such as
$ sudo add-apt-repository ppa:xorg-edgers/ppa -y $ sudo apt-get update # install the latest version $ sudo apt-get install nvidia-current
But it shown that (Note that I install 304 version before but I uninstall it)
nvidia-current is already the newest version. You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: cuda-drivers : Depends: nvidia-340 (>= 340.29) but it is not going to be installed Depends: nvidia-340-dev (>= 340.29) but it is not going to be installed Depends: nvidia-modprobe (>= 340.29) but it is not going to be installed Depends: libcuda1-340 (>= 340.29) but it is not going to be installed Depends: nvidia-libopencl1-340 (>= 340.29) but it is not going to be installed Depends: nvidia-opencl-icd-340 (>= 340.29) but it is not going to be installed nvidia-340-uvm : Depends: nvidia-340 (>= 340.29) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Update error: When i tried to uninstall current nvidia and install new nvidia 331 version it shown as
Error! Bad return status for module build on kernel: 3.19.0-20-generic (x86_64) Consult /var/lib/dkms/nvidia-331/331.113/build/make.log for more information. Setting up nvidia-331-uvm (331.113-0ubuntu1~xedgers14.04.1) ... Loading new nvidia-331-uvm-331.113 DKMS files... First Installation: checking all kernels... Building only for 3.19.0-20-generic Building for architecture x86_64 Building initial module for 3.19.0-20-generic Error! Bad return status for module build on kernel: 3.19.0-20-generic (x86_64) Consult /var/lib/dkms/nvidia-331-uvm/331.113/build/make.log for more information. Setting up nvidia-opencl-icd-331 (331.113-0ubuntu1~xedgers14.04.1) ... Setting up nvidia-prime (0.6.2) ... nvidia-prime start/running, process 13152 Setting up nvidia-settings (352.09-0ubuntu0~xedgers14.04.1) ... Processing triggers for libc-bin (2.19-0ubuntu6.6) ... Processing triggers for ureadahead (0.100.0-16) ...
After remove all nvidia, I typing sudo ubuntu-drivers devices it shown
~# sudo ubuntu-drivers devices == /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 == modalias : pci:v000010DEd00000FD1sv0000144Dsd0000C0D1bc03sc00i00 model : GK107M [GeForce GT 650M] vendor : NVIDIA Corporation driver : nvidia-349 - third-party free driver : nvidia-352 - third-party free recommended driver : nvidia-331 - third-party free driver : nvidia-340 - third-party free driver : nvidia-346 - third-party free driver : xserver-xorg-video-nouveau - distro free builtin driver : nvidia-331-updates - distro non-free driver : nvidia-304-updates - distro non-free driver : nvidia-304 - third-party free
After reinstall ubuntu, I based on the suggest of Plo.. I think I install successfull by checking
$lspci -knn | egrep 'VGA|3D' -A2 or Graphics Controller [8086:0166] (rev 09) Subsystem: Samsung Electronics Co Ltd Device [144d:c0d1] Kernel driver in use: i915 -- 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK107M [GeForce GT 650M] [10de:0fd1] (rev a1) Subsystem: Samsung Electronics Co Ltd Device [144d:c0d1] Kernel driver in use: nvidia
-
Jame almost 9 yearsHow to remove 316 kernel by terminal? And version of nvidia is 331 or 346? Thanks
-
Pilot6 almost 9 yearsYou do not need to remove kernel. You can boot to any installed kernel using grub menu. So boot with 3.16 and install 331 driver, that is default in ubuntu. Check if it works. What is grub menu and how to get there you can find by using search.
-
Jame almost 9 yearsOf course, I choose newest kernel. I removed all nvidia kernel by your command. But when I typing sudo ubuntu-drivers devices it show as in updated question. That mean it does not remove succesfull, Right?
-
Pilot6 almost 9 yearsMy command does not remove kernel. It removes driver. It seems that you do not understand my posts. Do you see difference between kernel and driver? If not, I suggest re-installing the system from scratch and trying to install default nvidia-331 and do not touch kernel at all.
-
Jame almost 9 yearsSorry. It is driver. I missing typing
-
Jame almost 9 yearsSir, could you tell me version 331 or 346 is good for me?
-
Pilot6 almost 9 yearsThe one that works is good for you. Both work for ME. Does any work for you?
-
Jame almost 9 yearsThank. I reinstall ubuntu and it work now. When I check, nvidia 331 is installed. How to know it is install successful?
-
Pilot6 almost 9 yearsRun
lspci -knn | grep VGA -A2
, if it shows "Kernel driver in use: nvidia", then it is OK. -
Jame almost 9 yearsGood job. It show as Kernel driver in use: i915 Thanks so much
-
Pilot6 almost 9 yearsi915 is for Intel. Post full output of
lspci -knn | egrep 'VGA|3D' -A2
-
Pilot6 almost 9 yearsNow it looks good
-
Jame almost 9 yearsThanks for your help. I cannot upvote your answer because I have no score
-
Pilot6 almost 9 yearsPlease do not add [solved] to question titles. I removed it.
-
-
Jame almost 9 yearsThank Pilot6. I tried with first command to remove nvidia in Ctrl+Alt+F1 but it shown as link dropbox.com/s/o07xy9isag8w56k/log?dl=0
-
Pilot6 almost 9 yearsSo run
sudo apt-get install -f
-
Jame almost 9 yearsThanks. I followed your steps by step but when I login, the screen is black. I must goto Ctrl+Alt+F1 to remove all drive and it can login again. I upgrade my linux kernel to 3.19
-
Pilot6 almost 9 yearsDo not install nvidia-current. It is for old adapters. You can install either a default nvidia-331, or nvidia-346 from the ppa.
-
Jame almost 9 yearsYes. I just debug. Because when I install newest version of nvidia. I cannot login. However, when i type ...nvidia-current. It install 304 version and i can login. I upgrade my linux version to 3.19.0-20-generic
-
Pilot6 almost 9 yearsTry to remove nvidia-current and install nvidia-331.