bumblebee : /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Did you try that script using sudo? I'm wondering if it didn't install properly. I don't have any bumblebee system, so I can only go on what I've read here, but I believe it is supposed to add some entries in the /etc/x11/xorg.conf.d/ directory.
But maybe I'm off... hopefully someone with more knowledge of the optimus system can chime in...
Did you try that script using sudo? I'm wondering if it didn't install properly. I don't have any bumblebee system, so I can only go on what I've read here, but I believe it is supposed to add some entries in the /etc/x11/xorg.conf.d/ directory.
But maybe I'm off... hopefully someone with more knowledge of the optimus system can chime in...
Slackware is a pretty deep distro indeed. And I thought Arch was deep. Thanks anyway!
Try initializing optimus manually (aka debugging it to see what happens)
Try initializing Bumblebee manually so you can see what happens and know exactly where is the issue.
The Bumblebee Optimus process is as follows, for the NVIDIA driver:
1. A module (depending on what version of the NVIDIA driver are you using may be modules) is/are loaded.
2. Bumblebee tries to daemonize, and it should load the bbswitch module.
3. Normally, it should either use primusrun or optirun (with maybe virtualgl) to start a windowed, contained X on :8 with your accelerated graphics card.
4. After you close the window, it should ideally remove the module and "go to sleep".
The output of
Code:
ps axc | grep bumblebee
should be something like
Code:
1034 ? Ss 0:00 bumblebeed
for a properly configured running bumblebee in your system.
Let's debug what happens
1. Kill the bumblebeed daemon
Code:
# killall bumblebeed
or
Code:
# /etc/rc.d/rc.bumblebee stop
2. Then start bumblebeed in verbose mode
Code:
# bumblebeed -vvv
It will tell you pretty much everything that happens and it should not have errors. If it does show any errors, please write them down so you can know what is happening.
For an example, this is my own bumblebeed output:
Code:
[ 9342.072149] [DEBUG]Found card: 01:00.0 (discrete)
[ 9342.072200] [DEBUG]Found card: 00:02.0 (integrated)
[ 9342.072211] [DEBUG]Reading file: /etc/bumblebee/bumblebee.conf
[ 9342.072670] [INFO]Configured driver: nvidia
[ 9342.072701] [DEBUG]Skipping auto-detection, using configured driver 'nvidia'
[ 9342.073026] [DEBUG]Process /sbin/modprobe started, PID 4711.
[ 9342.073181] [DEBUG]Hiding stderr for execution of /sbin/modprobe
[ 9342.076398] [DEBUG]SIGCHILD received, but wait failed with No child processes
[ 9342.076559] [DEBUG]bbswitch has been detected.
[ 9342.076582] [INFO]Switching method 'bbswitch' is available and will be used.
[ 9342.076594] [DEBUG]Active configuration:
[ 9342.076603] [DEBUG] bumblebeed config file: /etc/bumblebee/bumblebee.conf
[ 9342.076613] [DEBUG] X display: :8
[ 9342.076623] [DEBUG] LD_LIBRARY_PATH: /usr/lib64/nvidia-bumblebee
[ 9342.076638] [DEBUG] Socket path: /var/run/bumblebee.socket
[ 9342.076657] [DEBUG] pidfile: /var/run/bumblebeed.pid
[ 9342.076674] [DEBUG] xorg.conf file: /etc/bumblebee/xorg.conf.nvidia
[ 9342.076690] [DEBUG] xorg.conf.d dir: /etc/bumblebee/xorg.conf.d
[ 9342.076706] [DEBUG] ModulePath: /usr/lib64/nvidia-bumblebee/xorg/modules,/usr/lib64/xorg/modules
[ 9342.076726] [DEBUG] GID name: bumblebee
[ 9342.076740] [DEBUG] Power method: bbswitch
[ 9342.076754] [DEBUG] Stop X on exit: 1
[ 9342.076768] [DEBUG] Driver: nvidia
[ 9342.076785] [DEBUG] Driver module: nvidia
[ 9342.076798] [DEBUG] Card shutdown state: 1
[ 9342.077144] [DEBUG]Process /sbin/modprobe started, PID 4712.
[ 9342.077260] [DEBUG]Hiding stderr for execution of /sbin/modprobe
[ 9342.079933] [DEBUG]SIGCHILD received, but wait failed with No child processes
[ 9342.079978] [DEBUG]Configuration test passed.
[ 9342.081118] [INFO]bumblebeed 3.2.1 started
[ 9342.081545] [INFO]Switching dedicated card OFF [bbswitch]
[ 9342.296538] [INFO]Initialization completed - now handling client requests
The "Switching dedicated card OFF" is exactly what I want right now since I'm not using it at the moment. The "Initialization completed - now handling client requests" means it's ready to play.
Possible errors at this stage could be a.The NVIDIA module not loading; b. bbswitch somehow not loading; c.Configuration errors; d.X errors; e.The NVIDIA driver libraries not loading (here they are in "ModulePath: /usr/lib64/nvidia-bumblebee/xorg/modules,/usr/lib64/xorg/modules"; it could be somewhere else in your box): that refers to libglx.so *as provided by NVIDIA* (it must be there, it must be a symlink to libglx.so.Your.Version)
3. If you successfully got the "Initialization completed - now handling client requests" message at the previous stage, you're ready to play. You may start the test with:
Code:
optirun glxinfo | grep "OpenGL vendor string"
Ideally, it should tell you something like this:
Code:
OpenGL vendor string: NVIDIA Corporation
It should NOT say Gallium. If it does, something is not right somewhere (usually the NVIDIA libglx.so can't be found). It should say NVIDIA Corporation, always.
You should also take a look at the bumblebeed you manually started: it should dump on your screen a mini Xorg log.
Only the interesting lines
Code:
[10338.981367] [DEBUG]Accepted new connection
[10338.981972] [INFO]Switching dedicated card ON [bbswitch]
[10339.308259] [INFO]Loading driver nvidia (module nvidia)
[10339.308560] [DEBUG]Process modprobe started, PID 4861.
[10339.339845] [DEBUG]Process with PID 4861 returned code 0
[10339.340073] [INFO]Starting X server on display :8.
[10339.340378] [DEBUG]Process Xorg started, PID 4866.
[10340.406433] [DEBUG][XORG] X.Org X Server 1.18.3
[10340.406626] [DEBUG][XORG] (++) ModulePath set to "/usr/lib64/nvidia-bumblebee/xorg/modules,/usr/lib64/xorg/modules"
[10340.406683] [DEBUG][XORG] (II) xfree86: Adding drm device (/dev/dri/card0)
[10340.406692] [ERROR][XORG] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
[10340.406711] [DEBUG][XORG] (II) Loading /usr/lib64/nvidia-bumblebee/xorg/modules/extensions/libglx.so
[10340.406716] [DEBUG][XORG] (II) Module glx: vendor="NVIDIA Corporation"
[10340.406720] [DEBUG][XORG] compiled for 4.0.2, module version = 1.0.0
[10340.406726] [DEBUG][XORG] Module class: X.Org Server Extension
[10340.406731] [DEBUG][XORG] (II) NVIDIA GLX Module 367.27 Thu Jun 9 18:19:55 PDT 2016
[10340.406736] [DEBUG][XORG] (II) LoadModule: "nvidia"
[10340.406739] [DEBUG][XORG] (II) Loading /usr/lib64/nvidia-bumblebee/xorg/modules/drivers/nvidia_drv.so
[10340.406744] [DEBUG][XORG] (II) Module nvidia: vendor="NVIDIA Corporation"
[10340.406747] [DEBUG][XORG] compiled for 4.0.2, module version = 1.0.0
[10340.406752] [DEBUG][XORG] Module class: X.Org Video Driver
[10340.407302] [ERROR][XORG] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
[10340.407487] [INFO]X successfully started in 1 seconds
As you see, I do get that dreaded "Permission denied" message, but Bumblebee/NVIDIA still functions properly.
4. After the command is executed, the card is not needed anymore until I call something that needs it, so it must properly turn off. Checking the output:
Code:
[10340.548027] [DEBUG]Socket closed.
[10340.548052] [INFO]Stopping X server
[10340.670500] [DEBUG]Process with PID 4866 returned code 0
[10340.670614] [INFO]Unloading nvidia driver
[10340.670744] [DEBUG]Process modprobe started, PID 4890.
[10340.690534] [DEBUG]Process with PID 4890 returned code 0
[10340.690853] [INFO]Switching dedicated card OFF [bbswitch]
[10340.904495] [DEBUG][XORG] (II) UnloadModule: "kbd"
[10340.904532] [DEBUG][XORG] (II) UnloadModule: "mouse"
[10340.904539] [DEBUG][XORG] (II) NVIDIA(GPU-0): Deleting GPU-0
[10340.904546] [DEBUG][XORG] (II) Server terminated successfully (0). Closing log file.
Possible issues here: the modules not properly unloading on the more recent versions of the NVIDIA driver (there is an ongoing discussion at the Bumblebee developers site about it, and many possible fixes - that depends on the version of the NVIDIA drivers you're using)
I hope this information is useful to you and wish you success!
Last edited by folkenfanel; 08-15-2016 at 11:45 AM.
Reason: Changing optimus to Bumblebee Optimus
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.