如何解决“错误:NVIDIA 内核模块‘nvidia-uvm’似乎已加载到您的内核中”?

如何解决“错误:NVIDIA 内核模块‘nvidia-uvm’似乎已加载到您的内核中”?

我正在尝试在我的 ubuntu 上安装 cuda 10,我已经有 nvidia-cuda-toolkit 9.2,所以这应该是升级

我下载安装自解压程序并执行它:

sudo ./cuda_10.0.130_410.48_linux.run 

但是,当我完成所有选项时,出现以下错误。

ERROR: An NVIDIA kernel module 'nvidia-uvm' appears to already be loaded in your kernel.  This may be because it is in use (for example, by an X server, a CUDA program, or the NVIDIA Persistence Daemon), but this may also happen if your kernel was configured without support for module unloading.  Please be sure to exit any programs that may be using the GPU(s) before attempting to upgrade your driver.  If no GPU-based programs are running, you know that your kernel supports module unloading, and you still receive this message, then an error may have occured that has corrupted an NVIDIA kernel module's usage count, for which the simplest remedy is to reboot your computer.
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 download page at www.nvidia.com.

我安装nvidia-cuda-toolkit 9.2的时候从来没有出现过这个错误(虽然一直用nvidia驱动),为什么最新版本不能处理这种情况?是不是cuda 10对ubuntu支持不好?

环境:

  • Ubuntu 18.04
  • nvidia-驱动程序-410
  • nvidia-cuda-工具包 9.2
  • 没有使用 bbswitch

答案1

我运行/usr/bin/nvidia-uninstall然后就可以安装驱动程序

答案2

我也遇到了同样的问题,错误原因是我在安装cuda的时候不小心选择了“安装nvidia驱动”。

所以,在安装CUDA的过程中,当你遇到以下选项时:

为 Linux-x86_64 384.81 安装 NVIDIA 加速图形驱动程序?(y)es/(n)o/(q)uit:

请选择,问题就解决了。

答案3

也许您在这台机器上使用了 nvidia-docker,如果是这样,请尝试按照命令。

sudo service lightdm stop
sudo stop nvidia-digits-server
sudo service docker stop
sudo rmmod nvidia-uvm

service nvidia-docker stop也将解决它(如果 UVM 仅由nvidia-docker

相关内容