Ubuntu更新nvidia显卡驱动

Ubuntu更新nvidia显卡驱动

1.先官网下载好对应驱动编译
https://www.nvidia.cn/geforce/drivers/
在这里插入图片描述
2. 禁用nouveau驱动
查看是否成功禁用
只要是安装过NVIDIA显卡驱动的,nouveau一般都被禁止了。可以通过命令

lsmod | grep nouveau

查看。如果没有任何输出就是禁用成功了。否则,请参考禁用步骤。
禁用:https://blog.csdn.net/u013832707/article/details/93157805

2. 卸载原有驱动

sudo apt-get remove --purge nvidia*

3. 安装

sudo service lightdm stop //按Ctrl+Alt+F1,关闭图形界面(黑屏)
sudo chmod a+x NVIDIA-Linux-x86_64-xxx.run //修改权限
sudo ./NVIDIA-Linux-x86_64-390.77.run -no-x-check -no-nouveau-check -no-opengl-files //安装
如果找不到文件,那么说明文件名写错或者文件损坏。
sudo service lightdm start

在没有安装显卡驱动的状态下也可以切换图形界面和文字界面,只是没有显卡操作很卡顿。
注:其中的一些选项如下:
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 继续。
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 继续

4、验证

nvidia-smi//显示GPU当前的状态

参考
https://blog.csdn.net/u014682691/article/details/80605201
https://www.cnblogs.com/fanminhao/p/8902296.html

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值