网站首页网站地图google地图百度地图学习库RSS在线PSPS联盟素材下载  PS视频教程专题 PS爱好者教程网www.psahz.com PS教程自学网QQ群

bumblebee教程-使用 Bumblebee 控制 NVIDIA 双显卡(Ubuntu)

时间:2015-03-13 09:08 来源:bumblebee 作者:bumblebee教程 阅读:

  bumblebee简介

  Nvidia的双显卡切换技术叫Optimus(擎天柱),可惜只能在win7、vista下实现。Linux下没有对应的技术,当然苹果也没有。这导致独立显卡一直在启用,显卡发热升温,风扇狂转,却没有正常工作输入。平时笔记本电池在 Win7 能使用4小时,到了 Ubuntu 两个小时左右就耗光了。AMD早已经为ATI显卡开发出Linux下的催化剂,支持A卡与intel集显之间切换,N卡的用户只能嘴馋。

  Optimus 技术是不依赖于硬件复杂结构的交火显卡实现。独立显卡按需渲染,并传输给集成显卡,集成显卡则负责显示功能。当笔记本通过电源供电时,独立显卡将关闭,以延长电池寿命。

  Bumblebee 试图模拟 Optimus 技术的行为;当需要的时候,使用独立显卡进行渲染,不使用的时候则关闭。当前的版本仅支持按需渲染,电源管理功能仍然在开发之中。

  测试环境:

  Acer Aspire 5750G

  NVIDIA GeForce GT630M

  ubuntu 12.04 x86_64

  一、更新显卡信息,非常重要,否则可能识别出错

  ➜ ~ 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 a1,表示独显已经关闭。

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

  ➜ ~ 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

  不需要手动加入bumblebee组,安装过程中已经将当前用户加入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

  注销前:

  ➜ ~ groups

  congbo adm cdrom sudo dip plugdev lpadmin sambashare

  注销后:

  ➜ ~ groups

  congbo adm cdrom sudo dip plugdev lpadmin sambashare bumblebee

  bumblebee 版本:

  ➜ ~ bumblebeed --version

  bumblebeed (Bumblebee) 3.0.1

  Copyright (C) 2011 The Bumblebee Project

  License GPLv3+: GNU GPL version 3 or later .

  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特效)

    PS笔刷下载 PS滤镜下载 PS形状下载 PS样式下载 PS动作下载 PS图案下载