Comment 5 for bug 1942624

Revision history for this message
Steven Clarkson (sclarkson) wrote : Re: NVME "can't change power state from D3Cold to D0 (config space inaccessible)"

I also encounter this bug in the impish 5.13 kernel. The machine boots, but without one of the NVMe devices. This is on a very recent Razer Blade 15 laptop (RZ09-0409x) with two NVMe drives. One with windows and one with Ubuntu.

Upstream kernel 5.15 did not have this issue. I was able to bisect the fix back to

bc2836859643 ACPI: PM: Do not turn off power resources in unknown state

This patch is marked as fixing a commit that first landed in 5.14, but this commit was a rework, and the actual broken logic was introduced much earlier in 5.13. As such, the fix requires a few additional cherry picks.

On 5.13.0-22-generic

$ dmesg | grep nvme
[sudo] password for ubuntu:
[ 1.266638] nvme nvme0: pci function 0000:02:00.0
[ 1.266646] nvme 0000:02:00.0: can't change power state from D3cold to D0 (config space inaccessible)
[ 1.266696] nvme nvme1: pci function 0000:03:00.0
[ 1.267189] nvme nvme0: Removing after probe failure status: -19
[ 1.273614] nvme nvme1: missing or invalid SUBNQN field.
[ 1.273633] nvme nvme1: Shutdown timeout set to 8 seconds
[ 1.290515] nvme nvme1: 16/0/0 default/read/poll queues
[ 1.293385] nvme1n1: p1 p2
[ 4.297893] EXT4-fs (nvme1n1p2): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[ 4.584787] EXT4-fs (nvme1n1p2): re-mounted. Opts: errors=remount-ro. Quota mode: none.

First nvme device does not show up in lsblk.

After apply the following patch set to the master-next of the impish kernel,

587024b8210d ACPI: power: Use u8 as the power resource state data type
ca84f18798a4 ACPI: power: Save the last known state of each power resource
6381195ad7d0 ACPI: power: Rework turning off unused power resources
db9b6d87a8d4 ACPI: power: Use dev_dbg() to print some messages
fad40a624854 ACPI: power: Use acpi_handle_debug() to print debug messages
bc2836859643 ACPI: PM: Do not turn off power resources in unknown state

The nvme power state error is no longer present, and the device loads properly.

Also, the fixing patch was marked for inclusion in 5.14 stable, but never made it since it did not cherry pick cleanly. Just the last two patches in the above list are needed for the 5.14 kernel.