ubuntu下終於安裝好了nvidia的gt540顯卡驅動。估計好多童鞋怕麻煩都放棄安裝了哈。
先看看效果。
~$ lspci |grep -i vga 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 540M] (rev ff)
期間遇到了很多問題,記錄一下。
參考鏈接:【使用 Bumblebee 控制 NVIDIA 雙顯卡(Ubuntu)】 http://www.linuxidc.com/Linux/2012-09/70418.htm
跟到第五部分:“測試效果”的時候,和作者描述的不同了,出現了一個問題:
執行 optirun glxgears 提示錯誤:
[ERROR]Cannot access secondary GPU - error: [XORG] (EE) No devices detected.
[ERROR]Aborting because fallback start is disabled.
然后繼續查找資料,發現都是修改busid的pci編號。
如:http://www.linuxidc.com/Linux/2013-07/87369.htm
http://forum.ubuntu.org.cn/viewtopic.php?f=42&p=2986284
可是我的配置文件是對的,和他們問題的並不一樣,無奈,繼續查找資料。
沒頭緒了,注銷、重啟、重裝,各種折騰。
又跟着 http://www.linuxidc.com/Linux/2012-09/70418.htm 重復做了一遍,這次多更新了下pci信息
sudo update-pciids
這時,問題不同了。
[ERROR]Cannot access secondary GPU, secondary X is not active.
又搜索了一番,還是沒找到解決辦法,差點兒要放棄了。突然想起安裝系統的時候有個ask ubuntu。
找到了http://askubuntu.com/questions/295270/failing-to-initialize-nvidia-gpu
終於看到了一個不同的解決方法,頓時竊喜,怎么也得試一把。【PS:百度找到的真是千篇一律,google又無奈被強~~~ 只能呵呵了】
In order to fix my problem in Ubuntu 13.04, I performed the following:
sudo add-apt-repository ppa:xorg-edgers/ppa sudo apt-get update sudo apt-get install nvidia-319
I then installed bumblebee by the method described by the wiki: https://wiki.ubuntu.com/Bumblebee
To test, I installed mesa-utils, and ran
optirun glxgears
with great success!The only thing I would like to check now is whether the bumblebee version offered as default by the repro is the latest 3.2.1 released on the 26th of April. Either way it is not a hassle to upgrade.
ubuntu13和14的驅動差別應該不大,順便看了下nvidia-319不是最新版本的。 去nvidia看了下,331很新。
sudo add-apt-repository ppa:xorg-edgers/ppa sudo apt-get update sudo apt-get install nvidia-331
哈哈,安裝、重啟,再次查看vga信息。
lspci | grep -i vga 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 540M] (rev ff)
(rev ff) 貌似成功了。
測試一下:
optirun glxgears
繼續:
打開n卡設置:
optirun nvidia-settings -c :8
都ok了。
bumblebee的作用是禁用nvidia獨立顯卡,需要使用獨顯時,使用”optirun 程序名“手動開啟nvidia來運行需要加速的程序。
如optirun vmware
驅動到此全部安裝好了,感觸很多哇。千萬不要輕言放棄。