說(shuō)明:
機(jī)器說(shuō)明,顯卡P5000布持,內(nèi)存16G庶骄,
1)在登錄頁(yè)面按Ctrl+Alt+F1進(jìn)入tty, 關(guān)閉lightdm。
sudo service lightdm stop
2)添加驅(qū)動(dòng)源
sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-getupdate
3)安裝驅(qū)動(dòng)
去http://www.nvidia.com/download/根據(jù)顯卡型號(hào)下載驅(qū)動(dòng)
離線版:sudo sh NVIDIA*.run --no-opengl-files
? ???????--no-opengl-files很重要芳来,不然會(huì)導(dǎo)致安裝完成后進(jìn)不去圖形界面
安裝過(guò)程中按提示操作就可以了暴氏,一般選擇yes或ok就好。
sudo service lightdm start
sudo apt install nvidia-prime
sudo prime-select query? #這里應(yīng)該是顯示Nvidia才對(duì)
nvidia-smi??? #出現(xiàn)下圖界面绣张,證明安裝成功
4)這時(shí)進(jìn)入系統(tǒng)后答渔,可能分辨率不對(duì),執(zhí)行下列命令查看現(xiàn)在采用的驅(qū)動(dòng)
prime-select query
如果顯示采用的是Nvidia侥涵,則進(jìn)行下一步沼撕;否則執(zhí)行以下命令來(lái)配置驅(qū)動(dòng):
sudo update-alternatives --config i386-linux-gnu_gl_conf
在顯示的顯卡列表中選擇安裝的Nvidia:
sudo?prime-select?nvidia
使用以下命令更新系統(tǒng)驅(qū)動(dòng)
sudo ldconfig -n
sudo update-initramfs -u
重新啟動(dòng)電腦,桌面顯示正常了芜飘,可以通過(guò)prime-select query來(lái)查看當(dāng)前使用的顯卡是否是Nvidia务豺。
5) 安裝過(guò)程中出現(xiàn)了error
ERROR: Unable to load the kernel module'nvidia.ko'.? This happens most
? ? ? frequently when this kernel module was built against the wrong or
? ? ? improperly configured kernel sources, with a version of gcc that differs
? ? ? fromthe one used to build the target kernel, orifa driver suchas? ? ? rivafb/nvidiafbispresent and prevents the NVIDIA kernel modulefrom? ? ? obtaining ownership of the NVIDIA graphics device(s), or NVIDIA GPU
? ? ? installed inthissystemisnot supported bythis NVIDIA Linux graphics
? ? ? driver release.
找到老外的解決辦法
1) Download Newest Nvidia drivers from their website
2) Open module blacklist as admin: (i use gedit for text file editing)
Code:
sudo gedit /etc/modprobe.d/blacklist.conf
3) Add these lines and save:?
Code:
blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv
4) Uninstall any previously installed Nvidia drivers:?
Code:
sudo apt-get --purge remove nvidia-*
5) Reboot your computer
6) When an error message pops up saying that Ubuntu cannot load Nvidia drivers, choose Exit to terminal (Exit to console)
7) Login and cd to the directory where you saved your file
8) Install drivers
Code:
sudo service lightdm stop
sudo sh NVIDIA*.run?--no-opengl-files
9) Start GDM
Code:
sudo service lightdm start