Another power management lever: NVMe. Input wanted

I’ve had a brownout today on my RK3588 Pocket Reform on low battery when doing an npm install on a bigger node project and as the GPU wasn’t involved, my conclusion was that the NVMe was drawing too much power in that moment. So I looked for ways to throttle NVMe power, and indeed, this command gives me a nice table of the SSD’s supported power states:

sudo smartctl -c /dev/nvme0

If I understand this correctly, the first 3 entries are non-sleep modes (“Op” column with a “+” entry. And Technology Power Features - NVM Express helpfully has a command to select the power state:

sudo nvme set-feature /dev/nvme0 --feature-id=2 --value=2

Feature 2 is the power state and value 2 is the power state ID from the table. So this should limit the power draw of the SSD to 3 Watts. And indeed, I’m able to npm install at 1% battery.

Does this also work for you and what SSD model do you have? I’d like to collect some data for reform-power-daemon.

I have a 1TB Taifast with Realtek RTS5765DL controller.

2 Likes

(That was a popular setting on Pinebook Pro which was limited to 3w on the NVMe)

1 Like

I have a 1 TB WD Blue, WDS100T4B0E.

It shows five power modes, three active and three sleep:

Supported Power States
St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
 0 +     5.00W    5.00W       -    0  0  0  0        0       0
 1 +     3.30W    3.00W       -    0  0  0  0        0       0
 2 +     2.20W    2.00W       -    0  0  0  0        0       0
 3 -   0.0150W       -        -    3  3  3  3     1500    2500
 4 -   0.0050W       -        -    4  4  4  4    10000    6000
 5 -   0.0033W       -        -    5  5  5  5   176000   25000

I can change power modes with nvme, but hdparm -tT shows no performance difference, and Hyper+Enter b shows no change in battery draw, so I cannot be sure it’s working as intended.

Drive: Crucial P3 Plus 2TB (CT2000P3PSSD8), Phison-based
Reform: Pocket w/A311D

Supported Power States

St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
 0 +     6.00W  0.0000W       -    0  0  0  0        0       0
 1 +     3.00W  0.0000W       -    1  1  1  1        0       0
 2 +     1.50W  0.0000W       -    2  2  2  2        0       0
 3 -   0.0250W  0.0000W       -    3  3  3  3     5000    1900
 4 -   0.0030W       -        -    4  4  4  4    13000  100000
  • Default Pocket Reform cmdline disables NVMe power management (nvme_core.default_ps_max_latency_us=0)
  • With or without a workaround in place (latency set to 100ms), manual nvme set-feature /dev/nvme0 --feature-id=2 --value=2 works fine with this drive.
  • APST works correctly when allowed: kernel auto-populates the table, drive transitions PS0→PS3 after 100ms idle

I’m not sure why the a311d and i.mx8mp ship with latency_us=0. Regardless, this drive works fine either way.

I have an WD Green 1TB:

=== START OF INFORMATION SECTION ===
Model Number:                       WD Green SN350 1TB

and set the lowest power setting now, lets see if i notice any difference :slight_smile:

> sudo nvme get-feature /dev/nvme0n1 
get-feature:0x01 (Arbitration), Current value:0x00000004
get-feature:0x02 (Power Management), Current value:0x00000002

EDIT: Just as i feard the seeting is not reboot save. yfi
So we maybe need to set it in the reform-power-deamon if we wanna use it in the future as a default option

> sudo nvme get-feature /dev/nvme0n1 
get-feature:0x01 (Arbitration), Current value:0x00000004
get-feature:0x02 (Power Management), Current value:0x00000003

Hi all,

Raspberry Pi branded 256GB 2230 SSD here (looks like it’s really a Samsung):

lidstah@marfak:~$ sudo nvme list
Node                  Generic               SN                   Model                                    Namespace  Usage                      Format           FW Rev  
--------------------- --------------------- -------------------- ---------------------------------------- ---------- -------------------------- ---------------- --------
/dev/nvme0n1          /dev/ng0n1            S73YNXMX111111       SAMSUNG MZ9LQ256HBJD-00BVL               0x1         47.58  GB / 256.06  GB    512   B +  0 B   FXM71V1Q

And:

Supported Power States
St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
 0 +     5.36W       -        -    0  0  0  0        0       0
 1 +     4.47W       -        -    1  1  1  1        0       0
 2 +     2.23W       -        -    2  2  2  2        0     500
 3 -   0.0500W       -        -    3  3  3  3      210    1200
 4 -   0.0050W       -        -    4  4  4  4     1000    9000

(that’s on a classic reform, tho)

Lexar 8TB 2280 LNMPLY8008T-RNNNU

Supported Power States
St Op Max Active Idle RL RT WL WT Ent_Lat Ex_Lat
0 + 6.00W - - 0 0 0 0 0 0
1 + 2.60W - - 1 1 1 1 0 0
2 + 2.50W - - 2 2 2 2 0 2500
3 - 0.0500W - - 3 3 3 3 4000 8000
4 - 0.0035W - - 4 4 4 4 8000 25000

Was performing a heavy writing process. Temperature dropped from 55 to 51

Apacer AS2280P4 512GB

Supported Power States
St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
 0 +     6.50W       -        -    0  0  0  0        0       0
 1 +     5.80W       -        -    1  1  1  1        0       0
 2 +     3.60W       -        -    2  2  2  2        0       0
 3 -   0.0500W       -        -    3  3  3  3     5000   10000
 4 -   0.0025W       -        -    4  4  4  4     8000   45000

Nice, thanks for all the input… looks like all of these support a power mode “2”?!

Since you’re collecting NVMe information, I have bit different result. States for my NVMe “SAMSUNG MZVL21T0HCLR-00BL2” 1TB are different from those above, as they all seems to have low power states. Note, it’s not installed in MNT machine, as my order is at the assembly process. It seems it lack low power mode, or at least this is what I’m getting from the readings.

WD Blue SN550 (a311d classic reform)

$ sudo nvme list
[sudo] password for josch: 
Node                  Generic               SN                   Model                                    Namespace  Usage                      Format           FW Rev  
--------------------- --------------------- -------------------- ---------------------------------------- ---------- -------------------------- ---------------- --------
/dev/nvme0n1          /dev/ng0n1            21356G803663         WDC WDS100T2B0C-00PXH0                   0x1          1.00  TB /   1.00  TB    512   B +  0 B   233010WD
$ sudo smartctl -c /dev/nvme0
Supported Power States
St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
 0 +     3.50W    2.90W       -    0  0  0  0        0       0
 1 +     2.70W    2.30W       -    0  0  0  0        0       0
 2 +     1.90W    1.80W       -    0  0  0  0        0       0
 3 -   0.0250W       -        -    3  3  3  3     3900   11000
 4 -   0.0050W       -        -    4  4  4  4     5000   44000
$ sudo nvme set-feature /dev/nvme0 --feature-id=2 --value=2
set-feature:0x02 (Power Management), value:0x00000002, cdw12:00000000, save:0
$ sudo nvme get-feature /dev/nvme0n1 --feature-id=2
get-feature:0x02 (Power Management), Current value:0x00000002

Taifast P1000 1 TB (rk3588 pocket reform)

Only has a single state “0”. This is in contrast to the 1TB Taifast by @minute which has completely different output.

$ sudo nvme list
Node                  Generic               SN                   Model                                    Namespace  Usage                      Format           FW Rev  
--------------------- --------------------- -------------------- ---------------------------------------- ---------- -------------------------- ---------------- --------
/dev/nvme0n1          /dev/ng0n1            ALJK2023112100000346 SSD 1TB                                  0x1          1.00  TB /   1.00  TB    512   B +  0 B   W0613A3 
$ sudo smartctl -c /dev/nvme0
Supported Power States
St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
 0 +     6.00W       -        -    0  0  0  0        0       0
$ sudo nvme set-feature /dev/nvme0 --feature-id=2 --value=2
NVMe status: Invalid Field in Command: A reserved coded value or an unsupported value in a defined field(0x2)
$ sudo nvme get-feature /dev/nvme0 --feature-id=2
get-feature:0x02 (Power Management), Current value:00000000

Verbatim Vi3000 (imx8mq classic reform)

The powermanagement value I set for this drive refuses to stick. Even though I set it to “2” it would sometimes show 3, sometimes 4, sometimes 0 and sometimes 2.

$ sudo nvme list
Node                  Generic               SN                   Model                                    Namespace  Usage                      Format           FW Rev  
--------------------- --------------------- -------------------- ---------------------------------------- ---------- -------------------------- ---------------- --------
/dev/nvme0n1          /dev/ng0n1            TD25030000154        Verbatim Vi3000 SSD                      0x1        256.06  GB / 256.06  GB    512   B +  0 B   GT87e58e
$ sudo smartctl -c /dev/nvme0
Supported Power States
St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
 0 +     6.50W       -        -    0  0  0  0        0       0
 1 +     5.80W       -        -    1  1  1  1        0       0
 2 +     3.60W       -        -    2  2  2  2        0       0
 3 -   0.7460W       -        -    3  3  3  3     5000   10000
 4 -   0.7260W       -        -    4  4  4  4     8000   45000
$ sudo nvme set-feature /dev/nvme0 --feature-id=2 --value=2
set-feature:0x02 (Power Management), value:0x00000002, cdw12:00000000, save:0
$ sudo nvme get-feature /dev/nvme0 --feature-id=2
get-feature:0x02 (Power Management), Current value:0x00000004

Intenso Top (ls1028a classic reform)

This is not a PCI-E SSD but a SATA SSD, so this cannot work. Irrelevant here.

Patriot P320 (imx8m+ classic reform)

I booted this one from an SD-card but I had a partition from the SSD mounted.

$ sudo nvme list
Node                  Generic               SN                   Model                                    Namespace  Usage                      Format           FW Rev  
--------------------- --------------------- -------------------- ---------------------------------------- ---------- -------------------------- ---------------- --------
/dev/nvme0n1          /dev/ng0n1            P320HHBB250821002627 Patriot M.2 P320 128GB                   0x1        128.04  GB / 128.04  GB    512   B +  0 B   APF1M7R0
$ sudo smartctl -c /dev/nvme0
Supported Power States
St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
 0 +     3.50W       -        -    0  0  0  0        0       0
 1 +     1.90W       -        -    1  1  1  1        0       0
 2 +     1.50W       -        -    2  2  2  2        0       0
 3 -   0.0700W       -        -    3  3  3  3     1000    1000
 4 -   0.0050W       -        -    4  4  4  4     5000   45000
$ sudo nvme set-feature /dev/nvme0 --feature-id=2 --value=2
set-feature:0x02 (Power Management), value:0x00000002, cdw12:00000000, save:0
$ sudo nvme get-feature /dev/nvme0 --feature-id=2
get-feature:0x02 (Power Management), Current value:0x00000004

I haven’t yet opened it up to see what it’s labeled as but the SSD in my Pocket Reform annoyingly reports itself as just “SSD 1TB”:

Node                  Generic               SN                   Model                                    Namespace  Usage                      Format           FW Rev  
--------------------- --------------------- -------------------- ---------------------------------------- ---------- -------------------------- ---------------- --------
/dev/nvme0n1          /dev/ng0n1            ALJK2023112100000515 SSD 1TB                                  0x1          1.00  TB /   1.00  TB    512   B +  0 B   W0613A3 

…and seems to only support power state 0:

jfred@terrapocket ~$ sudo smartctl -c /dev/nvme0
smartctl 7.5 2025-04-30 r5714 [aarch64-linux-6.19.14-mnt-reform-arm64] (local build)
Copyright (C) 2002-25, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Firmware Updates (0x12):            1 Slot, no Reset required
Optional Admin Commands (0x0017):   Security Format Frmw_DL Self_Test
Optional NVM Commands (0x0015):     Comp DS_Mngmt Sav/Sel_Feat
Log Page Attributes (0x03):         S/H_per_NS Cmd_Eff_Lg
Maximum Data Transfer Size:         64 Pages
Warning  Comp. Temp. Threshold:     83 Celsius
Critical Comp. Temp. Threshold:     85 Celsius

Supported Power States
St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
 0 +     6.00W       -        -    0  0  0  0        0       0

Supported LBA Sizes (NSID 0x1)
Id Fmt  Data  Metadt  Rel_Perf
 0 +     512       0         0

This is the NVMe drive that came with the device - only one power state…


Node                  Generic               SN                   Model                                    Namespace  Usage                      Format           FW Rev




/dev/nvme0n1          /dev/ng0n1            ALJK2023112100000283 SSD 1TB                                  0x1          1.00  TB /   1.00  TB    512   B +  0 B   W0613A3
=== START OF INFORMATION SECTION ===
Firmware Updates (0x12):            1 Slot, no Reset required
Optional Admin Commands (0x0017):   Security Format Frmw_DL Self_Test
Optional NVM Commands (0x0015):     Comp DS_Mngmt Sav/Sel_Feat
Log Page Attributes (0x03):         S/H_per_NS Cmd_Eff_Lg
Maximum Data Transfer Size:         64 Pages
Warning  Comp. Temp. Threshold:     83 Celsius
Critical Comp. Temp. Threshold:     85 Celsius

Supported Power States
St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
 0 +     6.00W       -        -    0  0  0  0        0       0

Supported LBA Sizes (NSID 0x1)
Id Fmt  Data  Metadt  Rel_Perf
 0 +     512       0         0

@jfred @grabo That’s the “Taifast P1000” SSD you got. I have one too and you can see that the output of the “SN” column is similar. Mine also only has a single power state.

1 Like

Since the output of smartctl is not machine readable, maybe the prospective new script should parse the output of:

sudo nvme id-ctrl /dev/nvme0 --output-format=json | jq '.psds'
1 Like
sudo nvme list
Node                  Generic               SN                   Model                                    Namespace  Usage                      Format           FW Rev  
--------------------- --------------------- -------------------- ---------------------------------------- ---------- -------------------------- ---------------- --------
/dev/nvme0n1          /dev/ng0n1            23101920000769       PCIe SSD                                 0x1          2.00  TB /   2.00  TB    512   B +  0 B   EIFM80.0

Only one power mode I guess. Inland brand 2T drive.

That’s the command to identify the model, sudo smartctl -c /dev/nvme0 will get you the power states.

1 Like

Thanks for the correction.

=== START OF INFORMATION SECTION ===
Firmware Updates (0x12):            1 Slot, no Reset required
Optional Admin Commands (0x0017):   Security Format Frmw_DL Self_Test
Optional NVM Commands (0x005d):     Comp DS_Mngmt Wr_Zero Sav/Sel_Feat Timestmp
Log Page Attributes (0x0c):         Ext_Get_Lg Telmtry_Lg
Maximum Data Transfer Size:         512 Pages
Warning  Comp. Temp. Threshold:     82 Celsius
Critical Comp. Temp. Threshold:     84 Celsius

Supported Power States
St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
 0 +     8.80W       -        -    0  0  0  0        0       0
 1 +     7.10W       -        -    1  1  1  1        0       0
 2 +     5.20W       -        -    2  2  2  2        0       0
 3 -   0.0620W       -        -    3  3  3  3     2500    7500
 4 -   0.0440W       -        -    4  4  4  4    10500   65000

Supported LBA Sizes (NSID 0x1)
Id Fmt  Data  Metadt  Rel_Perf
 0 +     512       0         2
 1 -    4096       0         1