optirun fails: failed to set DRM interface version 1.4: Permission denied

Hi,

I’ve installed Bumblebee and followed the instructions in this section of the NVIDIA Bumblebee article at openSUSE Wiki. I have rebooted my system, in the hope that optirun would work (as it wouldn’t prior to the reboot either). Now when I run:


optirun -vv glxgears -info

I get the error:


 1233.089601] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
 1233.089856] [DEBUG]optirun version 3.2.1 starting...
 1233.089863] [DEBUG]Active configuration:
 1233.089866] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
 1233.089869] [DEBUG] X display: :8
 1233.089873] [DEBUG] LD_LIBRARY_PATH: 
 1233.089875] [DEBUG] Socket path: /var/run/bumblebee.socket
 1233.089878] [DEBUG] Accel/display bridge: auto
 1233.089883] [DEBUG] VGL Compression: proxy
 1233.089887] [DEBUG] VGLrun extra options: 
 1233.089891] [DEBUG] Primus LD Path: /usr/lib64/primus:/usr/lib/primus
 1233.089911] [DEBUG]Using auto-detected bridge virtualgl
 1233.587084] [INFO]Response: No - error: [XORG] (EE) /dev/dri/card1: failed to set DRM interface version 1.4: Permission denied


 1233.587105] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) /dev/dri/card1: failed to set DRM interface version 1.4: Permission denied


 1233.587115] [DEBUG]Socket closed.
 1233.587135] [ERROR]Aborting because fallback start is disabled.
 1233.587140] [DEBUG]Killing all remaining processes.


if there’s some other info you need merely ask and I will provide it.

Thanks for your time,
Brenton

Hi, that sounds like you have no proper video driver installed or the driver cannot load for some reason.
Which graphics card are you using? Please show the result of:


# lspci -nnk |grep 3D

Are you using the open source nouveau driver or the proprietary Nvidia driver?
What is the result of:


optirun --status

Driver: nouveau

lspci -nnk |grep 3D

output is:


01:00.0 3D controller [0302]: NVIDIA Corporation GK208M [GeForce GT 740M] [10de:1292] (rev a1)

optirun --status

output is:


Bumblebee status: Ready (3.2.1). X inactive. Discrete video card is off.
​

Fine, your card should be supported by the nouveau driver and bumblebee seems up and running (the card being off until you engage it).
What I notice in this recently updated version of the guide is NO reference to adding your user to the video and bumblebee groups, as was called just a few days ago…

Please check if adding the relevant groups fixes things for you:


usermod -G video,bumblebee <username>

I had already added myself to the bumblebee group with gpasswd. As for the video group I just did that and rebooted and optirun glxgears still returns the same error I started with.

Wait a moment, your card apparently belongs to a problematic series? Quoting from the guide:

Problems with GT600M/GT700M series cards (Kepler)

If you cannot load GPU drivers - while bbswitch being loaded - and get an error like this on a Kepler card:
[INFO]Response: No - error: Could not load GPU driver
[ERROR]Cannot access secondary GPU - error: Could not load GPU driver

