NVME powersaving script
#2
Ok...figured it out. Posting this in case someone wants to do the same. I think this is a cool idea because it should squeeze out some more battery life and still allow the maximum speed when on AC. First of all, you should install nvme-cli and make sure that your nvme supports different power states. Check the wiki for info on that. I wrote a simple script called '/usr/bin/nvmelowpower.sh' which containes " #!/bin/sh sudo nvme set-feature /dev/nvme0 -f 2 -v 2" I also created a file called '/usr/bin/nvmehighpower.sh' which contains #!/bin/sh sudo nvme set-features /dev/nvme0 - 2 -v 0" Then I added "username ALL=(ALL) NOPASSWD: /usr/bin/nvme" to my /etc/sudoers file. I had to run "sudo chmod a+x /usr/bin/nvmelowpower.sh" and "sudo chmod a+x /usr/bin/nvmehighpower.sh" to make the files executable. Finally I opened up the KDE System settings "power management" menu. Under the "On AC Power" tab under "Run Script" I entered the script "/usr/bin/nvmehighpower.sh" Under the "On Battery" tab under "run Script" I entered "/usr/bin/nvmelowpower.sh" Now when I plug in the AC power my NVME runs at the maximum (for my drive) 4w. When I unplug my computer it runs at the maximum 2.2w. Not a lot, but every bit counts.


Messages In This Thread
NVME powersaving script - by mamboman777 - 07-01-2020, 05:17 PM
RE: NVME powersaving script - by mamboman777 - 07-01-2020, 08:12 PM
RE: NVME powersaving script - by squidd - 07-02-2020, 10:13 AM
RE: NVME powersaving script - by xmixahlx - 07-02-2020, 10:25 AM
RE: NVME powersaving script - by mamboman777 - 07-02-2020, 01:57 PM
RE: NVME powersaving script - by mamboman777 - 07-02-2020, 07:01 PM
RE: NVME powersaving script - by mamboman777 - 07-03-2020, 06:01 AM
RE: NVME powersaving script - by mamboman777 - 07-05-2020, 11:15 AM
RE: NVME powersaving script - by squidd - 07-06-2020, 05:12 PM
RE: NVME powersaving script - by squidd - 07-06-2020, 06:32 PM
RE: NVME powersaving script - by mamboman777 - 07-16-2020, 01:14 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Selling my Pinebook Pro with a bootable NVMe WD SSD drive pinemouth 0 1,068 09-27-2023, 08:53 PM
Last Post: pinemouth
  Boot into NVME drive, no wifi, sound, buttons... PaulQ 0 1,084 07-13-2023, 01:50 PM
Last Post: PaulQ
  I'm booting from NVME but I want to switch back to eMMC acruhl 4 2,199 04-23-2023, 06:58 AM
Last Post: acruhl
  U-Boot with direct NVMe boot support for eMMC/SPI Flash pcm720 125 238,548 09-27-2022, 07:41 AM
Last Post: olyavi
  Selling Pinebook Pro (ISO) + nvme from Sweden DavidL 5 4,064 06-20-2022, 03:20 PM
Last Post: DavidL
  For Sale: Pinebook Pro 64gb ANSI with NVMe Adapter Lumat 2 2,456 04-24-2022, 01:42 AM
Last Post: kylexd
  Selling PineBook PRO with ISO Keyboard + NVME firefox-58 27 22,645 04-08-2022, 06:23 AM
Last Post: firefox-58
  Pinebook Pro (ANSI) with NVME 1TB (660p) for sale Fish 5 4,861 01-26-2022, 08:49 AM
Last Post: TRS-80
  Selling PineBook PRO with ANSI Keyboard + NVME woodeen 3 3,838 11-30-2021, 06:38 PM
Last Post: luca22
  Boot from NVME theboz1@verizon.net 2 2,767 10-22-2021, 07:58 PM
Last Post: theboz1@verizon.net

Forum Jump:


Users browsing this thread: 1 Guest(s)