permission denied on a sudo command

Yet another newbie question : Trying to configure my vr headset, I have to setup my gpu in vr mode. I installed corectrl but I can't figure how to lauch the app. Anyway, someone in a discord gave me a command to authorise apps to change the power profile. However when I run it I get this :
bazzite@bazzite:~$ sudo echo 4 > /sys/class/drm/card0/device/pp_power_profile_mode
bash: /sys/class/drm/card0/device/pp_power_profile_mode: Permission denied
bazzite@bazzite:~$ sudo echo 4 > /sys/class/drm/card0/device/pp_power_profile_mode
bash: /sys/class/drm/card0/device/pp_power_profile_mode: Permission denied
Solution:
you cant sudo echo to a file you need to echo pipe into sudo tee echo hello | sudo tee /sys/class/foo...
Jump to solution
1 Reply
Solution
HikariKnight
HikariKnight3mo ago
you cant sudo echo to a file you need to echo pipe into sudo tee echo hello | sudo tee /sys/class/foo

Did you find this page helpful?