目錄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