![如何解决“错误:NVIDIA 内核模块‘nvidia-uvm’似乎已加载到您的内核中”?](https://linux22.com/image/1205192/%E5%A6%82%E4%BD%95%E8%A7%A3%E5%86%B3%E2%80%9C%E9%94%99%E8%AF%AF%EF%BC%9ANVIDIA%20%E5%86%85%E6%A0%B8%E6%A8%A1%E5%9D%97%E2%80%98nvidia-uvm%E2%80%99%E4%BC%BC%E4%B9%8E%E5%B7%B2%E5%8A%A0%E8%BD%BD%E5%88%B0%E6%82%A8%E7%9A%84%E5%86%85%E6%A0%B8%E4%B8%AD%E2%80%9D%EF%BC%9F.png)
我正在尝试在我的 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
)