目录html
首先ctrl + alt + F1进入字符界面linux
sudo apt-get purge nvidia* sudo apt-get autoremove sudo ./NIVIDIA-Linux-X86_64-384.59.run --uninstall
sudo apt-get install build-essential gcc-multilib dkms
ide
编辑 /etc/modprobe.d/blacklist-nouveau.conf 文件,添加如下内容:oop
blacklist nouveau blacklist lbm-nouveau options nouveau modeset=0 alias nouveau off alias lbm-nouveau off
关闭nouveau:ui
$ echo options nouveau modeset=0 | sudo tee -a /etc/modprobe.d/nouveau-kms.conf
.net
$ sudo update-initramfs -u $ sudo reboot
重启后,执行:lsmod | grep nouveau。若是没有屏幕输出,说明禁用nouveau成功。rest
$ apt-get install linux-source $ apt-get install linux-headers-x.x.x-x-generic
其中x.x.x-x-generic能够经过$(uname -r)替换获得code
sudo systemctl stop lightdm(or sudo service lightdm stop) sudo systemctl stop gdm sudo systemctl stop kdm
登录nvidia官网,能够获得适合本身电脑的驱动,下载下来htm
sudo chmod NVIDIA*.run
sudo ./NVIDIA-Linux-x86_64-384.59.run –no-x-check -no-nouveau-check -no-opengl-files
blog
安装过程当中一些选项
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
继续
modprobe nvidia
nvidia-smi
nvidia-settings #若弹出设置对话框,亦表示驱动安装成功
最后退回图形界面:sudo init 5
or ctrl + alt + f7
or sudo service lightdm restart
挂载u盘https://www.cnblogs.com/dmj666/p/8031828.html
参考的博客:
https://blog.csdn.net/stories_untold/article/details/78521925
以上,有问题欢迎讨论,若是有帮助,请点一下推荐
参考:https://blog.csdn.net/cosmoshua/article/details/76644029?tdsourcetag=s_pctim_aiomsg