Recently I got CUDA upgraded to version 9.2 and nvidia driver to nvidia-396 with a regular auto-update on my Ubuntu 16.04 Optimus-enabled laptop, with Intel video adapter active by default and NVidia accessed via bumblebee. Shortly after, I've tried to run a CUDA apllication (using optirun <command>
), and found it doesn't work.
First thing I did was replacing all the entries of "nvidia-390" (if I remember right it was 390) in /etc/bumblebee/bumblebee.conf
to "nvidia-396" - this helped me before more than once.
Still doesn't work (Cannot access secondary GPU - error: Could not load GPU driver
). dmesg
, and there is a reason:
[ 314.733284] NVRM: The NVIDIA GeForce GT 520M GPU installed in this system is
NVRM: supported through the NVIDIA 390.xx Legacy drivers. Please
NVRM: visit http://www.nvidia.com/object/unix.html for more
NVRM: information. The 396.26 NVIDIA driver will ignore
NVRM: this GPU. Continuing probe...
Yes, my laptop is quite old, but with SSD and 12 Gb RAM I still don't feel much need to replace it. OK, looks like then I must live with nvidia-390:
sudo apt install nvidia-390
Was told that a lot of dependent packages will be uninstalled, including, it seems, all of CUDA 9.2. Damn. So likely I'm stuck with CUDA 9.0 as well. So, after uninstalling everything (and checkin in synaptic no packages from nvidia-396 or cuda-9.2 are left) I've tried to get it back:
sudo dpkg -i cuda-repo-ubuntu1604_9.0.176-1_amd64.deb
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
sudo apt-get update
sudo apt-get install cuda
Three commands ok, but the last one... Houston, we have a problem!
$ sudo apt install cuda
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package cuda
I've tried the solution from an answer on this Installing CUDA 8 on Ubuntu 16: Unable to locate package cuda question, that is:
dpkg -l | grep '^rc' | awk '{print $2}' | sudo xargs dpkg --purge
It did clean indeed lots of stuff, including some from cuda-9.2 related packages. However, the problem is still there - I can't install CUDA again, no matter I'm trying 9.0 or another version.
Any ideas?