any reason drmDropMaster() has to be root?

Vic Lee llyzs.vic at
Tue Apr 10 20:15:50 PDT 2012

Hi Everyone,

I am referring to this line in drm_drv.c in drm module:


I can understand that set_master requires root, but if the process is 
already master and just want to drop itself from master, I don't see any 
point why this has to be root. Could anyone clarify this? If not, I 
suggest to change drop_master to DRM_AUTH only.

My use case is like this: I have an application which will start before 
X starts, and this app will internally call drmOpen(). Since it's the 
first app to open the gpu it automatically becomes master, but then X 
won't start afterwards because X requires master for KMS to work. So in 
the application I must call drmDropMaster() after drmOpen(), but then I 
have to run the application as root just in order to drop master.

Thanks in advanced.


More information about the dri-devel mailing list