Reputation: 46830
I'm working an IOT device that displays multiple video streams on the attached display. We are running a very minimal X configuration (system essentially boots to my app, but X is runninng). The application is written in fairly modern opengl (using shaders and such)... I'm also using GLFW. Anyhow, the issue I'm seeing is that the CPU when the app is run as root is around half of what it is when run as non root. I'd strongly prefer to ship this with the main app running as non root, but I'm not sure I can with this kind of performance difference. Has anyone seen this before?
Note: I just noticed that I see "LibGL error: failed to open drm device: Permission denied" printed at startup... So i'm guess the problem is that my non root user cannot use the display hardware acceleration... Any idea how to fix this?
Upvotes: 0
Views: 211
Reputation: 46830
The problem was that my non root user was falling back to software rendering because it didn't have permission to access the drm hardware.
Adding my non root user to the "video" group with the following command fixed my issue:
usermod -a -G video user
Upvotes: 1