Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenCL: permission (capability) needed to run `clinfo` as non-root

I'm trying to move away from running an application using OpenCL (on an Intel GPU, using beignet) as root all the time. I seem to have run into some permission issue though. clinfo seems to show the same permission issue. Is there some easy way of finding out what permissions/capabilities are needed?

When I run clinfo from the Linux console as an ordinary user I get the following:

drm_intel_gem_bo_context_exec() failed: Invalid argument
/dev/dri/card0 not authenticated
Device open failed, aborting...
error in /home/magnus/lcam-deb/libbeignet-lcam/src/cl_api.c line 298
Invalid device

As root it works fine.

If I start X as the same user and then run clinfo in an xterminal it works just fine too.

like image 624
Magnus Avatar asked Dec 20 '25 15:12

Magnus


1 Answers

For me the solution was passing drm.rnodes=1 to the kernel at boot. I found that information hidden in the How to run section on the beignet wiki.

like image 139
Magnus Avatar answered Dec 24 '25 12:12

Magnus



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!