https://wiki.archlinux.org/api.php?action=feedcontributions&user=Iemesis&feedformat=atomArchWiki - User contributions [en]2024-03-29T05:52:11ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Bumblebee&diff=291892Bumblebee2014-01-07T12:53:33Z<p>Iemesis: </p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X Server]]<br />
[[es:Bumblebee]]<br />
[[fr:Bumblebee]]<br />
[[it:Bumblebee]]<br />
[[ru:Bumblebee]]<br />
[[tr:Bumblebee]]<br />
[[zh-CN:Bumblebee]]<br />
{{Related articles start}}<br />
{{Related|NVIDIA Optimus}}<br />
{{Related|Nouveau}}<br />
{{Related|NVIDIA}}<br />
{{Related|Intel Graphics}}<br />
{{Related articles end}}<br />
From Bumblebee's [https://github.com/Bumblebee-Project/Bumblebee/wiki/FAQ FAQ]:<br />
<br />
"''Bumblebee is an effort to make NVIDIA Optimus enabled laptops work in GNU/Linux systems. Such feature involves two graphics cards with two different power consumption profiles plugged in a layered way sharing a single framebuffer.''"<br />
<br />
== Bumblebee: Optimus for Linux ==<br />
<br />
[http://www.nvidia.com/object/optimus_technology.html Optimus Technology] is an ''[http://hybrid-graphics-linux.tuxfamily.org/index.php?title=Hybrid_graphics hybrid graphics]'' implementation without a hardware multiplexer. The integrated GPU manages the display while the dedicated GPU manages the most demanding rendering and ships the work to the integrated GPU to be displayed. When the laptop is running on battery supply, the dedicated GPU is turned off to save power and prolong the battery life. It has also been tested successfully with desktop machines with Intel integrated graphics and an nVidia dedicated graphics card. <br />
<br />
Bumblebee is a software implementation comprising of two parts:<br />
<br />
* Render programs off-screen on the dedicated video card and display it on the screen using the integrated video card. This bridge is provided by VirtualGL or primus (read further) and connects to a X server started for the discrete video card.<br />
* Disable the dedicated video card when it is not in use (see the [[#Power Management|Power management]] section)<br />
<br />
It tries to mimic the Optimus technology behavior; using the dedicated GPU for rendering when needed and power it down when not in use. The present releases only support rendering on-demand, automatically starting a program with the discrete video card based on workload is not implemented.<br />
<br />
{{Warning|Bumblebee is still under heavy development! But your help is very welcome.}}<br />
<br />
== Installation ==<br />
<br />
Before installing Bumblebee check your BIOS and activate Optimus (older laptops call it "switchable graphics") if possible (BIOS doesn't have to provide this option), and install the [[Intel Graphics|Intel driver]] for the secondary on board graphics card.<br />
<br />
Several packages are available for a complete setup:<br />
<br />
* {{Pkg|bumblebee}} - The main package providing the daemon and client programs.<br />
* (optional) {{Pkg|bbswitch}} (or {{aur|bbswitch-dkms}}) - Recommended for saving power by disable the NVIDIA card.<br />
* (optional) If you want more than just saving power, that is rendering programs on the discrete NVDIA card you also need:<br />
** a driver for the NVIDIA card. The open-source [[nouveau]] driver or the more closed-source [[NVIDIA]] driver. See the subsection.<br />
** a render/display bridge. Two packages are currently available for that, {{Pkg|primus}} (or {{aur|primus-git}}) and {{Pkg|virtualgl}}. Only one of them is necessary, but installing them side-by-side does not hurt.<br />
<br />
{{Note|If you want to run a 32-bit application on a 64-bit system you must install the proper lib32-* libraries for the program. In addition to this, you also need to install {{Pkg|lib32-virtualgl}} or {{Pkg|lib32-primus}}, depending on your choice for the render bridge. Just make sure you run {{ic|primusrun}} instead of {{ic|optirun}} if you decide to use Primus render bridge.}}<br />
<br />
=== Installing Bumblebee with Intel/NVIDIA ===<br />
<br />
Install {{Pkg|intel-dri}}, {{Pkg|xf86-video-intel}}, {{Pkg|bumblebee}} and {{Pkg|nvidia}}. If you have {{Pkg|intel-dri}} and {{Pkg|xf86-video-intel}} installed, you will have to reinstall them together with the rest to avoid a dependency conflict between {{Pkg|intel-dri}} and {{Pkg|nvidia}}. <br />
<br />
If you want to run 32-bit applications (like games with wine) on a 64-bit system you need the {{Pkg|lib32-nvidia-utils}} (and {{Pkg|lib32-intel-dri}} if you intend to use {{ic|primusrun}}) package too.<br />
<br />
{{Warning|Do not install {{pkg|lib32-nvidia-libgl}}. Bumblebee will find the correct lib32 NVIDIA libraries without it.}}<br />
<br />
=== Installing Bumblebee with Intel/Nouveau ===<br />
<br />
Install:<br />
* {{Pkg|xf86-video-nouveau}} - experimental 3D acceleration driver.<br />
* {{Pkg|nouveau-dri}} - Mesa classic DRI + Gallium3D drivers.<br />
* {{Pkg|mesa}} - Mesa 3D graphics libraries.<br />
<br />
== Start Bumblebee ==<br />
<br />
In order to use Bumblebee it is necessary add yourself (and other users) to the bumblebee group:<br />
<br />
# gpasswd -a $USER bumblebee<br />
<br />
where {{ic|$USER}} is the login name of the user to be added. Then log off and on again to apply the group changes.<br />
<br />
{{Tip|If you wish '''bumblebee''' to start at boot, you have to enable [[systemd]] service '''bumblebeed'''.}}<br />
<br />
Finished. Reboot system and use the shell program {{ic|[[#Usage|optirun]]}} for Optimus NVIDIA rendering!<br />
<br />
If you simply wish to disable your NVIDIA card, this should be all that is needed, apart from having {{ic|bbswitch}} installed. The bumblebeed daemon will, by default, instruct bbswitch to turn off the card when it starts. See also the [[#Power management|power management]] section below.<br />
<br />
== Usage ==<br />
<br />
The command line programm {{ic|optirun}} shipped with Bumblebee is your best friend<br />
for running applications on your Optimus NVIDIA card.<br />
<br />
Test Bumblebee if it works with your Optimus system:<br />
$ optirun glxgears -info<br />
<br />
If it succeeds and the terminal you are running from mentions something about your NVIDIA - Optimus with Bumblebee is working!<br />
<br />
General usage:<br />
<br />
$ optirun [options] ''application'' [application-parameters]<br />
<br />
Some Examples:<br />
<br />
Start Windows applications with Optimus:<br />
<br />
$ optirun wine ''windows application''.exe<br />
<br />
Use NVIDIA Settings with Optimus:<br />
<br />
$ optirun -b none nvidia-settings -c :8<br />
<br />
For a list of options for {{ic|optirun}} view its manual page.<br />
<br />
A new program is soon becoming the default choice because of better performance, namely<br />
primus. Currently you need to run this program separately (it does not accept options<br />
unlike {{ic|optirun}}), but in the future it will be started by optirun. Usage:<br />
$ primusrun glxgears<br />
<br />
== Configuration ==<br />
<br />
You can configure the behaviour of Bumblebee to fit your needs. Fine tuning like speed optimization, power management and other stuff can be configured in {{ic|/etc/bumblebee/bumblebee.conf}}<br />
<br />
=== Optimizing speed when using VirtualGL as bridge ===<br />
<br />
Bumblebee renders frames for your Optimus NVIDIA card in an invisible X Server with VirtualGL and transports them back to your visible X Server.<br />
<br />
Frames will be compressed before they are transported - this saves bandwidth and can be used for speed-up optimization of bumblebee:<br />
<br />
To use an other compression method for a single application:<br />
<br />
$ optirun -c ''compress-method'' application<br />
<br />
The method of compres will affect performance in the GPU/GPU usage. Compressed methods (such as {{ic|jpeg}}) will load the CPU the most but will load GPU the minimum necessary; uncompressed methods loads the most on GPU and the CPU will have the minimum load possible.<br />
<br />
Compressed methods are: {{ic|jpeg}}, {{ic|rgb}}, {{ic|yuv}}.<br />
<br />
Uncompressed methods are: {{ic|proxy}}, {{ic|xv}}.<br />
<br />
To use a standard compression for all applications set the {{ic|VGLTransport}} to {{ic|''compress-method''}} in {{ic|/etc/bumblebee/bumblebee.conf}}:<br />
<br />
{{hc|/etc/bumblebee/bumblebee.conf|2=<br />
[...]<br />
[optirun]<br />
VGLTransport=proxy<br />
[...]<br />
}}<br />
<br />
You can also play with the way VirtualGL reads back the pixels from your graphic card. Setting {{ic|VGL_READBACK}} environment variable to {{ic|pbo}} should increase the performance. Compare these two:<br />
<br />
# PBO should be faster.<br />
VGL_READBACK=pbo optirun glxspheres<br />
# The default value is sync.<br />
VGL_READBACK=sync optirun glxspheres<br />
<br />
{{Note|CPU frequency scaling will affect directly on render performance}}<br />
<br />
=== Power management ===<br />
<br />
The goal of power management feature is to turn off the NVIDIA card when it is not used by bumblebee any more.<br />
If bbswitch is installed, it will be detected automatically when the Bumblebee daemon starts. No additional<br />
configuration is necessary.<br />
<br />
==== Default power state of NVIDIA card using bbswitch ====<br />
<br />
The default behavior of bbswitch is to leave the card power state unchanged. {{ic|bumblebeed}} does disable<br />
the card when started, so the following is only necessary if you use bbswitch without bumblebeed.<br />
<br />
Set {{ic|load_state}} and {{ic|unload_state}} module options according to your needs (see [https://github.com/Bumblebee-Project/bbswitch bbswitch documentation]).<br />
{{hc|/etc/modprobe.d/bbswitch.conf|2=<br />
options bbswitch load_state=0 unload_state=1<br />
}}<br />
<br />
==== Enable NVIDIA card during shutdown ====<br />
The NVIDIA card may not correctly initialize during boot if the card was powered off when the system was last shutdown. One option is to set {{ic|TurnCardOffAtExit&#61;false}} in {{ic|/etc/bumblebee/bumblebee.conf}}, however this will enable the card everytime you stop the Bumblebee daemon, even if done manually. To ensure that the NVIDIA card is always powered on during shutdown, add the following [[systemd]] service (if using {{pkg|bbswitch}}):<br />
<br />
{{hc|/etc/systemd/system/nvidia-enable.service|2=<br />
[Unit]<br />
Description=Enable NVIDIA card<br />
DefaultDependencies=no<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/bin/sh -c 'echo ON > /proc/acpi/bbswitch'<br />
<br />
[Install]<br />
WantedBy=shutdown.target<br />
}}<br />
<br />
Then enable the service by running {{ic|systemctl enable nvidia-enable.service}} at the root prompt.<br />
<br />
=== Multiple monitors ===<br />
<br />
==== Outputs wired to the Intel chip ====<br />
<br />
If the port (DisplayPort/HDMI/VGA) is wired to the Intel chip, you can set up multiple monitors with xorg.conf. Set them to use the Intel card, but Bumblebee can still use the NVIDIA card. One example configuration is below for two identical screens with 1080p resolution and using the HDMI out.<br />
<br />
{{hc|/etc/X11/xorg.conf|2=<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "intelgpu0"<br />
Monitor "Monitor0"<br />
DefaultDepth 24<br />
Option "TwinView" "0"<br />
SubSection "Display"<br />
Depth 24<br />
Modes "1980x1080_60.00"<br />
EndSubSection<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Screen1"<br />
Device "intelgpu1"<br />
Monitor "Monitor1"<br />
DefaultDepth 24<br />
Option "TwinView" "0"<br />
SubSection "Display"<br />
Depth 24<br />
Modes "1980x1080_60.00"<br />
EndSubSection<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor0"<br />
Option "Enable" "true"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Monitor1"<br />
Option "Enable" "true"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "intelgpu0"<br />
Driver "intel"<br />
Option "XvMC" "true"<br />
Option "UseEvents" "true"<br />
Option "AccelMethod" "UXA"<br />
BusID "PCI:0:2:0"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "intelgpu1"<br />
Driver "intel"<br />
Option "XvMC" "true"<br />
Option "UseEvents" "true"<br />
Option "AccelMethod" "UXA"<br />
BusID "PCI:0:2:0"<br />
EndSection<br />
<br />
Section "Device"<br />
Identifier "nvidiagpu1"<br />
Driver "nvidia"<br />
BusID "PCI:0:1:0"<br />
EndSection<br />
<br />
}}<br />
<br />
You need to probably change the BusID for both the Intel and the NVIDIA card.<br />
<br />
{{hc|<nowiki>$ lspci | grep VGA</nowiki>|<br />
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)<br />
}}<br />
<br />
The BusID is 0:2:0<br />
<br />
==== Output wired to the NVIDIA chip ====<br />
<br />
On some notebooks, the digital Video Output (HDMI or DisplayPort) is hardwired to the NVIDIA chip. If you want to use all the displays on such a system simultaniously, you have to run 2 X Servers. The first will be using the Intel driver for the notebooks panel and a display connected on VGA. The second will be started through optirun on the NVIDIA card, and drives the digital display.<br />
<br />
There are currently several instructions on the web how such a setup can be made to work. One can be found on the bumblebee [https://github.com/Bumblebee-Project/Bumblebee/wiki/Multi-monitor-setup wiki page]. Another approach is described below.<br />
<br />
===== xf86-video-intel-virtual-crtc and hybrid-screenclone =====<br />
<br />
This method uses a patched Intel driver, which is extended to have a VIRTUAL Display, and the program hybrid-screenclone which is used to copy the display over from the virtual display to a second X Server which is running on the NVIDIA card using Optirun. Credit goes to [http://judsonsnotes.com/notes/index.php?option=com_content&view=article&id=673:triple-head-monitors-on-thinkpad-t520&catid=37:tech-notes&Itemid=59 Triple-head monitors on a Thinkpad T520] which has a detailed explanation on how this is done on a Ubuntu system.<br />
<br />
For simplicity, DP is used below to refer to the Digital Output (DisplayPort). The instructions should be the same if the notebook has a HDMI port instead.<br />
<br />
* Set system to use NVIDIA card exclusively, test DP/Monitor combination and generate xorg.nvidia.conf. This step is not required, but recommended if your system Bios has an option to switch the graphics into NVIDIA-only mode. To do this, first uninstall the bumblebee package and install just the NVIDIA driver. Then reboot, enter the Bios and switch the Graphics to NVIDIA-only. When back in Arch, connect you Monitor on DP and use startx to test if it is working in principle. Use Xorg -configure to generate an xorg.conf file for your NVIDIA card. This will come in handy further down below.<br />
<br />
* Reinstall bumlbebee and bbswitch, reboot and set the system Gfx back to Hybrid in the BIOS. <br />
* Install {{AUR|xf86-video-intel-virtual-crtc}}, and replace your xf86-video-intel package with it.<br />
* Install {{AUR|screenclone-git}}<br />
* Change these bumblebee.conf settings:<br />
{{hc|/etc/bumblebee/bumblebee.conf|2=<br />
KeepUnusedXServer=true<br />
Driver=nvidia<br />
}}<br />
{{Note|Leave the PMMethod set to "bumblebee". This is contrary to the instructions linked in the article above, but on arch this options needs to be left alone so that bbswitch module is automatically loaded}}<br />
* Copy the xorg.conf generated in Step 1 to {{ic|/etc/X11}} (e.g. {{ic|/etc/X11/xorg.nvidia.conf}}). In the [driver-nvidia] section of {{ic|bumblebee.conf}}, change {{ic|XorgConfFile}} to point to it.<br />
* Test if your {{ic|/etc/X11/xorg.nvidia.conf}} is working with {{ic|startx -- -config /etc/X11/xorg.nvidia.conf}}<br />
* In order for your DP Monitor to show up with the correct resolution in your VIRTUAL Display you might have to edit the Monitor section in your {{ic|/etc/xorg.nvidia.conf}}. Since this is extra work, you could try to continue with your auto-generated file. Come back to this step in the instructions if you find that the resolution of the VIRTUAL Display as shown by xrandr is not correct.<br />
** First you have to generate a Modeline. You can use the tool [http://amlc.berlios.de/ amlc], which will genearte a Modeline if you input a few basic parameters. <br />
<br />
::Example: 24" 1920x1080 Monitor<br />
::start the tool with {{ic|amlc -c}}<br />
{{bc|Monitor Identifier: Samsung 2494<br />
Aspect Ratio: 2<br />
physical size[cm]: 60<br />
Ideal refresh rate, in Hz: 60<br />
min HSync, kHz: 40<br />
max HSync, kHz: 90<br />
min VSync, Hz: 50<br />
max VSync, Hz: 70<br />
max pixel Clock, MHz: 400}}<br />
<br />
This is the Monitor section which {{ic|amlc}} generated for this input:<br />
{{bc|Section "Monitor"<br />
Identifier "Samsung 2494"<br />
ModelName "Generated by Another Modeline Calculator"<br />
HorizSync 40-90<br />
VertRefresh 50-70<br />
DisplaySize 532 299 # Aspect ratio 1.778:1<br />
# Custom modes<br />
Modeline "1920x1080" 174.83 1920 2056 2248 2536 1080 1081 1084 1149 # 174.83 MHz, 68.94 kHz, 60.00 Hz<br />
EndSection # Samsung 2494}}<br />
<br />
Change your {{ic|xorg.nvidia.conf}} to include this Monitor section. You can also trim down your file so that it only contains ServerLayout, Monitor, Device and Screen sections. For reference, here is mine:<br />
{{hc|/etc/X11/xorg.nvidia.conf|<br />
Section "ServerLayout"<br />
Identifier "X.org Nvidia DP"<br />
Screen 0 "Screen0" 0 0<br />
InputDevice "Mouse0" "CorePointer"<br />
InputDevice "Keyboard0" "CoreKeyboard"<br />
EndSection<br />
<br />
Section "Monitor"<br />
Identifier "Samsung 2494"<br />
ModelName "Generated by Another Modeline Calculator"<br />
HorizSync 40-90<br />
VertRefresh 50-70<br />
DisplaySize 532 299 # Aspect ratio 1.778:1<br />
# Custom modes<br />
Modeline "1920x1080" 174.83 1920 2056 2248 2536 1080 1081 1084 1149 # 174.83 MHz, 68.94 kHz, 60.00 Hz<br />
EndSection # Samsung 2494<br />
<br />
Section "Device"<br />
Identifier "DiscreteNvidia"<br />
Driver "nvidia"<br />
BusID "PCI:1:0:0"<br />
EndSection<br />
<br />
Section "Screen"<br />
Identifier "Screen0"<br />
Device "DiscreteNvidia"<br />
Monitor "Samsung 2494"<br />
SubSection "Display"<br />
Viewport 0 0<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
}}<br />
* Plug in both external monitors and startx. Look at your {{ic|/var/log/Xorg.0.log}}. Check that your VGA Monitor is detected with the correct Modes there. You should also see a VIRTUAL output with modes show up.<br />
* Run {{ic|xrandr}} and three displays should be listed there, along with the supported modes.<br />
* If the listed Modelines for your VIRTUAL display doesn't have your Monitors native resolution, make note of the exact output name. For me that is {{ic|VIRTUAL1}}. Then have a look again in the Xorg.0.log file. You should see a message: "Output VIRTUAL1 has no monitor section" there. We will change this by putting a file with the needed Monitor section into {{ic|/etc/X11/xorg.conf.d}}. Exit and Restart X afterward.<br />
{{hc|/etc/X11/xorg.conf.d/20-monitor_samsung.conf|<br />
Section "Monitor"<br />
Identifier "VIRTUAL1"<br />
ModelName "Generated by Another Modeline Calculator"<br />
HorizSync 40-90<br />
VertRefresh 50-70<br />
DisplaySize 532 299 # Aspect ratio 1.778:1<br />
# Custom modes<br />
Modeline "1920x1080" 174.83 1920 2056 2248 2536 1080 1081 1084 1149 # 174.83 MHz, 68.94 kHz, 60.00 Hz<br />
EndSection # Samsung 2494<br />
}}<br />
* Turn the NVIDIA card on by running: {{ic|sudo tee /proc/acpi/bbswitch <<< ON}}<br />
* Start another X server for the DisplayPort monitor: {{ic|sudo optirun true}}<br />
* Check the log of the second X server in {{ic|/var/log/Xorg.8.log}}<br />
* Run xrandr to set up the VIRTUAL display to be the right size and placement, eg.: {{ic|xrandr --output VGA1 --auto --rotate normal --pos 0x0 --output VIRTUAL1 --mode 1920x1080 --right-of VGA1 --output LVDS1 --auto --rotate normal --right-of VIRTUAL1}}<br />
* Take note of the position of the VIRTUAL display in the list of Outputs as shown by xrandr. The counting starts from zero, i.e. if it is the third display shown, you would specify {{ic|-x 2}} as parameter to {{ic|screenclone}} (Note: This might not always be correct. If you see your internal laptop display cloned on the monitor, try {{ic|-x 2}} anyway.)<br />
* Clone the contents of the VIRTUAL display onto the X server created by bumblebee, which is connected to the DisplayPort monitor via the NVIDIA chip:<br />
: {{ic|screenclone -d :8 -x 2}}<br />
<br />
Thats it, all three displays should be up and running now.<br />
<br />
== Switch between discrete and integrated like Windows==<br />
<br />
In Windows, the way that Optimus works is NVIDIA has a whitelist of applications that require Optimus for, and you can add applications to this whitelist as needed. When you launch the application, it automatically decides which card to use.<br />
<br />
To mimic this behavior in Linux, you can use {{AUR|libgl-switcheroo-git}}. After installing, you can add the below in your .xprofile.<br />
<br />
{{hc|~/.xprofile|2=<br />
mkdir -p /tmp/libgl-switcheroo-$USER/fs<br />
gtkglswitch &<br />
libgl-switcheroo /tmp/libgl-switcheroo-$USER/fs &<br />
}}<br />
<br />
To enable this, you must add the below to the shell that you intend to launch applications from (I simply added it to the .xprofile file)<br />
export LD_LIBRARY_PATH=/tmp/libgl-switcheroo-$USER/fs/\$LIB${LD_LIBRARY_PATH+:}$LD_LIBRARY_PATH<br />
<br />
Once this has all been done, every application you launch from this shell will pop up a GTK+ window asking which card you want to run it with (you can also add an application to the whitelist in the configuration). The configuration is located in {{ic|$XDG_CONFIG_HOME/libgl-switcheroo.conf}}, usually {{ic|~/.config/libgl-switcheroo.conf}}<br />
<br />
== CUDA without Bumblebee==<br />
<br />
This is not well documented, but you do not need Bumblebee to use CUDA and it may work even on machines where optirun fails. For a guide on how to get it working with the Lenovo IdeaPad Y580 (which uses the GeForce 660M), see: https://wiki.archlinux.org/index.php/Lenovo_IdeaPad_Y580#NVIDIA_Card. Those instructions are very likely to work with other machines.<br />
<br />
== Troubleshooting ==<br />
<br />
{{Note|Please report bugs at [https://github.com/Bumblebee-Project/Bumblebee Bumblebee-Project]'s GitHub tracker as described in its [https://github.com/Bumblebee-Project/Bumblebee/wiki/Reporting-Issues wiki].}}<br />
<br />
=== [VGL] ERROR: Could not open display :8 ===<br />
<br />
There is a known problem with some wine applications that fork and kill the parent process without keeping track of it (for example the free to play online game "Runes of Magic")<br />
<br />
This is a known problem with VirtualGL. As of bumblebee 3.1, so long as you have it installed, you can use Primus as your render bridge:<br />
<br />
$ optirun -b primus wine ''windows program''.exe<br />
<br />
If this does not work, an alternative walkaround for this problem is:<br />
<br />
$ optirun bash<br />
$ optirun wine ''windows program''.exe<br />
<br />
If using NVIDIA drivers a fix for this problem is to edit {{ic|/etc/bumblebee/xorg.conf.nvidia}} and change Option {{ic|ConnectedMonitor}} to {{ic|CRT-0}}.<br />
<br />
=== [ERROR]Cannot access secondary GPU ===<br />
<br />
==== No devices detected ====<br />
<br />
In some instances, running optirun will return:<br />
<br />
[ERROR]Cannot access secondary GPU - error: [XORG] (EE) No devices detected.<br />
[ERROR]Aborting because fallback start is disabled.<br />
<br />
In this case, you will need to move the file {{ic|/etc/X11/xorg.conf.d/20-intel.conf}} to somewhere else. Restart the bumblebeed daemon, and it should work. If you do need to change some features on Intel module, a workaround is to move your {{ic|/etc/X11/xorg.conf.d/20-intel.conf}} to {{ic|/etc/X11/xorg.conf}}.<br />
<br />
It could be also necessary to comment the driver line in {{ic|/etc/X11/xorg.conf.d/10-monitor.conf}}.<br />
<br />
If you're using the nouveau driver you could try switching to the nVidia driver.<br />
<br />
You might need to define the NVIDIA card somewhere (e.g. file {{ic|/etc/X11/xorg.conf.d}}), and remember to change the BusID using lspci.<br />
<br />
{{bc|<br />
Section "Device"<br />
Identifier "nvidiagpu1"<br />
Driver "nvidia"<br />
BusID "PCI:0:1:0"<br />
EndSection<br />
}}<br />
<br />
==== NVIDIA(0): Failed to assign any connected display devices to X screen 0 ====<br />
<br />
If the console output is:<br />
<br />
[ERROR]Cannot access secondary GPU - error: [XORG] (EE) NVIDIA(0): Failed to assign any connected display devices to X screen 0<br />
[ERROR]Aborting because fallback start is disabled.<br />
<br />
<br />
You can change this line in {{ic|/etc/bumblebee/xorg.conf.nvidia}}:<br />
<br />
Option "ConnectedMonitor" "DFP"<br />
<br />
to:<br />
<br />
Option "ConnectedMonitor" "CRT"<br />
<br />
==== Could not load GPU driver ====<br />
<br />
If the console output is:<br />
<br />
[ERROR]Cannot access secondary GPU - error: Could not load GPU driver<br />
<br />
and if you try to load the nvidia module you get:<br />
<br />
modprobe nvidia<br />
modprobe: ERROR: could not insert 'nvidia': Exec format error<br />
<br />
You should try manually compiling the nvidia packages against your current kernel.<br />
<br />
yaourt -Sb nvidia<br />
<br />
Should do the trick<br />
<br />
=== ERROR: ld.so: object 'libdlfaker.so' from LD_PRELOAD cannot be preloaded: ignored ===<br />
<br />
You probably want to start a 32-bit application with bumblebee on a 64-bit system. See the "Note" box in [[#Installation|Installation]].<br />
<br />
=== Fatal IO error 11 (Resource temporarily unavailable) on X server ===<br />
<br />
Change {{ic|KeepUnusedXServer}} in {{ic|/etc/bumblebee/bumblebee.conf}} from {{ic|false}} to {{ic|true}}. Your program forks into background and bumblebee don't know anything about it.<br />
<br />
=== Video tearing ===<br />
<br />
Video tearing is a somewhat common problem on Bumblebee. To fix it, you need to enable vsync. It should be enabled by default on the Intel card, but verify that from Xorg logs. To check whether or not it is enabled for NVIDIA, run: <br />
<br />
$ optirun nvidia-settings -c :8<br />
<br />
{{ic|1=X Server XVideo Settings -> Sync to VBlank}} and {{ic|1=OpenGL Settings -> Sync to VBlank}} should both be enabled. The Intel card has in general less tearing, so use it for video playback. Especially use VA-API for video decoding (e.g. {{ic|mplayer-vaapi}} and with {{ic|-vsync}} parameter).<br />
<br />
Refer to the [[Intel#Video_tearing|Intel]] article on how to fix tearing on the Intel card.<br />
<br />
If it is still not fixed, try to disable compositing from your desktop environment. Try also disabling triple buffering.<br />
<br />
=== Bumblebee cannot connect to socket ===<br />
<br />
You might get something like:<br />
<br />
{{hc|$ optirun glxspheres|<br />
[ 1648.179533] [ERROR]You've no permission to communicate with the Bumblebee daemon. Try adding yourself to the 'bumblebee' group<br />
[ 1648.179628] [ERROR]Could not connect to bumblebee daemon - is it running?<br />
}}<br />
<br />
If you are already in the {{ic|bumblebee}} group ({{ic|<nowiki>$ groups | grep bumblebee</nowiki>}}), you may try [https://bbs.archlinux.org/viewtopic.php?pid=1178729#p1178729 removing the socket] {{ic|/var/run/bumblebeed.socket}}.<br />
<br />
== See also ==<br />
<br />
* [http://www.bumblebee-project.org Bumblebee project repository]<br />
* [http://wiki.bumblebee-project.org/ Bumblebee project wiki]<br />
* [https://github.com/Bumblebee-Project/bbswitch Bumblebee project bbswitch repository]<br />
<br />
Join us at #bumblebee at freenode.net.</div>Iemesis