都在root目录下操作
su
(1)lspci | grep -i nvidia (查看显卡)
(2)echo -e "blacklist nouveau\noptions nouveau modeset=0" > /etc/modprobe.d/blacklist.conf
(3)# 备份原来的镜像文件
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
(4)# 重建新镜像文件
dracut /boot/initramfs-$(uname -r).img $(uname -r)
(5)# 重启
reboot
(6)# 查看nouveau是否启动,如果结果为空即为禁用成功
lsmod | grep nouveau
(7)cd /home/dell/Downloads(切换到下载的文件目录)
(8)init 3(切换到字符模式)
(9)chmod a+x NVIDIA-Linux-x86_64-515.48.07.run(加权限)
(10)./NVIDIA-Linux-x86_64-515.48.07.run
《515.48.07换成自己下载的驱动版本》
(11)验证驱动
nvidia-smi
(12)切换回图形界面
init 5