Ubuntu 18.04.3 安装 CUDA 10.2

https://unix.stackexchange.com/questions/440840/how-to-unload-kernel-module-nvidia-drm

https://arabelatso.github.io/2020/01/08/Install%20CUDA%20Toolkit%2010.2%20on%20Ubuntu%2018.04.3/

https://gist.github.com/Mahedi-61/2a2f1579d4271717d421065168ce6a73

0. ### If you have previous installation remove it first. 

 
  sudo apt-get purge nvidia*
  sudo apt remove nvidia-*
  sudo rm /etc/apt/sources.list.d/cuda*
  sudo apt-get autoremove && sudo apt-get autoclean
  sudo rm -rf /usr/local/cuda*

1. 

After change to a text console (pressing Ctrl+Alt+F2) and logging in as root, use the following command to disable the graphical target, which is what keeps the display manager running:

# systemctl isolate multi-user.target

At this point, I'd expect you'd be able to unload the Nvidia drivers using modprobe -r (or rmmod directly):

# modprobe -r nvidia-drm

 

2. run the .run file

3. reboot

原文地址:https://www.cnblogs.com/imoon22/p/14181038.html