我目前正在 Ubuntu 16.04 上运行专有 nvidia 驱动程序 361.42
$ dmesg | grep -i nvid
[ 4.233238] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 361.42 Tue Mar 22 18:10:58 PDT 2016
显卡本身是 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_361
不幸的是,我正在使用的某个软件声称驱动程序中有一个错误导致其软件崩溃,并且我被要求将驱动程序降级到 352.79。
但是,它并不想简单地通过 apt-get 安装此版本:
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 http://au.archive.ubuntu.com/ubuntu 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) ...
清除并重新安装似乎会自动选择版本 361,这正是我想要避免的:
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 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 nvidia-prime amd64 0.8.2 [11.1 kB]
Get:2 http://au.archive.ubuntu.com/ubuntu 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) ...
我如何才能安全地降级到此版本的驱动程序?我无法简单地删除所有 nvidia 驱动程序并重新安装,因为 nouveau 似乎根本无法与我的硬件配合使用(我不得不安装 Ubuntu 作为服务器版本,然后再将其转换为桌面)。
答案1
在 Ubuntu 16.04 中,nvidia-352
只是一个过渡包nvidia-361
。
幸运的是,nvidia-352
可以从专有 GPU 驱动程序 PPA 获得。从 PPA
下载以下相关软件包:nvidia-352.79
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
但首先您应该检查最新的稳定驱动程序是否nvidia-364
可以解决问题。
删除 NVIDIA 驱动程序 361 - 打开终端并执行:
sudo apt purge nvidia*
sudo reboot
选择Ubuntu菜单项并按下E键。在linux行的末尾
添加。 按下键启动进入操作系统。nouveau.modeset=0
F10
重要提示:Space在行中的最后一个字符linux
和之间设置一个nouveau.modeset=0
。
当登录屏幕出现时按Ctrl++ Alt。输入您的用户名和密码F1,
然后执行:
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-364
sudo reboot
如果这些驱动程序不起作用 - 打开终端并执行:
sudo apt purge nvidia*
sudo reboot
选择Ubuntu菜单项并按下E键。在linux行的末尾
添加。 按下键启动进入操作系统。nouveau.modeset=0
F10
重要提示:Space在行中的最后一个字符linux
和之间设置一个nouveau.modeset=0
。
当登录屏幕出现时按Ctrl++ Alt。输入您的用户名和密码F1,
然后执行:
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
注意:如果遇到依赖性错误,请apt install -f
在每个错误发生后执行。