Try changing value of ‘load_state’ in “/etc/modprobe.d/50-bbswitch.conf” from 0 to -1 {{Shell|echo “options bbswitch load_state=-1 unload_state=1” | sudo tee /etc/modprobe.d/50-bbswitch.conf

More info on github: bbswitch - scroll to Module options.

Do I have to reboot after making this change or?

Well I rebooted after making that change and still optirun glxgears returns the same error.

Sorry for the delay, but timezone counts :wink:
Please check the following as superuser:


lsmod | grep nouveau

it should return nothing. If it returns something, or anyway, check that you added “blacklist nouveau” to /etc/modprobe.d/50-blacklist.conf (or to any other *.conf file there).
Then check:


optirun -b none lsmod | grep nouveau

this is just enabling the dGPU but not sending output to it. The command should return “nouveau” itself and some dependencies. If not so, I’m running out of ideas… unless there is something wrong with the latest TW snapshot that I cannot check at the moment.

Afraid that command returns the same error I started with. Oddly on this PC I was able to run optirun without a problem on Arch Linux. Thanks for your help, even if you’re now out of ideas.

After the last few mods, forcing a rebuild of the initrd and rebooting might help too:


dracut --hostonly --force

Hi, I am finally able to reproduce your issue (I think) when using the nouveau driver and bumblebee. Please check /var/log/Xorg.8.log after you get the error in the original post and see if you find something like:


  1375.372] (II) xfree86: Adding drm device (/dev/dri/card0)
  1375.442] (II) xfree86: Adding drm device (/dev/dri/card1)
  1375.443] (EE) /dev/dri/card1: **failed to set DRM interface version 1.4:** Permission denied
  1375.443] (--) PCI:*(0:1:0:0) 10de:139b:1043:177d rev 162, Mem @ 0xf6000000/16777216, 0xe0000000/268435456, 0xf0000000/33554432, I/O @ 0x0000e000/128, BIOS @ 0x????????/524288
  1375.443] (II) LoadModule: "glx"
  1375.443] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
  1375.444] (II) Module glx: vendor="X.Org Foundation"
  1375.444]     compiled for 1.18.3, module version = 1.0.0
  1375.444]     ABI class: X.Org Server Extension, version 9.0
  1375.444] (==) AIGLX enabled
  1375.444] (II) LoadModule: "nouveau"
  1375.444] (II) Loading /usr/lib64/xorg/modules/drivers/nouveau_drv.so
  1375.444] (II) Module nouveau: vendor="X.Org Foundation"
  1375.444]     compiled for 1.18.3, module version = 1.0.12
  1375.444]     Module class: X.Org Video Driver
  1375.444]     ABI class: X.Org Video Driver, version 20.0
...
  1375.444] (II) NOUVEAU driver 
  1375.444] (II) NOUVEAU driver for NVIDIA chipset families :
...
  1375.445]     GeForce 6       (NV4x)
  1375.445]     GeForce 7       (G7x)
  1375.445]     GeForce 8       (G8x)
  1375.445]     GeForce GTX 200 (NVA0)
  1375.445]     GeForce GTX 400 (NVC0)
  1375.445] (II)** [drm] nouveau interface version: 1.3.1**
  1375.445] (EE) Unknown chipset: NV117
  1375.445] (II) **[drm] nouveau interface version: 1.3.1**
  1375.445] (EE) Unknown chipset: NV117
  1375.445] (EE) No devices detected.
  1375.445] (EE) 
Fatal server error:
  1375.445] (EE) no screens found(EE)

That seems a fairly common issue, possibly originating from a mismatch between the Xorg nouveau video driver and the kernel nouveau driver and/or the libdrm* packages (but the details are beyond my pay grade :wink: ).
See also:
https://groups.google.com/forum/#!topic/linux.debian.bugs.dist/Oh3CErlca18
https://github.com/Bumblebee-Project/Bumblebee/issues/652
They call it fixed in kernel 4.4 but I still see that on 4.4.36 (Leap 42.2) and 4.9.5.
If the issue is the same, consider installing the proprietary driver, which works here with bumblebee without a glitch.
Or consider that you can also try DRI_PRIME with nouveau, see here for instance: https://forums.opensuse.org/showthread.php/522499-How-do-I-install-(nvidia-suse)-Prime-using-the-Nouveau-driver-on-my-Asus-Optimus-laptop

If you think your issue is different, please let us know.

Maybe stupid, but is bumblebee up and running?

systemctl status bumblebeed

Have you tried without internet? I had that error only when I was in Wifi or Lan.

The issue was that IPv6 was turned off in Yast. That leads to strange effects, if network manager gets a IPv6 address it will f#ck up bumblebeed/bbswitch (it tries to connect to localhost, a call that fails immediately normally, but with that combination it will timeout instead of getting a connection refused).

