Quantcast

libGL error: failed to open drm device: Permission denied

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

libGL error: failed to open drm device: Permission denied

Alessandro DE LAURENZIS-3
Dear misc@ readers,

I'd like to make a follow-up of an old thread [0], in the hope that someone
clarify the situation.

I normally log in X through xdm (xenodm from some weeks now) and, once there,
the ownership of /dev/drm0 is changed to my user, as expected:

[just22@poseidon]-[~]> ll /dev/drm0
crw-------  1 just22  wheel   87,   0 Mar 20 08:17 /dev/drm0

But, if I switch from X to ttyC0 (Ctrl-Alt-F1), log in there and then log out,
the ownership is reset:

[just22@poseidon]-[~]> ll /dev/drm0
crw-------  1 root  wheel   87,   0 Mar 20 08:17 /dev/drm0

(this behavior seems consistent with the content of /etc/fbtab, meaning
that if I do the same sequence of operations from a different virtual
terminal, ttyC1 for example, /dev/drm0 ownership is left untouched).

Of cource, when I switch back in X, I'm no more able to get access to drm
device, losing hardware acceleration for applications using it and continuosly
receiving the following error message:

libGL error: failed to open drm device: Permission denied

The only way to restore the correct condition is to logout/login (or restart
xenodm service).

I temporarely worked around the problem inhibiting the login from ttyC0 (and
so reserving it as a kind of "virtual console" for kernel messages), but I'd
like to hear your thoughts on this: is it the expected/desired behavior
or should it be fixed?

All the best

[0]: http://marc.info/?l=openbsd-misc&m=145125527304834&w=2

--
Alessandro DE LAURENZIS
[mailto:[hidden email]]
LinkedIn: http://it.linkedin.com/in/delaurenzis

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: libGL error: failed to open drm device: Permission denied

Mihai Popescu-3
> in the hope that someone clarify the situation.

What version of OpenBSD are you running?

Did you modified /etc/fbtab?

What is 'll' or that command used to show permissions?

Is just22 a custom user, i.e. not created at install time?


Looking at what I have, I think for a normal install it should show you this:

[just22@poseidon]-[~]> ll /dev/drm0
crw-------  1 just22  just22   87,   0 Mar 20 08:17 /dev/drm0
                               ^^^^

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: libGL error: failed to open drm device: Permission denied

Alessandro DE LAURENZIS-3
Hello Mihai,

On Tue, 21 Mar 2017 00:07:16 +0200
Mihai Popescu <[hidden email]> wrote:

> What version of OpenBSD are you running?

-current, updated to 03/19 snapshot:

[just22@poseidon]-[0]-[✓]-[~]> dmesg | head -2
OpenBSD 6.1-beta (GENERIC.MP) #38: Sun Mar 19 11:09:01 MDT 2017
    [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP

> Did you modified /etc/fbtab?

Never touched:

[just22@poseidon]-[0]-[✓]-[~]> cat /etc/fbtab
#  $OpenBSD: fbtab.head,v 1.2 1999/05/05 06:56:34 deraadt Exp $
# login(1) reads this file to determine which devices should be chown'd to
# the new user. Format is:
# login-tty     perm    device:[device]:...
/dev/ttyC0      0600
/dev/console:/dev/wskbd:/dev/wskbd0:/dev/wsmouse:/dev/wsmouse0:/dev/ttyCcfg:/
dev/drm0
# samples
#/dev/ttyC0     0600    /dev/fd0

> What is 'll' or that command used to show permissions?

Just an alias to 'ls -lh', anyhow:

[just22@poseidon]-[0]-[✓]-[~]> ls -l /dev/drm0
crw-------  1 just22  wheel   87,   0 Mar 20 08:17 /dev/drm0

(this is the "normal" condition, of course)

> Is just22 a custom user, i.e. not created at install time?

It was created (a long time ago!) at install time.

> Looking at what I have, I think for a normal install it should show
> you this:
>
> [just22@poseidon]-[~]> ll /dev/drm0
> crw-------  1 just22  just22   87,   0 Mar 20 08:17 /dev/drm0

I noticed that the ownership of the device is "just22,just22" when I log in
from ttyC0, reset to "root,wheel" when I logout from there, set to
"just22,wheel" when logging in through xenodm. Does this make sense?

Thanks for your feedback

--
Alessandro DE LAURENZIS
[mailto:[hidden email]]
LinkedIn: http://it.linkedin.com/in/delaurenzis

Loading...