nvidia驱动卸载与安装

参考了:Ubuntu 卸载 Nvidia 驱动和安装最新驱动_WMSmile的博客-CSDN博客_ubuntu 卸载nvidia驱动

1 完全卸载驱动:

sudo apt-get --purge remove nvidia*

sudo apt autoremove

To remove CUDA Toolkit:

sudo apt-get --purge remove "*cublas*" "cuda*"

To remove NVIDIA Drivers:

sudo apt-get --purge remove "*nvidia*"

2 安装驱动

2.1 如果没有版本要求:

ubuntu-driver devices ##查看系统推荐的版本,

sudo apt install nvidia-driver-510 ##根据推荐的版本安装

2.2 按照自己的版本要求安装,

去**NVDIA 驱动官网**搜索你的显卡需要的驱动型号并下载自己要的版本

2.2.1 禁用nouveau

sudo gedit /etc/modprobe.d/blacklist.conf

在blacklist.conf文件末尾加上这两行,并保存:

     blacklist nouveau

     options nouveau modeset=0

执行 sudo update-initramfs -u

重启 reboot

2.2.2 安装驱动

sudo chmod a+x NVIDIA-Linux-x86_64-xxx.run   #根据自己下载的版本补全

sudo ./NVIDIA-Linux-x86_64-455.45.01.run -no-x-check -no-nouveau-check -no-opengl-files

安装过程中的选项

The distribution-provided pre-install script failed! Are you sure you want to continue? 选择 yes 继续。
Would you like to register the kernel module souces with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later?  选择 No 继续。
问题没记住,选项是:install without signing
问题大概是:Nvidia's 32-bit compatibility libraries? 选择 No 继续。
Would you like to run the nvidia-xconfigutility to automatically update your x configuration so that the NVIDIA x driver will be used when you restart x? Any pre-existing x confile will be backed up.  选择 Yes
 

完成之后  reboot,查看nvidia-smi

卸载:

sudo apt-get --purge remove "*nvidia*"
sudo /usr/bin/nvidia-uninstall
 

  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值