最近电脑显示器频繁出现故障导致显卡驱动总是出问题,找到了一套简单、有效的显卡驱动安装方式,记录一下方便下次出问题时候用。
参考了以下文章:
Ubuntu18-22.04安装和干净卸载nvidia显卡驱动——超详细、最简单
Ubuntu 安装显卡驱动

显卡驱动下载

NVIDIA 驱动程序下载

卸载并重装显卡驱动

sudo apt-get update   #更新软件列表
sudo apt-get install g++  #安装必要依赖
sudo apt-get install gcc
sudo apt-get install make

sudo apt-get remove --purge nvidia*  #卸载原有所有驱动(或者nviida-*)

sudo gedit /etc/modprobe.d/blacklist.conf   #禁用nouveau,末尾添加如下两行命令保存

blacklist nouveau   
options nouveau modeset=0

sudo update-initramfs –u   #更新
reboot   #重启电脑
lsmod | grep nouveau   #检查,输入之后无其他输出,成功,继续
sudo telinit 3  #进入文本界面
sudo service gdm3 stop   #停止显示服务
sudo chmod 777 NVIDIA-Linux-x86_64-430.26.run   #给你下载的驱动赋予可执行权限,才可以安装
sudo ./NVIDIA-Linux-x86_64-430.26.run    #安装
sudo  service  gdm3 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 继续

验证安装是否成功

nvidia-smi

ubuntu显卡驱动安装-LMLPHP

03-24 17:31