You are not logged in.

#1 2021-11-21 10:45:56

kpj
Member
Registered: 2012-12-30
Posts: 19

[SOLVED] optirun fails with "No devices detected" after kernel upgrade

My laptop has the following GPUs:

$ lspci | egrep 'VGA|3D'
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 960M] (rev a2)

I initially installed Bumblebee following the Archlinux wiki instructions [0] and everything worked fine.
After upgrading my kernel (linux and linux-headers packages) from 5.14.15.arch1-1 to 5.15.3.arch1-1 my Bumblebee setup stopped working.

In particular, optirun is not able to find my secondary GPU anymore:

$ optirun glxgears
[  483.432610] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) No devices detected.

[  483.432631] [ERROR]Aborting because fallback start is disabled

I sifted through a couple of related threads [1-3] but couldn't find a solution for my problem.

For starters, here's the status of bumblebeed.service:

$ systemctl status bumblebeed
* bumblebeed.service - Bumblebee C Daemon
     Loaded: loaded (/usr/lib/systemd/system/bumblebeed.service; enabled; vendor preset: disabled)
     Active: active (running) since Sun 2021-11-21 10:20:49 UTC; 13min ago
   Main PID: 497 (bumblebeed)
      Tasks: 1 (limit: 19077)
     Memory: 28.2M
        CPU: 1.097s
     CGroup: /system.slice/bumblebeed.service
             `-497 /usr/bin/bumblebeed

Nov 21 10:33:47 bowtie bumblebeed[497]: [  791.586686] [WARN][XORG] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
Nov 21 10:33:47 bowtie bumblebeed[497]: [  791.586704] [WARN][XORG] (WW) Warning, couldn't open module mouse
Nov 21 10:33:47 bowtie bumblebeed[497]: [  791.586709] [ERROR][XORG] (EE) No devices detected.
Nov 21 10:33:47 bowtie bumblebeed[497]: [  791.586713] [ERROR][XORG] (EE)
Nov 21 10:33:47 bowtie bumblebeed[497]: [  791.586717] [ERROR][XORG] (EE) no screens found(EE)
Nov 21 10:33:47 bowtie bumblebeed[497]: [  791.586720] [ERROR][XORG] (EE)
Nov 21 10:33:47 bowtie bumblebeed[497]: [  791.586725] [ERROR][XORG] (EE) Please also check the log file at "/var/log/Xorg.8.log" for additional information.
Nov 21 10:33:47 bowtie bumblebeed[497]: [  791.586728] [ERROR][XORG] (EE)
Nov 21 10:33:47 bowtie bumblebeed[497]: [  791.586731] [ERROR][XORG] (EE) Server terminated with error (1). Closing log file.
Nov 21 10:33:47 bowtie bumblebeed[497]: [  791.586735] [ERROR]X did not start properly

Here's my Xorg (/var/log/Xorg.8.log) log:

X.Org X Server 1.21.1.1
X Protocol Version 11, Revision 0
[   791.580] Current Operating System: Linux bowtie 5.15.3-arch1-1 #1 SMP PREEMPT Thu, 18 Nov 2021 22:23:08 +0000 x86_64
[   791.580] Kernel command line: BOOT_IMAGE=../vmlinuz-linux root=/dev/mapper/rootfs rw cryptdevice=/dev/sda2:rootfs allow-discards initrd=../initramfs-linux.img
[   791.580]  
[   791.580] Current version of pixman: 0.40.0
[   791.580] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[   791.580] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   791.580] (==) Log file: "/var/log/Xorg.8.log", Time: Sun Nov 21 10:33:47 2021
[   791.580] (++) Using config file: "/etc/bumblebee/xorg.conf.nvidia"
[   791.580] (++) Using config directory: "/etc/bumblebee/xorg.conf.d"
[   791.580] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[   791.580] (==) ServerLayout "Layout0"
[   791.580] (==) No screen section available. Using defaults.
[   791.580] (**) |-->Screen "Default Screen Section" (0)
[   791.580] (**) |   |-->Monitor "<default monitor>"
[   791.580] (==) No device specified for screen "Default Screen Section".
	Using the first device section listed.
[   791.580] (**) |   |-->Device "DiscreteNvidia"
[   791.580] (==) No monitor specified for screen "Default Screen Section".
	Using a default monitor configuration.
[   791.580] (**) Option "AutoAddDevices" "false"
[   791.580] (**) Option "AutoAddGPU" "false"
[   791.580] (**) Not automatically adding devices
[   791.580] (==) Automatically enabling devices
[   791.580] (**) Not automatically adding GPU devices
[   791.580] (==) Automatically binding GPU devices
[   791.580] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   791.580] (WW) The directory "/usr/share/fonts/misc" does not exist.
[   791.580] 	Entry deleted from font path.
[   791.580] (WW) The directory "/usr/share/fonts/TTF" does not exist.
[   791.580] 	Entry deleted from font path.
[   791.580] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[   791.580] 	Entry deleted from font path.
[   791.580] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[   791.580] 	Entry deleted from font path.
[   791.580] (==) FontPath set to:
	/usr/share/fonts/100dpi,
	/usr/share/fonts/75dpi
[   791.580] (++) ModulePath set to "/usr/lib/nvidia/xorg,/usr/lib/xorg/modules"
[   791.580] (==) |-->Input Device "<default pointer>"
[   791.580] (==) |-->Input Device "<default keyboard>"
[   791.580] (==) The core pointer device wasn't specified explicitly in the layout.
	Using the default mouse configuration.
[   791.580] (==) The core keyboard device wasn't specified explicitly in the layout.
	Using the default keyboard configuration.
[   791.580] (II) Module ABI versions:
[   791.580] 	X.Org ANSI C Emulation: 0.4
[   791.580] 	X.Org Video Driver: 25.2
[   791.580] 	X.Org XInput driver : 24.4
[   791.580] 	X.Org Server Extension : 10.0
[   791.581] (--) using VT number 1

[   791.581] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[   791.581] (II) xfree86: Adding drm device (/dev/dri/card0)
[   791.581] (II) Platform probe for /sys/devices/pci0000:00/0000:00:02.0/drm/card0
[   791.583] (--) PCI: (1@0:0:0) 10de:139b:17aa:3978 rev 162, Mem @ 0xd0000000/16777216, 0xa0000000/268435456, 0xb0000000/33554432, I/O @ 0x00004000/128, BIOS @ 0x????????/524288
[   791.583] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[   791.583] (II) LoadModule: "glx"
[   791.583] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[   791.585] (II) Module glx: vendor="X.Org Foundation"
[   791.585] 	compiled for 1.21.1.1, module version = 1.0.0
[   791.585] 	ABI class: X.Org Server Extension, version 10.0
[   791.585] (II) LoadModule: "nvidia"
[   791.585] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[   791.585] (II) Module nvidia: vendor="NVIDIA Corporation"
[   791.585] 	compiled for 1.6.99.901, module version = 1.0.0
[   791.585] 	Module class: X.Org Video Driver
[   791.585] (II) LoadModule: "mouse"
[   791.585] (WW) Warning, couldn't open module mouse
[   791.585] (EE) Failed to load module "mouse" (module does not exist, 0)
[   791.585] (II) LoadModule: "kbd"
[   791.585] (WW) Warning, couldn't open module kbd
[   791.585] (EE) Failed to load module "kbd" (module does not exist, 0)
[   791.585] (II) NVIDIA dlloader X Driver  495.44  Fri Oct 22 06:11:21 UTC 2021
[   791.585] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[   791.585] (EE) No devices detected.
[   791.585] (EE) 
Fatal server error:
[   791.585] (EE) no screens found(EE) 
[   791.585] (EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[   791.585] (EE) Please also check the log file at "/var/log/Xorg.8.log" for additional information.
[   791.585] (EE) 
[   791.586] (EE) Server terminated with error (1). Closing log file.

And here some information on my secondary GPU:

$ lspci -v -s 01:00.0
01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 960M] (rev a2)
	Subsystem: Lenovo Device 3978
	Flags: bus master, fast devsel, latency 0, IRQ 16
	Memory at d0000000 (32-bit, non-prefetchable) [size=16M]
	Memory at a0000000 (64-bit, prefetchable) [size=256M]
	Memory at b0000000 (64-bit, prefetchable) [size=32M]
	I/O ports at 4000 [size=128]
	Expansion ROM at b2000000 [disabled] [size=512K]
	Capabilities: <access denied>
	Kernel driver in use: nvidia
	Kernel modules: nouveau, nvidia_drm, nvidia

/etc/X11/xorg.conf.d is empty. /etc/bumblebee/xorg.conf.d/10-dummy.conf is an empty file, no other files in /etc/bumblebee/xorg.conf.d/.

My preliminary investigation:

* because

[   791.581] (II) Platform probe for /sys/devices/pci0000:00/0000:00:02.0/drm/card0
[   791.583] (--) PCI: (1@0:0:0) 10de:139b:17aa:3978 rev 162, Mem @ 0xd0000000/16777216, 0xa0000000/268435456, 0xb0000000/33554432, I/O @ 0x00004000/128, BIOS @ 0x????????/524288

is in the Xorg log, my secondary GPU is still detected and not "completely" broken.
* nvidia-smi seems to detect my GPU, and according to bbswitch it is turned on

$ nvidia-smi
Sun Nov 21 10:42:56 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 495.44       Driver Version: 495.44       CUDA Version: 11.5     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   43C    P0    N/A /  N/A |      0MiB /  4046MiB |      1%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+
$ cat /proc/acpi/bbswitch 
0000:01:00.0 ON

. So again, some kind of communication with the hardware seems possible?


At this point I do not know what to check next and would be very grateful for any pointers!


[0] https://wiki.archlinux.org/title/bumblebee
[1] https://bbs.archlinux.org/viewtopic.php?id=258758
[2] https://bbs.archlinux.org/viewtopic.php?id=236077
[3] https://bbs.archlinux.org/viewtopic.php?id=205215

Last edited by kpj (2021-11-21 13:49:49)

Offline

#2 2021-11-21 12:38:39

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,820
Website

Re: [SOLVED] optirun fails with "No devices detected" after kernel upgrade

I had the same problem a few days ago, and unfortunately right at the moment when I was supposed to launch something with a non-Linux user, thus reenforcing the idea that Linux is unreliable and requires constant tinkering hmm

I solved it by adding the BusID to /etc/bumblebee/xorg.conf.nvidia. Note that you have to change the final "." to a ":" when adding it to the file. In your case, with

01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 960M] (rev a2)

you should add

    BusID "PCI:01:00:0"

under the "Device" section in /etc/bumblebee/xorg.conf.nvidia.

edit
Incidentally, that file is mentioned in your Xorg log.

Last edited by Xyne (2021-11-21 12:39:32)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Online

#3 2021-11-21 13:47:29

kpj
Member
Registered: 2012-12-30
Posts: 19

Re: [SOLVED] optirun fails with "No devices detected" after kernel upgrade

Wow, thank you so much! This did indeed solve my problem.

I am afraid to even say this, but I did actually take a look at /etc/bumblebee/xorg.conf.nvidia and read through the huge comment preceding the (commented)

# BusID "PCI:01:00:0"

But I thought "nah, this couldn't possibly be it because the commented line is probably just its default value and already matches lspci's output" and moved on. Thanks again for pointing me there :-)

Last edited by kpj (2021-11-21 13:49:02)

Offline

#4 2021-11-21 14:26:27

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,820
Website

Re: [SOLVED] optirun fails with "No devices detected" after kernel upgrade

kpj wrote:

Wow, thank you so much! This did indeed solve my problem.

I am afraid to even say this, but I did actually take a look at /etc/bumblebee/xorg.conf.nvidia and read through the huge comment preceding the (commented)

# BusID "PCI:01:00:0"

But I thought "nah, this couldn't possibly be it because the commented line is probably just its default value and already matches lspci's output" and moved on. Thanks again for pointing me there :-)

If if makes you feel any better, I didn't even see that option at first because my brain just skipped over the entire comment block. I then tried the BusID as returned by lspci, with the dot instead of the colon. What counts is that we both got there in the end. wink


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Online

#5 2021-11-22 07:38:39

kpj
Member
Registered: 2012-12-30
Posts: 19

Re: [SOLVED] optirun fails with "No devices detected" after kernel upgrade

Agreed :-)

(do we even dare to ask the question of why this change was now suddenly necessary?)

Last edited by kpj (2021-11-22 07:39:39)

Offline

#6 2021-11-22 07:55:43

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,820
Website

Re: [SOLVED] optirun fails with "No devices detected" after kernel upgrade

kpj wrote:

(do we even dare to ask the question of why this change was now suddenly necessary?)

Nope. We just thank the stars that we have working graphics cards in 2021 and move along. It's best not to tempt the fates.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Online

#7 2021-11-22 07:58:01

kpj
Member
Registered: 2012-12-30
Posts: 19

Re: [SOLVED] optirun fails with "No devices detected" after kernel upgrade

Understandable :-D

Offline

Board footer

Powered by FluxBB