![由于 Nouveau 无法在 Ubuntu 上安装 CUDA - 如何禁用/卸载?](https://linux22.com/image/1055759/%E7%94%B1%E4%BA%8E%20Nouveau%20%E6%97%A0%E6%B3%95%E5%9C%A8%20Ubuntu%20%E4%B8%8A%E5%AE%89%E8%A3%85%20CUDA%20-%20%E5%A6%82%E4%BD%95%E7%A6%81%E7%94%A8%2F%E5%8D%B8%E8%BD%BD%EF%BC%9F.png)
我注意到我有时会在命令行中遇到奇怪的 Nouveau 问题。
我尝试按照说明禁用 Nouveau这里,但我仍然遇到以下所有问题。
尝试安装 CUDA 7.5 时,出现以下信息:
以下是日志文件的内容:
daniel@DansCPU:/var/log$ more nvidia-installer.log
nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Fri Jun 3 15:13:32 2016
installer version: 352.39
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
nvidia-installer command line:
./nvidia-installer
--ui=none
--no-questions
--accept-license
--disable-nouveau
Using built-in stream user interface
-> Detected 4 CPUs online; setting concurrency level to 4.
-> License accepted by command line option.
-> Installing NVIDIA driver version 352.39.
-> Running distribution scripts
executing: '/usr/lib/nvidia/pre-install'...
-> done.
-> The distribution-provided pre-install script failed! Are you sure you want to continue? (Answer: Continue installation)
ERROR: The Nouveau kernel driver is currently in use by your system. This driver is incompatible with the NVIDIA driver, and must be disabled before proceeding. Please consult the NVIDIA driver README an
d your Linux distribution's documentation for details on how to correctly disable the Nouveau kernel driver.
WARNING: One or more modprobe configuration files to disable Nouveau are already present at: /etc/modprobe.d/nvidia-installer-disable-nouveau.conf. Please be sure you have rebooted your system since these
files were written. If you have rebooted, then Nouveau may be enabled for other reasons, such as being included in the system initial ramdisk or in your X configuration file. Please consult the NVIDIA d
river README and your Linux distribution's documentation for details on how to correctly disable the Nouveau kernel driver.
-> For some distributions, Nouveau can be disabled by adding a file in the modprobe configuration directory. Would you like nvidia-installer to attempt to create this modprobe file for you? (Answer: Yes)
-> One or more modprobe configuration files to disable Nouveau have been written. For some distributions, this may be sufficient to disable Nouveau; other distributions may require modification of the ini
tial ramdisk. Please reboot your system and attempt NVIDIA driver installation again. Note if you later wish to reenable Nouveau, you will need to delete these files: /etc/modprobe.d/nvidia-installer-dis
able-nouveau.conf
ERROR: Installation has failed. Please see the file '/var/log/nvidia-installer.log' for details. You may find suggestions on fixing installation problems in the README available on the Linux driver downl
oad page at www.nvidia.com.
答案1
您需要启动到控制台才能执行此操作。
- 开机并按住 Shift 键
- 选择 Ubuntu 并按“E”
- 在启动设置底部添加 nouveau.modeset=0
- 按 F10
- 从此控制台,将 nouveau 列入黑名单,然后重新安装您的 nvidia 软件包。尝试使用 nvidia 软件包,例如
nvidia-361
- 您可以谷歌驱动程序 PPA 来找到 367。您尝试支持哪种卡?
或者,您可以按Ctrl+ Alt+F1调出控制台并使用该命令sudo service lightdm stop
执行相同的操作,但我不确定这是否会卸载 nouveau 内核模块。