07-03-2020, 06:01 AM
(This post was last modified: 07-03-2020, 06:15 AM by mamboman777.)
Ok. I reread what is in that document, this time with more caffeine, and I think this is the parts of the document that pertain to this conversation: "Thispower managementmechanismis meant to complement and not replace autonomous power management performed by a controller." and "The controller may employ autonomous power management techniques to reduce power consumption below this level, but under no circumstances is power allowed to exceed this level." - these are from page 152.
So, if I understand this document correctly, APST is able to automatically switch between the specified power states for your drive. My drive has power states 0, 1, 2, 3, and 4. The power management mechanisms are designed to compliment, not replace APST and the controller may use APST to reduce power below the set level, but not higher than the set level. I think this means when you "sudo nvme set-feature /dev/nvme0 -f 2" you are setting the maximum power state that the controller should use, but the controller should still be able to user APST to move to lower power states. So, by setting power state 2, my controller should be able to use 2, 3, and 4. By setting to 0, my controller should be able to use 0, 1, 2, 3, and 4. That being said, since APST is enabled it shouldn't be hanging out in power state 0 all the time anyways, but, in practice, I do think it makes a difference in power draw. I'm by no means any sort of tester, but when I activate either script I see at least an hour difference in projected battery life.
Anyways, if I've misunderstood, someone please enlighten me! I hope this helps!
-Josh
On a seperate note, the arch wiki has some pertinant information regarding APST and nvme drives. It may be valuable if the pinebook pro wiki pointed to this page: https://wiki.archlinux.org/index.php/Sol...drive/NVMe
On another note: when I "sudo nvme get-feature /dev/nvme0 -f 0x0c -H the APST is apparently set to transition to Power state 3 or 4. It is not configured to transition between power states 0, 1, or 2. I'm guessing that for my drives configuration, it's either on in the highest operational power state (configured by me) or APST is setting it to a non operational power state (3 or 4).
So, if I understand this document correctly, APST is able to automatically switch between the specified power states for your drive. My drive has power states 0, 1, 2, 3, and 4. The power management mechanisms are designed to compliment, not replace APST and the controller may use APST to reduce power below the set level, but not higher than the set level. I think this means when you "sudo nvme set-feature /dev/nvme0 -f 2" you are setting the maximum power state that the controller should use, but the controller should still be able to user APST to move to lower power states. So, by setting power state 2, my controller should be able to use 2, 3, and 4. By setting to 0, my controller should be able to use 0, 1, 2, 3, and 4. That being said, since APST is enabled it shouldn't be hanging out in power state 0 all the time anyways, but, in practice, I do think it makes a difference in power draw. I'm by no means any sort of tester, but when I activate either script I see at least an hour difference in projected battery life.
Anyways, if I've misunderstood, someone please enlighten me! I hope this helps!
-Josh
On a seperate note, the arch wiki has some pertinant information regarding APST and nvme drives. It may be valuable if the pinebook pro wiki pointed to this page: https://wiki.archlinux.org/index.php/Sol...drive/NVMe
On another note: when I "sudo nvme get-feature /dev/nvme0 -f 0x0c -H the APST is apparently set to transition to Power state 3 or 4. It is not configured to transition between power states 0, 1, or 2. I'm guessing that for my drives configuration, it's either on in the highest operational power state (configured by me) or APST is setting it to a non operational power state (3 or 4).
(07-02-2020, 10:13 AM)squidd Wrote: I tried your script. It is not working for me. The script itself I think would work for me and everyone else, but my NVME seems to not accept commands to set the power state.If I'm reading the NVME document correctly, this is expected behavior. When you set to mode 2, that should be the highest possible power state leaving your controller to choose between power states 2-31 (if it has that many). As long as you are not seeing power states 0 or 1 when you set to 2, I think it's worked.
Immediately after setting to mode 2, it sets itself back to a different mode. I think it's due to the APST