1. sudo init 3
2. sudo chmod a+x NVIDIA-Linux-x86_64-396.18.run
sudo ./NVIDIA-Linux-x86_64-396.18.run -no-x-check -no-nouveau-check -no-opengl-files //只有禁用opengl这样安装才不会出现循环登陆的问题
-no-x-check:安装驱动时关闭X服务
-no-nouveau-check:安装驱动时禁用nouveau
-no-opengl-files:只安装驱动文件,不安装OpenGL文件
安装过程选择:
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 继续。
问题没记住,选项是:install without signing
问题大概是: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 继续
参考:网上搜索
若不成功,进行如下:
查看nouveau是否已禁用:
lsmod | grep nouveau
若没有禁用,
sudo vim /etc/modprobe.d/blacklist.conf
在文件最后部分插入以下两行内容
blacklist nouveau
options nouveau modeset=0
更新系统
sudo update-initramfs -u
重启系统(一定要重启)
再次验证是否禁用nouveau
没有信息显示,说明nouveau已被禁用,接下来可以安装nvidia的显卡驱动。