简体   繁体   中英

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.

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM