![]() |
NVME powersaving script - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111) +--- Forum: General Discussion on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=112) +--- Thread: NVME powersaving script (/showthread.php?tid=10522) Pages:
1
2
|
RE: NVME powersaving script - mamboman777 - 07-16-2020 (07-06-2020, 06:32 PM)squidd Wrote: also, a TL;DR for the scriptI am probably the one to blame, but in looking at your TL;DR there are a few changes that need to be made: the nvmehighpower.sh script needs to contain "sudo nvme set-feature /dev/nvme0 -f 2 -v 0" instead of what's there. The corrected Tl; Code: sudo nano /usr/bin/nvmelowpower.sh Code: #!/bin/sh Power State 0 is full power, 1 is less and slower, 2 is even less and slower and on my drive power states 3 and 4 are non-operational. I have used the following as a compromise: Code: #!/bin/sh Ctrl + X to exit then enter to save. Code: sudo nano /usr/bin/nvmehighpower.sh Code: #!/bin/sh Ctrl + X to exit and Enter to save. Code: sudo nano /etc/sudoers At the bottom of the file add substituting username with your actual username: Code: username ALL=(ALL) NOPASSWD: /usr/bin/nvme Ctrl+X to exit and enter to save. Code: sudo chmod a+x /usr/bin/nvmelowpower.sh Code: sudo chmod a+x /usr/bin/nvmehighpower.sh At this point I test each script to make sure they are working correctly. For example, on my system it looks like this: Code: [user@pinebookpro ~]$ /usr/bin/nvmehighpower.sh open KDE System settings power management menu Under the "On AC Power" tab under "Run Script" entered the script "/usr/bin/nvmehighpower.sh" Under the "On Battery" tab under "run Script" enter "/usr/bin/nvmelowpower.sh" |