07-01-2020, 05:17 PM
(This post was last modified: 07-03-2020, 05:33 AM by mamboman777.)
I've tried to solve this and can't quite figure it out.
My goal: on AC power have a script that contains "sudo nvme set-feature /dev/nvme0 -f 2 -v 0" runs; according to the wiki this sets the NVME power management for maximum performance. On Battery power a script that contains "sudo nvme set-feature /dev/nvme0 -f 2 -v 2" runs; according to the wiki this sets the NVME power management for decreased performance, but better battery life.
I have the scripts running successfully, but only as sudo and I can't figure out how to get KDE to run them using the "power management" gui. I tried entering 'sudo /my/script.sh' into the KDE energy management, but it's either failing to run or running into some sort of permission problem.
How can I get these scripts to run whenever AC/BAT change is detected? I wish this were a feature in TLP, but I don't see it there either.
Thanks!
-Josh
My goal: on AC power have a script that contains "sudo nvme set-feature /dev/nvme0 -f 2 -v 0" runs; according to the wiki this sets the NVME power management for maximum performance. On Battery power a script that contains "sudo nvme set-feature /dev/nvme0 -f 2 -v 2" runs; according to the wiki this sets the NVME power management for decreased performance, but better battery life.
I have the scripts running successfully, but only as sudo and I can't figure out how to get KDE to run them using the "power management" gui. I tried entering 'sudo /my/script.sh' into the KDE energy management, but it's either failing to run or running into some sort of permission problem.
How can I get these scripts to run whenever AC/BAT change is detected? I wish this were a feature in TLP, but I don't see it there either.
Thanks!
-Josh