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?