ubuntu20.04安装Nvidia显卡驱动

1、更新软件列表和安装必要软件、依赖(必须)

sudo apt-get update      #更新软件列表
sudo apt-get install g++
sudo apt-get install gcc
sudo apt-get install make

2、禁用nouveau

创建文件并插入内容:

$ sudo vim /etc/modprobe.d/blacklist-nouveau.conf

在文件末尾添加如下内容:

blacklist nouveau
options nouveau modeset=0

生效并重启

sudo update-initramfs -u   #更新系统
sudo reboot

验证是否禁用成功

lsmod | grep nouveau

如果没有任何输出,则说明禁用成功

3,安装驱动

下载驱动网址:
https://www.nvidia.com/en-us/drivers/

sudo sh NVIDIA-Linux-x86_64-550.144.03.run --no-opengl-files --no-x-check --no-nouveau-check

参数详细解释:

--no-opengl-files 只安装驱动文件,不安装OpenGL文件。这个参数最重要

–-no-x-check 安装驱动时不检查X服务

--no-nouveau-check 安装驱动时不检查nouveau

安装时遇到的选项:

1.If you plan to no longer use the NVIDIA deriver, you should make sure that no X screens are configured to use the NVIDIA X driver X driver in your X configuration file. If you used nvidia-xconfig to configure X, it may have created  a backup of your original configuration. Would you like to run 'nvidia-xconfig --restore-original-backup' to attempt restoration of the original X configuration file?

no

2.Would you like to run the nvidia-xconfig utility to automatically updata your X onfiguration file so that the NVIDIA X driver will be used when you restart X? Any pre-existing X configuration file will be backed up.

yes

3.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-smi
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

thinkerCoder

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值