07-06-2020, 06:32 PM
also, a TL;DR for the script
sudo nano /usr/bin/nvmelowpower.sh
#!/bin/sh sudo nvme set-feature /dev/nvme0 -f 2 -v 2
sudo nano /usr/bin/nvmehighpower.sh
#!/bin/sh sudo nvme set-features /dev/nvme0 - 2 -v 0
sudo nano /etc/sudoers
username ALL=(ALL) NOPASSWD: /usr/bin/nvme
sudo chmod a+x /usr/bin/nvmelowpower.sh
sudo chmod a+x /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"
sudo nano /usr/bin/nvmelowpower.sh
#!/bin/sh sudo nvme set-feature /dev/nvme0 -f 2 -v 2
sudo nano /usr/bin/nvmehighpower.sh
#!/bin/sh sudo nvme set-features /dev/nvme0 - 2 -v 0
sudo nano /etc/sudoers
username ALL=(ALL) NOPASSWD: /usr/bin/nvme
sudo chmod a+x /usr/bin/nvmelowpower.sh
sudo chmod a+x /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"