【转载】使用 Bumblebee 控制 NVIDIA 双显卡

自从装上ubuntu 14.04以后,电脑发热就特别厉害,只是开了一个浏览器看coursera风扇就转得忽忽的,一度害怕会爆炸。。。遂google解决办法之。花现是因为nvidia独立显卡的缘故,并且耗电量也因之咔咔的。找到解决方法如下:

 

转载于:http://www.cnblogs.com/congbo/archive/2012/09/12/2682105.html

 

一、更新显卡信息,否则可能识别出错 (我的机器没更新就可以识别,括弧笑(ps.为毛linux的搜狗输入法没有颜文字,差评!))

➜  ~  sudo update-pciids
[sudo] password for congbo:
Downloaded daily snapshot dated 2012-09-06 03:15:02

 

二、查看显卡信息

更新前:

➜  ~  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 Device 0de9 (rev a1)

更新后:

➜  ~  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 GeForce GT 630M (rev a1)

更新后正确识别出了显卡型号。

Nvidia 卡信息的末尾不是 rev ff,表示独显是开启的。

 

三、拔下电源适配器,查看功耗

➜  ~  grep rate /proc/acpi/battery/BAT0/state
present rate:            2613 mA

平均2000左右

 

四、安装bumblebee

sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get update
sudo apt-get install bumblebee bumblebee-nvidia

 

加入bumblebee组

sudo usermod -a -G bumblebee $USER

 

ubuntu 在安装过程中会将当前用户加入bumblebee组,注销或重启后生效

复制代码
➜  ~  grep congbo /etc/group
adm:x:4:congbo
cdrom:x:24:congbo
sudo:x:27:congbo
dip:x:30:congbo
plugdev:x:46:congbo
lpadmin:x:109:congbo
congbo:x:1000:
sambashare:x:124:congbo
bumblebee:x:1001:congbo
复制代码

bumblebee 版本:

复制代码
➜  ~  bumblebeed --version
bumblebeed (Bumblebee) 3.0.1
Copyright (C) 2011 The Bumblebee Project
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
复制代码

 

五、测试效果 (我的机器重启后有了效果~~~)

➜  ~  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 GeForce GT 630M (rev ff)

Nvidia 卡信息的末尾是 rev ff,表示独显已经关闭。

 

再次拔下电源适配器,查看功耗。

➜  ~  grep rate /proc/acpi/battery/BAT0/state
present rate:            1523 mA

平均1000左右,2000->1000,风扇以前一直狂转,现在基本没动静。

 

bumblebee的作用是禁用nvidia独立显卡,需要使用独显时,使用”optirun 程序名“手动开启nvidia来运行需要加速的程序,如optirun vmware。

 

集显、独显分别运行 glxgears 或 glxspheres 测试,以glxgears为例:

复制代码
➜  ~  glxgears
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
301 frames in 5.0 seconds = 60.107 FPS
300 frames in 5.0 seconds = 59.869 FPS
300 frames in 5.0 seconds = 59.856 FPS
复制代码

 

➜  ~  optirun glxgears
2284 frames in 5.0 seconds = 456.677 FPS
2358 frames in 5.0 seconds = 471.540 FPS
2275 frames in 5.0 seconds = 454.942 FPS

 

打开N卡设置:

optirun nvidia-settings -c :8

 

tips:

现在i系列的一般都是双显卡配置,请勿自行安装nvidia驱动。双显卡的机器,必须停止集成显卡才能正确安装nvidia驱动。
不要用root用户运行,最好是用sudo运行。
如果安装失败,可能无法进入任何一个界面,包括文字界面。解决办法,固定该主机IP,开启ssh服务,确保可以在局域网的另一台主机ssh进该主机。之后然后再折腾,如果失败,ssh进该主机,卸载掉nv的驱动(sudo apt-get autoremove nvidia-current),然后重启。
双显卡台式机折腾这个的时候注意把显示器连接到主板的输出端口上,否则没用。
安装好以后 , “系统->系统管理->NVIDIA X Server Settings“ 不要乱动。

有的bios里可以关掉独显,桌面渲染3D等,i卡能够胜任。(i卡虚拟机里运行win7无法开启aero特效)

 

 

 

试用心得:重启后耗电量低了一半!!!风扇也终于正常了!!!

posted @ 2014-10-18 20:50  shadowhu  阅读(1030)  评论(0编辑  收藏  举报