I have been trying to find a way to display (AMD) GPU load in my conky, and while researching methods to display load, I found a command that - while requiring sudo - worked to print the GPU load to the terminal (sudo cat /sys/kernel/debug/dri/64/amdgpu_pm_info
). Conky cannot run sudo commands, so I attempted to both:
- use visudo to allow myself access to the
/sys/kernel/debug/dri/64
folder without having to enter the sudo password, and - use chown to modify the permissions of the file to a+rwx.
Neither of these methods seemed to work to allow me to use the command without entering the sudo password, however.
All help is appreciated!
sudo
in the first place ? What doesstat /sys/kernel/debug/dri/64/amdgpu_pm_info
tells you ?stat: cannot stat '/sys/kernel/debug/dri/64/amdgpu_pm_info': Permission denied
sudeors
?%username% ALL=(ALL) NOPASSWD: /sys/kernel/debug/dri/64
(and a variant in whichamdgpu_pm_info
was appended to the end of that line) with no change -- still prompted for a password.sudoers
line is incorrect in couple of aspects. One, the format isusername ALL=(ALL) NOPASSWD: command
. It's supposed to be for allowing executing a file. In your case, your goal is not executing a program file, but rather to read it. I think we can make a simple workaround for your case, but I'll have to post it tomorrow. Late night here