由于 Nouveau 无法在 Ubuntu 上安装 CUDA - 如何禁用/卸载?

由于 Nouveau 无法在 Ubuntu 上安装 CUDA - 如何禁用/卸载?

我注意到我有时会在命令行中遇到奇怪的 Nouveau 问题。

我尝试按照说明禁用 Nouveau这里,但我仍然遇到以下所有问题。

尝试安装 CUDA 7.5 时,出现以下信息:

http://imgur.com/wt8b9Av

以下是日志文件的内容:

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

您需要启动到控制台才能执行此操作。

  1. 开机并按住 Shift 键
  2. 选择 Ubuntu 并按“E”
  3. 在启动设置底部添加 nouveau.modeset=0
  4. 按 F10
  5. 从此控制台,将 nouveau 列入黑名单,然后重新安装您的 nvidia 软件包。尝试使用 nvidia 软件包,例如nvidia-361- 您可以谷歌驱动程序 PPA 来找到 367。您尝试支持哪种卡?

或者,您可以按Ctrl+ Alt+F1调出控制台并使用该命令sudo service lightdm stop执行相同的操作,但我不确定这是否会卸载 nouveau 内核模块。

相关内容