I'm trying to get the optirun command to work with the FOSS Nouveau drivers on my computer that has an embeddded graphics unit and a discrete graphics processing unit. Here's my setup provided by the lspci | egrep -i 'vga|3d'command:

00:02.0 VGA compatible controller: Intel Corporation Skylake GT2 [HD Graphics 520] (rev 07)
01:00.0 3D controller: NVIDIA Corporation GK208BM [GeForce 920M] (rev a1)

According to the Nouveau CodeNames website page, my GPU is supported by the NV108 (GK208) Nouveau driver. So there's no reason why I can't make it work with the optirun command, right? However, after having followed the classic installation procedure

  1. uninstall proprietary drivers
  2. install bumblebee & mesa-utils packages
  3. install VirtualGL

I can't get the optirun command to work. As an example, optirun glxgears gives the error

[ERROR]Cannot access secondary GPU - error: [XORG] (EE) 
[ERROR]Aborting because fallback start is disabled

The problem seems to be with the Nouveau module in the kernel:

$ optirun -vv glxgears
[DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[DEBUG]optirun version 3.2.1 starting...
[DEBUG]Active configuration:
[DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[DEBUG] X display: :8
[DEBUG] Socket path: /var/run/bumblebee.socket
[DEBUG] Accel/display bridge: auto
[DEBUG] VGL Compression: proxy
[DEBUG] VGLrun extra options: 
[DEBUG] Primus LD Path: /usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus:/usr/lib/primus:/usr/lib32/primus
[DEBUG]Using auto-detected bridge virtualgl
[INFO]Response: No - error: [XORG] (EE) 
[ERROR]Cannot access secondary GPU - error: [XORG] (EE) 
[DEBUG]Socket closed.
[ERROR]Aborting because fallback start is disabled.
[DEBUG]Killing all remaining processes.

What I tried

I tried to force Optimus to use the Nouveau drivers in the /etc/bumblebee/bumblebee.conf by setting Driver=nouveau. It makes no difference.

What I fixed

Initially I had another error while executing the command:

[ERROR]Cannot access secondary GPU - error: [XORG] (EE) 
[ERROR]Failed to load module "mouse" (module does not exist, 0)

I fixed it by installing the missing package xserver-xorg-input-mouse.

1 Answer 1


I finally found a solution to my problem by continuing my research.

Solution: do not use Optimus to switch between GPU

The Primus and Optimus programs are made to be used with Nvidia proprietary drivers. It is therefore not recommended to use them with Nouveau drivers. The Linux kernel has tools that allow you to switch GPUs without installing additional programs. The tool in question is VGA Switcheroo. Note that this tool only works with open source drivers.

The tool may not be active by default on your system, some manipulations are then necessary. To check if the tool is enabled, look for the switch file with

# cat /sys/kernel/debug/vgaswitcheroo/switch

In my case, the tool was not activated, I just had to uninstall Bumblebee to fix the problem. If the problem persists after uninstalling Bumblebee, follow the instructions in this article.

Now that vga_switcheroo is enabled, you can switch off the active GPU with

# echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

and activate the dedicated card with

# echo DIS > /sys/kernel/debug/vgaswitcheroo/switch

or activate the integrated card with

# echo IGD > /sys/kernel/debug/vgaswitcheroo/switch


  • 1
    There are basically two ways of formatting your code snippets. 1) Do not add any language to your git-alike formatted lines. 2) Do not prepend the hash tag to the beginning of your code lines. Either way, good job. | +1 (I personally do not use the hash tag to stress the root lines) Commented Feb 26, 2020 at 12:52
  • Thanks for the formatting advice, I take note.
    – user382051
    Commented Feb 26, 2020 at 12:56

You must log in to answer this question.