Talk:Pinebook Pro Hardware Accessory Compatibility

From PINE64
Revision as of 05:00, 23 December 2020 by HitsuMaruku (talk | contribs)
Jump to navigation Jump to search

NVMe SSD power testing

NVME SSD power testing: I'd like to find out what the maximum sustained wattage for NVME drives is. 2.5W has been quoted as being safe, but I've tested 2.7W extensively without issues. Please try the following test if your power state is over 2.7W:

  • Run off battery.
  • Set your brightness level to maximum.
  • Apply a sustained CPU load on all cores but one.
  • Run 'sudo hdparm -t /dev/nvme0' continuously for 5 minutes.

The test passes if your PBP does not crash (red-green blinking power led). I will write a script later to automate the test, but for now these instructions should suffice. If you think this would work better in a forum thread, let me know and I'll start one. I hope to see some of your findings! --Natrox (talk) 03:58, 3 February 2020 (UTC)

Intel 660p

Got an Intel 660p 2TB. Added power states to the table. Lowest active state is just above the 2.5W recommendation.

$ sudo nvme id-ctrl /dev/nvme0
ps    0 : mp:5.50W operational enlat:0 exlat:0 rrt:0 rrl:0
          rwt:0 rwl:0 idle_power:- active_power:-
ps    1 : mp:3.60W operational enlat:0 exlat:0 rrt:1 rrl:1
          rwt:1 rwl:1 idle_power:- active_power:-
ps    2 : mp:2.60W operational enlat:0 exlat:0 rrt:2 rrl:2
          rwt:2 rwl:2 idle_power:- active_power:-
ps    3 : mp:0.0300W non-operational enlat:5000 exlat:5000 rrt:3 rrl:3
          rwt:3 rwl:3 idle_power:- active_power:-
ps    4 : mp:0.0040W non-operational enlat:5000 exlat:9000 rrt:4 rrl:4
          rwt:4 rwl:4 idle_power:- active_power:-

Saving power state to NVMe firmware is not supported. Attempting to do so will result in an error, and will not execute the change. Use without -s flag.

$ sudo nvme set-feature /dev/nvme0 -f 2 -v 2 -s
NVMe status: FEATURE_NOT_SAVEABLE: The Feature Identifier specified does not support a saveable value(0x10d)

--HitsuMaruku (talk) 05:00, 23 December 2020 (UTC)


NVMe SSD Power State Script

systemd

Made a systemd service to handle setting the power state for reboot and (sleep) resume. These appear to work with my Intel 660p 2TB, with limited testing; they may or may not work with other models.

/usr/local/bin/nvme-power-limit.sh
Make this file executable.
nvme set-feature /dev/nvme0 -f 2 -v 2
/etc/systemd/system/nvme-power-limit.service
Enable this service to run on boot.
[Unit]
Description=NVMe Power State Limiter
After=suspend.target

[Service]
User=root
Type=oneshot
ExecStart=/bin/bash /usr/local/bin/nvme-power-limit.sh
TimeoutSec=0
StandardOutput=syslog

[Install]
WantedBy=multi-user.target
WantedBy=suspend.target

--HitsuMaruku (talk) 05:00, 23 December 2020 (UTC)