Hello all, I’m seeing some weird behaviour, which maybe you can help me debug. It’s possible that I’m doing something wrong.
I want to run a binary (ollama) with cap_perfmon capability, so that it can use Vulkan. I’ve done the following:
sudo setcap cap_perfmon=+ep ./ollama
sudo getcap ./ollama
./ollama cap_perfmon=ep
getcap nicely shows that the executable now has cap_perfmon capability.
However, when I run the binary and check the capabilities with:
cat /proc/14036/status | grep -i cap
CapInh: 0000000800000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
CapBnd: 000001ffffffffff
CapAmb: 0000000000000000
It basically says that the process does not have any capabilities. (CapPrm: 0000000000000000)
Likewise when I do
getcap /proc/PID/exe
I don’t see any capabilities. But I see cap_perfmon if I run getcap on the actual binary /proc/PID/exe points to.
I also tried adding cap_perfmon to /etc/security/capability.conf to enable it for everything for my user. Likewise no luck.
Any recommendations as to what I could be doing wrong?