Bumblebee fails to run optirun. [XORG]

Hi everybody.

Installed nvidia drivers, bumblebee, battery life is ~5 hours. That means that dGPU (nvidia gtx 1050) is being controlled (at least it’s power).
But when I try to run optirun, i face next problem:

[15054.512424] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) Screen 0 deleted because of no matching config section.

[15054.512464] [ERROR]Aborting because fallback start is disabled.

Here’s /var/log/Xorg.8.log

[ 15192.252]    ABI class: X.Org ANSI C Emulation, version 0.4
[ 15192.252] (II) Loading sub module "ramdac"
[ 15192.252] (II) LoadModule: "ramdac"
[ 15192.252] (II) Module "ramdac" already built-in
[ 15192.253] (EE) Screen 0 deleted because of no matching config section.
[ 15192.253] (II) UnloadModule: "nvidia"
[ 15192.253] (II) UnloadSubModule: "wfb"
[ 15192.253] (II) UnloadSubModule: "fb"
[ 15192.253] (EE) Device(s) detected, but none match those in the config file.
[ 15192.253] (EE)
Fatal server error:
[ 15192.253] (EE) no screens found(EE)
[ 15192.253] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[ 15192.253] (EE) Please also check the log file at "/var/log/Xorg.8.log" for additional information.
[ 15192.253] (EE)
[ 15192.253] (EE) Server terminated with error (1). Closing log file.

Googling didn’t lead me to anything.

Thanks for help.

Quick update:

I had custom 20-intel.conf file in /usr/share/X11/xorg.conf.d/ folder, for Tearing fix. Here’s it:

Section "Device"
    Identifier "Intel Graphics"
    Driver "intel"
    Option "Backlight" "intel_backlight"
    Option "AccelMethod" "sna"
    Option "TearFree" "true"
    Option "DRI" "3"

For some reason this configuration doesn’t let optirun open things. Without that file everything works.

Hi, i had the same issue with screen tearing when i played video but to solve it i used another solution than yours, maybe it will sove your issues.

Here is how i did it:

sudo mkdir -p /etc/X11/xorg.conf.d/

then i created a file called 20-intel.conf:

sudo nano /etc/X11/xorg.conf.d/20-intel.conf

and i put this inside of the file:

Section “Device”
Identifier “Intel Graphics”
Driver “intel”
Option “TearFree” “true”

Then log out and log back in and it should work.

To make it work i think you have to remove the custom file you created and run update-initramfs -u.

To be honest this solution is not mine here is the Tutorial i followed back then:

I just tried it, the result is X now doesn’t start.

So i removed that file. Here’s log:

[    12.723]
X.Org X Server 1.20.3
X Protocol Version 11, Revision 0
[    12.724] Build Operating System: Linux 4.9.0-8-amd64 x86_64 Debian
[    12.724] Current Operating System: Linux parrot 4.19.0-parrot1-13t-amd64 #1 SMP Debian 4.19.13-1parrot1.13t (2019-01-09) x86_64
[    12.724] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.19.0-parrot1-13t-amd64 root=UUID=9ab75c9e-5955-48ec-b114-520b771c1fc2 ro quiet splash noautomount quiet
[    12.724] Build Date: 25 October 2018  06:15:23PM
[    12.724] xorg-server 2:1.20.3-1 (https://www.debian.org/support)
[    12.724] Current version of pixman: 0.36.0
[    12.724]    Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[    12.724] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    12.724] (==) Log file: "/var/log/Xorg.0.log", Time: Wed Feb  6 21:58:28 2019
[    12.724] (==) Using config directory: "/etc/X11/xorg.conf.d"
[    12.724] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    12.724] Parse error on line 1 of section InputClass in file /etc/X11/xorg.conf.d/20-intel.conf
        The Section keyword requires a quoted string to follow it.
[    12.724] (EE) Problem parsing the config file
[    12.724] (EE) Error parsing the config file
[    12.724] (EE)
Fatal server error:
[    12.724] (EE) no screens found(EE)
[    12.724] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[    12.724] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    12.724] (EE)
[    12.724] (EE) Server terminated with error (1). Closing log file.

Did you ran sudo update-initramfs -u after removing the file ?

No, why should I? Xserver is somehow linked to initrd?
What’s interesting, in vim EndSection is marked with red color in vim.

quick update: red color is fine.

I was talking about this file, you have to run sudo update-initramfs -u after removing it

I didn’t, but I will try in a minute.

Just tried that, same results with no screens found error.

A this point i dont know if it comes from bumblebee or not, i would say run:

sudo apt purge bumblebee* primus*

This can’t be the answer, I have a clean install of those. All modifications I did was that file.

I think the problem may lay in Screen detection somewhere in Xorg configs. There has to be a default config file which autodetects screens, and cards, and when you create this section I think it overrides default config, and by not mentioning Screen, we are breaking this up.

The problem was fixed by adding default section in /etc/bumblebee/xorg.conf.nvidia.
Bumblebee didn’t know “Screen” section for nvidia card. So append this file with that:

Section "Screen"
    Identifier "Default Screen"
    Device "DiscreteNvidia"



Still don’t understand why you have to run sudo update-initramfs -u after adding changes to XServer. X is being loaded after all modules, at the end of booting, when initrd is running at the start to make a temporary filesystem. I think it’s not necessary to update it after modyfying X.

1 Like

I was pretty sure i did read that somewhere, you must be right and i must be wrong.

1 Like

That’s ok :blush:

1 Like

I get the same issue too, but I noticed that when I just run “glxgears” instead of “optirun glxgears” it works. Also had errors when trying to install nvidia-cuda-toolkit.