Skip to contentSkip to conversation

drmSetMaster and drmDropMaster need root privileges

Bug 90079 [email protected] 1 participant 4 messages Apr 17, 2015 – Oct 14, 2019

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=90079

Bug ID: 90079
Summary: drmSetMaster and drmDropMaster need root privileges
Product: DRI
Version: unspecified
Hardware: All
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: libdrm
Assignee: [email protected]
Reporter: [email protected]

I run a small, user-space program that renders images in my virtual console with drmModeSetCRTC and family. I also support virtual terminal switching with ioctl() on stuff from linux/vt.h and some basic signal handling.

Switching back to X server, however, just renders... nothing.

Apparently I'm supposed to call drmDropMaster so that X server can pick up from there. I get -1 and errno is set to Permission Denied. When run as root, it works as expected.

Is there any reason why these functions require root privileges? More importantly, is there any workaround for this so that my user space program can let X server draw its stuff once user switches back to X's virtual terminal?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=90079

Michel Dänzer <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
Component|libdrm |DRM/other

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=90079

--- Comment #1 from Emil Velikov <[email protected]> --- The root limitation when using the KMS API is deliberate. If your program only wants to render things then opening/using a render node is what you want.

Looking at the problem from another angle:
As of recently one could use X server without root access, although that involves using systemd-logind. Not 100% if that will do exactly what you want but having a quick look at the code and checking David's blog [1] on the topic won't hurt.

[1] https://dvdhrm.wordpress.com/

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=90079

Martin Peres <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

         Resolution|---                         |INVALID
             Status|NEW                         |RESOLVED

--- Comment #2 from Martin Peres <[email protected]> --- Hi,

Freedesktop's Bugzilla instance is EOLed and open bugs are about to be migrated to http://gitlab.freedesktop.org.

To avoid migrating out of date bugs, I am now closing all the bugs that did not see any activity in the past year. If the issue is still happening, please create a new bug in the relevant project at https://gitlab.freedesktop.org/drm
(use misc by default).

Sorry about the noise!

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel