Friday, July 31, 2020

Logging in/out on console while logged in in X removes hardware acceleration

Dear all,

logging in and out changes the owner of the /dev/drm0 file, so that one
loses hardware acceleration in X when additionally logging in and out on
a console. Here's what I do:

1) Boot Openbsd and log into X with xenodm. Ownership of /dev/drm0:

$ ls -l /dev/drm0
crw------- 1 nils wheel 87, 0 Jul 31 13:07 /dev/drm0

2) Switch to a console (e.g. CTRL-ALT-F1) and log in with the same user.
The file is now owned by my user-group:

$ ls -l /dev/drm0
crw------- 1 nils nils 87, 0 Jul 31 13:07 /dev/drm0

3) Log out from the console. Ownership changes back to root/wheel,
thereby disabling hardware acceleration in X:

$ ls -l /dev/drm0
crw------- 1 root wheel 87, 0 Jul 31 13:07 /dev/drm0

To regain hardware acceleration, I have to manually chown the file back
to my userid, or relogin with xenodm. So I guess logging in chowns the
file with my user (even with my user group when logging in via console),
and logging out reassigns the file owner to root.

I guess not much can be done about this, or can it?

Nils

No comments:

Post a Comment