Robert pointed me to the solution which I'll describe in detail here. So if you've got an older GPU and have problems with installing drivers from a distribution package, here's the way to install from the runfile.
1. Cleanup previously installed clutter
sudo apt-get remove --purge nvidia*
sudo apt-get remove --purge cuda*
sudo apt autoremove
This will remove any previously installed packages associated with nvidia / cuda. According to this thread (askubuntu) ubuntu-desktop has a dependency on nvidia-common
, so re-install with sudo apt-get install ubuntu-desktop
. This is not the case for Xubuntu 16.04
2. Download the runfile driver
Which can be found here: https://developer.nvidia.com/cuda-80-ga2-download-archive. Be sure to choose installer type "runfile".
In my case this is cuda_8.0.61_375.26_linux.run
, CUDA 8 with the compatible driver version 375.26, as Robert pointed out.
3. Pre-installation instructions (for (x)ubuntu)
The NVidia : 2. Pre-installation Actions tell you to make sure that you have
- a CUDA-capable GPU via
lspci | grep -i nvidia
.
- a compatible distro
uname -m && cat /etc/*release
- gcc installed
gcc --version
- compatible kernel headers
sudo apt-get install linux-headers-$(uname -r)
The NVidia : 4. Runfile Installation comes a bit short IMO, especially for Linux noobs like me. So here's the details:
4. Disable nouveau drivers
edit / create /etc/modprobe.d/blacklist-nouveau.conf
with following content:
blacklist nouveau
options nouveau modeset=0
sudo update-initramfs -u
to build the new kernel.
This did it for me. The solution described here (askubuntu) is more comprehensive in case you encounter problems.
5. Reboot in command line
There are probably different methods for that. I did it by modifying grub. Edit /etc/default/grub
. Add / change these two keys (after backing up your existing grub file):
GRUB_CMDLINE_LINUX="nomodeset"
GRUB_CMDLINE_LINUX_DEFAULT="quiet 3"
sudo update-grub
and then reboot. If anything should fail booting in recovery mode will still work. Then you could undo your changes to grub.
6. Installing NVidia drivers + CUDA Toolkit
You should boot to the console now. First check that nouveau is really disabled via
lspci -nnk | grep -iA2 vga
.
There is sth. like kernel driver in use: *****
which shouldn't read nouveau.
Now cd
to the path where you initially downloaded the runfile and:
sudo sh cuda_8.0.61_375.26_linux.run
Afterwards recover your previous grub setup and reboot. You should have a working NVidia installation, and the pygpu test shouldn't fail anymore (at least not because of the wrong CUDA version)
7. Post-installation Actions
That should be the essentials. Let me know if it helped someone and I didn't only write it down for myself ^_^
apt-get install nvidia-375
install 384 anyways. Then I downloaded the driver from nvidia.com/Download/Find.aspx, rebooted w/o Xserver, installed it regardless of error "The distribution-provided pre-install script failed". After that, nvidia-smi didn't find a driver. So I installed CUDA Toolkit 8 again and ended up with driver version 384, with the same problem :-/ – ascripter