You can check for that if you do a telnet to a random not-used port, e.g.:
telnet localhost 11453

That must return ‘connection refused’ immediately for the IPv4 and IPv6 try. If you have the same issue as me, the IPv6 try will timeout after 210 seconds or so if you are connected to any network.

Solution: turn on IPv6 in yast.

I ended up giving up on optirun on that previous installation of Tumbleweed of mine. But with my newer installation of Tumbleweed on ext4 I have some hope we might be able to fix this issue. Here is my /var/log/Xorg.8.log file. systemctl status bumblebee returns:


● bumblebeed.service - Bumblebee C Daemon
   Loaded: loaded (/usr/lib/systemd/system/bumblebeed.service; disabled; vendor preset: disabled)
   Active: active (running) since Mon 2017-02-27 01:04:21 AEST; 9min ago
 Main PID: 2521 (bumblebeed)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/bumblebeed.service
           └─2521 /usr/sbin/bumblebeed

telnet localhost 11453 returns:


Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused

this time I am not even going to try the proprietary NVIDIA driver, just using nouveau. To be clear on this new openSUSE Tumbleweed (OT) installation I have run:


sudo zypper in -y bumblebee bbswitch
sudo gpasswd -a fusion809 bumblebee
echo "blacklist nouveau" | sudo tee -a /etc/modprobe.d/99-local.conf
sudo mkinitrd

then I rebooted and ran:


sudo systemctl start bumblebeed

(why not enabling it? I have had a bad experience with enabling systemd services on startup on my previous OT installation so I going to manually start it everytime I try to use optirun). Now optirun glxgears returns exactly what I reported on my previous OT installation, namely:


  980.926996] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) /dev/dri/card1: failed to set DRM interface version 1.4: Permission denied


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

Did you install the NVIIDA driver?? nouveau is black listed?? you must provide a driver for NVIDIA either nouveau or NVIDIA

Please (re)read comment #12: currently bumblebee with nouveau is not going to work.

I blacklisted nouveau because the Wiki guide (SDB:NVIDIA Bumblebee - openSUSE Wiki) said to even if using nouveau and I quote:

Blacklist nouveau (even if you plan to use nouveau driver):

So the proprietary NVIDIA driver should work then? It’s just the nouveau one that shouldn’t? Well I blacklisted nouveau so to install NVIDIA I should simply follow the Wiki guide and run:


sudo zypper ar -c -f http://download.opensuse.org/repositories/X11:/Bumblebee/openSUSE_Tumbleweed/ X11:Bumblebee
sudo zypper in nvidia-bumblebee nvidia-bumblebee-32bit
systemctl enable dkms

I am asking because this Wiki article doesn’t seem too accurate based on past experience.

That wasn’t a rhetorical question btw… I’m not doing anything until someone gives me an answer, as I am afraid of messing up my OT installation by following faulty instructions on the openSUSE Wiki.

Well as no one seemed to have an answer for me I ended up following those instructions. It seems like optirun is working to some extent. Running optirun glxgears works, for example. But running:


optirun 0ad

returns:


/usr/bin/pyrogenesis: symbol lookup error: /usr/lib64/libssh2.so.1: undefined symbol: EVP_aes_256_ctr

likewise running:


optirun $HOME/Programs/usr/bin/runescape-launcher

(with the NXT Client of RuneScape installed to $HOME/Programs/usr via the method I mentioned in this thread) returns:


/home/fusion809/Programs/usr/share/games/runescape-launcher/runescape: /usr/lib64/libcurl.so.4: no version information available (required by /home/fusion809/Programs/usr/share/games/runescape-launcher/runescape)
/home/fusion809/Programs/usr/share/games/runescape-launcher/runescape: symbol lookup error: /usr/lib64/libssh2.so.1: undefined symbol: EVP_aes_256_ctr

is there something wrong with OT’s version of libssh2?