I have the same issue with my Huawei Matebook D16 RLEF-X.
In my case, the issue relates to the dmesg message (tested and received in USB-live OS)
nvme 0000:01:00.0: can't change power state from D3cold to D0 (config space inaccessible)
The good news are that I have found a solution.
The bad news -- it requires to patch and recompile the kernel.
The kernel patch consists of forcefully disabling ability to put the NVMe into the D3cold state.
Inside the kernel sources in the file drivers/pci/quirks.c
I put the line:
DECLARE_PCI_FIXUP_CLASS_EARLY(0x126f, PCI_ANY_ID,
0x0108, 8, quirk_no_ata_d3);
after the similar line for PCI_VENDOR_ID_VIA
.
The "magic numbers" 0x126f and 0x0108 are VENDOR_ID and CLASS_ID, respectively. They can be obtained using lspci -nn
command:
lspci -nn | grep Non-V
01:00.0 Non-Volatile memory controller [0108]: Silicon Motion, Inc. Device [126f:1001] (rev 03)
^^^^ ^^^^
Unfortunately, I could not provide a complete kernel recompilation guide for Ubuntu. Maybe the "BuildYourOwnKernel" topic could help.
Full research (maybe will be helpful for someone) on the NVMe suspending issue on the Huawei laptop is located on my GitHub Gist