Magnus
Magnus

Reputation: 4714

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.

Upvotes: 3

Views: 1554

Answers (1)

Magnus
Magnus

Reputation: 4714

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.

Upvotes: 1

Related Questions