我尝试在 ubuntu 12.04 上设置 bumblebee。我还使用最新的 nvidia 驱动程序,因为 319 不再可用。
这是我的配置文件:
/etc/bumblebee/bumblebee.conf:
# Configuration file for Bumblebee. Values should **not** be put between quotes
## Server options. Any change made in this section will need a server restart
# to take effect.
[bumblebeed]
# The secondary Xorg server DISPLAY number
VirtualDisplay=:8
# Should the unused Xorg server be kept running? Set this to true if waiting
# for X to be ready is too long and don't need power management at all.
KeepUnusedXServer=false
# The name of the Bumbleblee server group name (GID name)
ServerGroup=bumblebee
# Card power state at exit. Set to false if the card shoud be ON when Bumblebee
# server exits.
TurnCardOffAtExit=false
# The default behavior of '-f' option on optirun. If set to "true", '-f' will
# be ignored.
NoEcoModeOverride=false
# The Driver used by Bumblebee server. If this value is not set (or empty),
# auto-detection is performed. The available drivers are nvidia and nouveau
# (See also the driver-specific sections below)
Driver=nvidia
# Directory with a dummy config file to pass as a -configdir to secondary X
XorgConfDir=/etc/bumblebee/xorg.conf.d
## Client options. Will take effect on the next optirun executed.
[optirun]
# Acceleration/ rendering bridge, possible values are auto, virtualgl and
# primus.
Bridge=auto
# The method used for VirtualGL to transport frames between X servers.
# Possible values are proxy, jpeg, rgb, xv and yuv.
VGLTransport=proxy
# List of paths which are searched for the primus libGL.so.1 when using
# the primus bridge
PrimusLibraryPath=/usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus
# Should the program run under optirun even if Bumblebee server or nvidia card
# is not available?
AllowFallbackToIGC=false
# Driver-specific settings are grouped under [driver-NAME]. The sections are
# parsed if the Driver setting in [bumblebeed] is set to NAME (or if auto-
# detection resolves to NAME).
# PMMethod: method to use for saving power by disabling the nvidia card, valid
# values are: auto - automatically detect which PM method to use
# bbswitch - new in BB 3, recommended if available
# switcheroo - vga_switcheroo method, use at your own risk
# none - disable PM completely
# https://github.com/Bumblebee-Project/Bumblebee/wiki/Comparison-of-PM-methods
## Section with nvidia driver specific options, only parsed if Driver=nvidia
[driver-nvidia]
# Module name to load, defaults to Driver if empty or unset
KernelDriver=nvidia-331-updates
PMMethod=auto
# colon-separated path to the nvidia libraries
LibraryPath=/usr/lib/nvidia-331-updates:/usr/lib32/nvidia-331-updates
# comma-separated path of the directory containing nvidia_drv.so and the
# default Xorg modules path
XorgModulePath=/usr/lib/nvidia-331-updates/xorg,/usr/lib/xorg/modules
XorgConfFile=/etc/bumblebee/xorg.conf.nvidia
## Section with nouveau driver specific options, only parsed if Driver=nouveau
[driver-nouveau]
KernelDriver=nouveau
PMMethod=auto
XorgConfFile=/etc/bumblebee/xorg.conf.nouveau
/etc/bumblebee/xorg.conf.nvidia:
Section "ServerLayout"
Identifier "Layout0"
Option "AutoAddDevices" "false"
Option "AutoAddGPU" "false"
EndSection
Section "Device"
Identifier "DiscreteNvidia"
Driver "nvidia"
VendorName "NVIDIA Corporation"
# If the X server does not automatically detect your VGA device,
# you can manually set it here.
# To get the BusID prop, run `lspci | egrep 'VGA|3D'` and input the data
# as you see in the commented example.
# This Setting may be needed in some platforms with more than one
# nvidia card, which may confuse the proprietary driver (e.g.,
# trying to take ownership of the wrong device). Also needed on Ubuntu 13.04.
# BusID "PCI:01:00:0"
# Setting ProbeAllGpus to false prevents the new proprietary driver
# instance spawned to try to control the integrated graphics card,
# which is already being managed outside bumblebee.
# This option doesn't hurt and it is required on platforms running
# more than one nvidia graphics card with the proprietary driver.
# (E.g. Macbook Pro pre-2010 with nVidia 9400M + 9600M GT).
# If this option is not set, the new Xorg may blacken the screen and
# render it unusable (unless you have some way to run killall Xorg).
Option "ProbeAllGpus" "false"
Option "NoLogo" "true"
Option "UseEDID" "false"
Option "UseDisplayDevice" "none"
EndSection
然后我向你们展示一些神秘的东西:
第一个命令:
$ sudo /usr/sbin/bumblebeed -vv
[ 4828.053052] [DEBUG]Found card: 01:00.0 (discrete)
[ 4828.053093] [DEBUG]Found card: 00:02.0 (integrated)
[ 4828.053103] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[ 4828.053656] [INFO]Configured driver: nvidia
[ 4828.053678] [DEBUG]Skipping auto-detection, using configured driver 'nvidia '
[ 4828.053743] [DEBUG]bbswitch has been detected.
[ 4828.053753] [INFO]Switching method 'bbswitch' is available and will be used.
[ 4828.053762] [DEBUG]Active configuration:
[ 4828.053770] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 4828.053778] [DEBUG] X display: :8
[ 4828.053786] [DEBUG] LD_LIBRARY_PATH:
[ 4828.053794] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 4828.053802] [DEBUG] pidfile: /var/run/bumblebeed.pid
[ 4828.053810] [DEBUG] xorg.conf file: /etc/bumblebee/xorg.conf.DRIVER
[ 4828.053818] [DEBUG] xorg.conf.d dir: /etc/bumblebee/xorg.conf.d
[ 4828.053826] [DEBUG] ModulePath:
[ 4828.053833] [DEBUG] GID name: bumblebee
[ 4828.053841] [DEBUG] Power method: auto
[ 4828.053849] [DEBUG] Stop X on exit: 1
[ 4828.053857] [DEBUG] Driver: nvidia
[ 4828.053865] [DEBUG] Driver module: nvidia
[ 4828.053872] [DEBUG] Card shutdown state: 1
[ 4828.054045] [DEBUG]Process /sbin/modprobe started, PID 3031.
[ 4828.054143] [DEBUG]Hiding stderr for execution of /sbin/modprobe
[ 4828.056711] [DEBUG]SIGCHILD received, but wait failed with No child processes
[ 4828.056777] [ERROR]Module 'nvidia ' is not found.
第二条命令:
$ sudo /usr/sbin/bumblebeed -vv --driver nvidia
[ 4742.214895] [DEBUG]Found card: 01:00.0 (discrete)
[ 4742.214970] [DEBUG]Found card: 00:02.0 (integrated)
[ 4742.215000] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[ 4742.215609] [INFO]Configured driver: nvidia
[ 4742.215660] [DEBUG]Skipping auto-detection, using configured driver 'nvidia'
[ 4742.215885] [DEBUG]Process /sbin/modprobe started, PID 3023.
[ 4742.215981] [DEBUG]Hiding stderr for execution of /sbin/modprobe
[ 4742.218520] [DEBUG]SIGCHILD received, but wait failed with No child processes
[ 4742.218667] [DEBUG]bbswitch has been detected.
[ 4742.218730] [INFO]Switching method 'bbswitch' is available and will be used.
[ 4742.218769] [DEBUG]Active configuration:
[ 4742.218805] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 4742.218834] [DEBUG] X display: :8
[ 4742.218871] [DEBUG] LD_LIBRARY_PATH: /usr/lib/nvidia-331-updates:/usr/lib32/nvidia-331-updates
[ 4742.218908] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 4742.218949] [DEBUG] pidfile: /var/run/bumblebeed.pid
[ 4742.218981] [DEBUG] xorg.conf file: /etc/bumblebee/xorg.conf.nvidia
[ 4742.219010] [DEBUG] xorg.conf.d dir: /etc/bumblebee/xorg.conf.d
[ 4742.219040] [DEBUG] ModulePath: /usr/lib/nvidia-331-updates/xorg,/usr/lib/xorg/modules
[ 4742.219074] [DEBUG] GID name: bumblebee
[ 4742.219102] [DEBUG] Power method: auto
[ 4742.219136] [DEBUG] Stop X on exit: 1
[ 4742.219172] [DEBUG] Driver: nvidia
[ 4742.219202] [DEBUG] Driver module: nvidia-331-updates
[ 4742.219238] [DEBUG] Card shutdown state: 1
[ 4742.219431] [DEBUG]Process /sbin/modprobe started, PID 3024.
[ 4742.219517] [DEBUG]Hiding stderr for execution of /sbin/modprobe
[ 4742.221990] [DEBUG]SIGCHILD received, but wait failed with No child processes
[ 4742.222054] [DEBUG]Configuration test passed.
[ 4742.222937] [INFO]/usr/sbin/bumblebeed 3.2.1 started
[ 4742.223214] [INFO]Switching dedicated card OFF [bbswitch]
[ 4742.404703] [INFO]Initialization completed - now handling client requests
这是工作!
我不明白为什么第一个命令不起作用。在 bumblebee.conf 中,“driver”值是“nvidia”。为什么在第一个命令中它尝试加载驱动程序模块“nvidia”而不是“nvidia-331-updates”?两个命令都必须有效,否则就无效。一起。如何解决这个问题?
答案1
改成
LibraryPath=/usr/lib/nvidia-331-updates:/usr/lib32/nvidia-331-updates
LibraryPath=/usr/lib/nvidia-current:/usr/lib32/nvidia-current
改成[driver-nvidia]
Driver=nvidia [driver-nvidia]
改成[driver-nouveau]
Driver=nouveau [driver-nouveau]
更改KernelDriver=nvidia-331-updates
为KernelDriver=nvidia_331_updates
或KernelDriver=nvidia
那个逻辑大黄蜂-.-
更新
尝试这个:LibraryPath=/usr/lib/nvidia-331-updates,/usr/lib32/nvidia-331-updates
改为
LibraryPath=/usr/lib/nvidia-331-updates,/usr/lib32/nvidia-331-updates
我的大黄蜂配置:
# Bumblebee 的配置文件。值不应放在引号中 ## 服务器选项。本节中的任何更改都需要重新启动服务器 # 才能生效。 [大黄蜂] # 辅助 Xorg 服务器 DISPLAY 号码 虚拟显示=:8 # 未使用的 Xorg 服务器是否应继续运行?如果等待,则将其设置为 true # X 的准备时间太长,而且根本不需要电源管理。 KeepUnusedXServer=false # Bumbleblee 服务器组名(GID 名称) 服务器组=大黄蜂 # 退出时卡的电源状态。如果 Bumblebee 退出时卡应处于开启状态,则设置为 false # 个服务器退出。 TurnCardOffAtExit=false # optirun 上“-f”选项的默认行为。如果设置为“true”,“-f”将 # 被忽略。 无EcoModeOverride=false # Bumblebee 服务器使用的驱动程序。如果此值未设置(或为空), # 自动检测已执行。可用的驱动程序有 nvidia 和 nouveau # (另请参阅下面特定于驱动程序的部分) 司机= # 带有虚拟配置文件的目录,作为 -configdir 传递给辅助 X XorgConfDir=/etc/bumblebee/xorg.conf.d ## 客户端选项。将在下次执行 optirun 时生效。 [可选] # 加速/渲染桥,可能的值是 auto、virtualgl 和 # 主要。 桥=自动 # VirtualGL 在 X 服务器之间传输帧所使用的方法。 # 可能的值是 proxy、jpeg、rgb、xv 和 yuv。 VGLTransport=代理 # 使用时搜索 primus libGL.so.1 的路径列表 # Primus 桥 PrimusLibraryPath=/usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus # 程序是否应该在 optirun 下运行,即使是 Bumblebee 服务器或 nvidia 卡 # 不可用? 允许FallbackToIGC = false # 特定于驱动程序的设置分组在 [driver-NAME] 下。部分包括 # 如果 [bumblebeed] 中的驱动程序设置设置为 NAME(或者如果自动 # 检测解析为 NAME)。 # PMMethod:通过禁用 nvidia 卡来节省电量的方法,有效 # 值为:auto - 自动检测使用哪种 PM 方法 # bbswitch - BB 3 中的新功能,如有推荐 # switcheroo - vga_switcheroo 方法,使用风险自负。 # none – 完全禁用 PM # https://github.com/Bumblebee-Project/Bumblebee/wiki/Comparison-of-PM-methods ## 包含 nvidia 驱动程序特定选项的部分,仅当 Driver=nvidia 时才解析 [驱动程序-nvidia] # 要加载的模块名称,如果为空或未设置,则默认为 Driver 内核驱动程序=nvidia_331_updates PMMethod=自动 # 以冒号分隔的 nvidia 库路径 LibraryPath=/usr/lib/nvidia-331-updates,/usr/lib32/nvidia-331-updates # 包含 nvidia_drv.so 的目录的逗号分隔路径以及 # 默认 Xorg 模块路径 XorgModulePath=/usr/lib/nvidia-331-updates/xorg,/usr/lib/xorg/modules XorgConfFile=/etc/bumblebee/xorg.conf.nvidia ## 包含 nouveau 驱动程序特定选项的部分,仅当 Driver=nouveau 时才解析 [新驱动程序] 内核驱动程序=nouveau PMMethod=自动 XorgConfFile=/etc/bumblebee/xorg.conf.nouveau
我的 xorg.conf.nvidia:
# nvidia-settings:nvidia-settings 生成的 X 配置文件 # nvidia-settings: 版本 331.20 (buildd@roseapple) 2014 年 2 月 3 日星期一 15:07:22 UTC “服务器布局”部分 标识符“Layout0” 屏幕 0 “屏幕0” 0 0 输入设备“键盘0”“核心键盘” 输入设备“Mouse0”“CorePointer” 选项“AutoAddDevices”“false” 选项“AutoAddGPU”“false” 选项“Xinerama”“0” 结束部分 “输入设备”部分 # 从默认生成 标识符“Keyboard0” 驱动程序“kbd” 结束部分 “输入设备”部分 # 从默认生成 标识符“Mouse0” 驱动程序“鼠标” 选项“协议”“自动” 选项“设备”“/dev/psaux” 选项“Emulate3Buttons”“否” 选项“ZAxisMapping”“4 5” 结束部分 “设备”部分 # 如果 X 服务器没有自动检测到你的 VGA 设备, # 您可以在这里手动设置。 # 要获取 BusID 属性,请运行 `lspci | egrep 'VGA|3D'` 并输入数据 # 正如您在注释的示例中看到的那样。 # 在某些具有多个 # nvidia 卡,这可能会混淆专有驱动程序(例如, # 尝试获取错误设备的所有权)。Ubuntu 13.04 也需要此权限。 # 将 ProbeAllGpus 设置为 false 可防止新的专有驱动程序 # 生成实例以尝试控制集成显卡, # 已经在 bumblebee 外部进行管理了。 # 这个选项不会造成任何影响,并且它是运行 # 一个以上具有专有驱动程序的 nvidia 显卡。 # (例如 2010 年之前的 Macbook Pro 配备 nVidia 9400M + 9600M GT)。 # 如果不设置此选项,新的 Xorg 可能会使屏幕变黑,并且 # 使其无法使用(除非您有某种方法来运行 killall Xorg)。 标识符“DiscreteNvidia” 驱动程序“nvidia” 供应商名称“NVIDIA Corporation” 选项“ProbeAllGpus”“false” 选项“NoLogo”“true” 选项“UseEDID”“false” 选项“UseDisplayDevice”“无” 总线 ID “PCI:01:00:0” 结束部分 “设备”部分 标识符“Device0” 驱动程序“nvidia” 供应商名称“NVIDIA Corporation” 主板名称“GeForce GT 540M” 结束部分 “屏幕”部分 标识符“默认屏幕” 设备“DiscreteNvidia” 结束部分 “屏幕”部分 标识符“Screen0” 设备“Device0” 默认深度 24 选项“UseDisplayDevice”“无” “显示”子部分 虚拟 1600 900 深度 24 结束子节 结束部分
全新安装 Bumblebee、Nvidia 和 DKMS 等之后。
创建备份(如果存在文件)
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
输入
optirun -b none nvidia-settings -c :8
并保存 config xorg 到/etc/bumblebee/xorg.conf.nvidia
nvidia-settings
未保存至/etc/bumblebee/xorg.conf.nvidia
。配置来自nvidia-settings
已保存至/etc/X11/xorg.conf
您必须将此文件移动到 bumblebee xorg-nvidia 配置。输入
sudo rm /etc/bumblebee/xorg.conf.nvidia && sudo mv /etc/X11/xorg.conf /etc/bumblebee/xorg.conf.nvidia
重启 ;)
这个对我有用