Switching between nvdia driver versions on 16.04
Sophia Terry
I am currently running propriety nvidia drivers 361.42 on Ubuntu 16.04
$ dmesg | grep -i nvid
[ 4.233238] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 361.42 Tue Mar 22 18:10:58 PDT 2016The card itself is a GTX-960
01:00.0 VGA compatible controller: NVIDIA Corporation GM206 [GeForce GTX 960] (rev a1) (prog-if 00 [VGA controller]) Subsystem: Gigabyte Technology Co., Ltd GM206 [GeForce GTX 960] Flags: bus master, fast devsel, latency 0, IRQ 127 Memory at de000000 (32-bit, non-prefetchable) [size=16M] Memory at c0000000 (64-bit, prefetchable) [size=256M] Memory at d0000000 (64-bit, prefetchable) [size=32M] I/O ports at e000 [size=128] [virtual] Expansion ROM at df000000 [disabled] [size=512K] Capabilities: <access denied> Kernel driver in use: nvidia Kernel modules: nvidiafb, nouveau, nvidia_361Unfortunately, a piece of software I am using claims a bug in the driver causes its software to crash and I have been asked to downgrade the driver to 352.79.
It does not simply want to apt-get install this version, however:
damien@damien-desktop:~$ sudo apt-get install nvidia-352
[sudo] password for damien:
Reading package lists... Done
Building dependency tree
Reading state information... Done
nvidia-352 is already the newest version (361.42-0ubuntu2).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
damien@damien-desktop:~$ sudo apt-get install nvidia-352-updates
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed: nvidia-352-updates
0 to upgrade, 1 to newly install, 0 to remove and 0 not to upgrade.
Need to get 4,814 B of archives.
After this operation, 17.4 kB of additional disk space will be used.
Get:1 xenial/restricted amd64 nvidia-352-updates amd64 361.42-0ubuntu2 [4,814 B]
Fetched 4,814 B in 0s (12.4 kB/s)
Selecting previously unselected package nvidia-352-updates.
(Reading database ... 439776 files and directories currently installed.)
Preparing to unpack .../nvidia-352-updates_361.42-0ubuntu2_amd64.deb ...
Unpacking nvidia-352-updates (361.42-0ubuntu2) ...
Setting up nvidia-352-updates (361.42-0ubuntu2) ...Purging and re-installing seems to automatically select version 361, which is what I want to avoid:
damien@damien-desktop:~$ sudo apt-get install nvidia-352
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed: nvidia-361 nvidia-opencl-icd-361 nvidia-prime nvidia-settings
The following NEW packages will be installed: nvidia-352 nvidia-361 nvidia-opencl-icd-361 nvidia-prime nvidia-settings
0 to upgrade, 5 to newly install, 0 to remove and 0 not to upgrade.
Need to get 866 kB/77.5 MB of archives.
After this operation, 339 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 xenial/main amd64 nvidia-prime amd64 0.8.2 [11.1 kB]
Get:2 xenial/main amd64 nvidia-settings amd64 361.42-0ubuntu1 [855 kB]
Fetched 866 kB in 2s (324 kB/s)
Selecting previously unselected package nvidia-361.
(Reading database ... 439200 files and directories currently installed.)
Preparing to unpack .../nvidia-361_361.42-0ubuntu2_amd64.deb ...
Unpacking nvidia-361 (361.42-0ubuntu2) ...
Selecting previously unselected package nvidia-352.
Preparing to unpack .../nvidia-352_361.42-0ubuntu2_amd64.deb ...
Unpacking nvidia-352 (361.42-0ubuntu2) ...
Selecting previously unselected package nvidia-opencl-icd-361.
Preparing to unpack .../nvidia-opencl-icd-361_361.42-0ubuntu2_amd64.deb ...
Unpacking nvidia-opencl-icd-361 (361.42-0ubuntu2) ...
Selecting previously unselected package nvidia-prime.
Preparing to unpack .../nvidia-prime_0.8.2_amd64.deb ...
Unpacking nvidia-prime (0.8.2) ...
Selecting previously unselected package nvidia-settings.
Preparing to unpack .../nvidia-settings_361.42-0ubuntu1_amd64.deb ...
Unpacking nvidia-settings (361.42-0ubuntu1) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for ureadahead (0.100.0-19) ...
ureadahead will be reprofiled on next reboot
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160415-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.59ubuntu1) ...
Setting up nvidia-361 (361.42-0ubuntu2) ...
update-alternatives: using /usr/lib/nvidia-361/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf (x86_64-linux-gnu_gl_conf) in auto mode
update-alternatives: using /usr/lib/nvidia-361/ld.so.conf to provide /etc/ld.so.conf.d/x86_64-linux-gnu_EGL.conf (x86_64-linux-gnu_egl_conf) in auto mode
update-alternatives: using /usr/lib/nvidia-361/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_GL.conf (i386-linux-gnu_gl_conf) in auto mode
update-alternatives: using /usr/lib/nvidia-361/alt_ld.so.conf to provide /etc/ld.so.conf.d/i386-linux-gnu_EGL.conf (i386-linux-gnu_egl_conf) in auto mode
update-alternatives: using /usr/share/nvidia-361/glamor.conf to provide /usr/share/X11/xorg.conf.d/glamoregl.conf (glamor_conf) in auto mode
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia-361
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
Adding system user `nvidia-persistenced' (UID 123) ...
Adding new group `nvidia-persistenced' (GID 130) ...
Adding new user `nvidia-persistenced' (UID 123) with group `nvidia-persistenced' ...
Not creating home directory `/'.
Loading new nvidia-361-361.42 DKMS files...
First Installation: checking all kernels...
Building only for 4.4.0-22-generic
Building for architecture x86_64
Building initial module for 4.4.0-22-generic
Done.
nvidia_361:
Running module version sanity check. - Original module - No original module exists within this kernel - Installation - Installing to /lib/modules/4.4.0-22-generic/updates/dkms/
nvidia_361_modeset.ko:
Running module version sanity check. - Original module - No original module exists within this kernel - Installation - Installing to /lib/modules/4.4.0-22-generic/updates/dkms/
nvidia_361_uvm.ko:
Running module version sanity check. - Original module - No original module exists within this kernel - Installation - Installing to /lib/modules/4.4.0-22-generic/updates/dkms/
depmod....
DKMS: install completed.
Setting up nvidia-352 (361.42-0ubuntu2) ...
Setting up nvidia-opencl-icd-361 (361.42-0ubuntu2) ...
Setting up nvidia-prime (0.8.2) ...
Setting up nvidia-settings (361.42-0ubuntu1) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for initramfs-tools (0.122ubuntu8) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-22-generic
Processing triggers for ureadahead (0.100.0-19) ...How can I safely downgrade to this version of the driver? I cannot simply remove all nvidia drivers and re-install because nouveau does not seem to work at all with my hardware (I had to install Ubuntu as the server version then covert it to a desktop later).
21 Answer
In Ubuntu 16.04 nvidia-352 is just a transitional package for nvidia-361.
Fortunately nvidia-352 is available from the Proprietary GPU drivers PPA.
Download the following nvidia-352.79 realated packages from the PPA :
libcuda1-352_352.79-0ubuntu0~gpu16.04.2_amd64.deb
nvidia-352_352.79-0ubuntu0~gpu16.04.2_amd64.deb
nvidia-libopencl1-352_352.79-0ubuntu0~gpu16.04.2_amd64.deb
nvidia-opencl-icd-352_352.79-0ubuntu0~gpu16.04.2_amd64.deb
But first you should check whether the latest stable drivers nvidia-364 can solve the problem.
Remove the NVIDIA drivers 361 - open a terminal and execute :
sudo apt purge nvidia*
sudo reboot Select the Ubuntu menu entry and press the E key.
Add nouveau.modeset=0 at the end of the linux line.
Press the F10 key to boot into the operating system.
Important : Set a Space between the last character in the linux line and nouveau.modeset=0.
When the login screen appears press Ctrl+Alt+F1.
Enter your user name and password and then execute :
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-364
sudo rebootIn case these drivers do not work - open a terminal and execute :
sudo apt purge nvidia*
sudo reboot Select the Ubuntu menu entry and press the E key.
Add nouveau.modeset=0 at the end of the linux line.
Press the F10 key to boot into the operating system.
Important : Set a Space between the last character in the linux line and nouveau.modeset=0.
When the login screen appears press Ctrl+Alt+F1.
Enter your user name and password and then execute :
cd /<path-to-the-folder-which-contains-the-.deb-files-you-have-downloaded-before>
sudo dpkg -i libcuda1-352_352.79-0ubuntu0~gpu16.04.2_amd64.deb
sudo dpkg -i nvidia-352_352.79-0ubuntu0~gpu16.04.2_amd64.deb
sudo dpkg -i nvidia-libopencl1-352_352.79-0ubuntu0~gpu16.04.2_amd64.deb
sudo dpkg -i nvidia-opencl-icd-352_352.79-0ubuntu0~gpu16.04.2_amd64.deb
sudo reboot Note : In case that you get a dependency error, execute apt install -f after each single error.