https://blog.csdn.net/qq_41915226/article/details/103052058
https://zhuanlan.zhihu.com/p/108507163
在线搜索:
https://www.geforce.cn/drivers/beta-legacy
https://www.nvidia.cn/Download/index.aspx?lang=cn
离线安装:
去官网下载需要的显卡驱动,以NVIDIA-Linux-x86_64-440.31.run为例。
下载后的run文件拷贝至home目录下。
1.禁用 nouveau驱动lsmod | grep nouveau
# 查看有没有输出,如果有信息输出,则需要禁掉
sudo gedit /etc/modprobe.d/blacklist.conf
在blacklist.conf的最后添加下面几行:
blacklist nouveau
options nouveau modeset=0
保存,关闭
更新
sudo update-initramfs -u
重启
lsmod | grep nouveau
# 查看有没有输出,如果没有任何信息输出,则说明ok
2.进入tty模式进行安装
Ctrl+Alt+F1进入文本模式sudo service lightdm stop
# 关闭图形界面
然后卸载掉原有驱动:
sudo apt-get remove nvidia-*
给驱动run文件赋予执行权限:
sudo chmod a+x NVIDIA-Linux-x86_64-440.31.run
安装:
sudo sh NVIDIA-Linux-x86_64-440.31.run --no-opengl-files –no-x-check –no-nouveau-check
–no-opengl-files 只安装驱动文件,不安装OpenGL文件。这个参数最重要
–no-x-check 安装驱动时不检查X服务
–no-nouveau-check 安装驱动时不检查nouveau
后面两个参数可不加。若报错说明不认识这两个参数,那就不需要添加了
如果在装的过程中出现以下信息,请选择:
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.
选择 no 继续
3sudo service lightdm restart
# 重新开启图形界面nvidia-smi
# 查看是否安装成功
还有一些需要这样安装,不同版本对应不同的安装过程,但是大同小异:
1)Accept License
2)The distribution-provided pre-install script failed! Are you sure you want to continue? -> CONTINUE INSTALLATION
3)Install NVIDIA's 32-bit compatibility libraries? ->YES
4) An incomplete installation of libglvnd was found. Do you want to install a full copy of libglvnd? This will overwrite any existing libglvnd libraries.-> Install and overwrite existin
4) Would you like to run the nvidia-xconfig utility? -> YES
基本就是这个流程了,最后再次进入init3模式,ctrl+alt+f3,然后开启lightdm,返回到图形界面,在终端里面输入nvidia-smi就可以查看到显卡信息,说明安装成功,重启电脑,在终端输入命令nvidia-settings将会显示显卡的设置的窗口,说明已经成功了