2

I bought a Huawei MateBook D 16 laptop. It is shipped with Windows 11 from the vendor and worked as expected. After installing Ubuntu 22.04 and all the latest updates I'm experiencing an issue. It doesn't wake up properly when I'm closing and opening the lid. I log in to my workspace and can do nothing. If Chrome browser was open, it doesn't respond and disappear on my actions. Ubuntu menu doesn't show up. I can't launch any program. I googled solutions, but nothing helped. Only a hard reboot (keeping the power button pushed) helps, but it's not convenient for everyday usage.

System and hardware information:

$ cat /proc/version
Linux version 5.15.0-56-generic (buildd@lcy02-amd64-004) (gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022

$ hostnamectl Static hostname: pwm Icon name: computer-laptop Chassis: laptop Machine ID: 78 Boot ID: 99 Operating System: Ubuntu 22.04.1 LTS
Kernel: Linux 5.15.0-56-generic Architecture: x86-64 Hardware Vendor: HUAWEI Hardware Model: RLEF-XX

$ sudo lshw -short [sudo] password for tenux: H/W path Device Class Description ========================================================== system RLEF-XX (C170) /0 bus RLEF-XX-PCB /0/0 memory 128KiB BIOS /0/4 processor 12th Gen Intel(R) Core(TM) i7-12700H /0/4/a memory 512KiB L1 cache /0/4/b memory 4MiB L2 cache /0/4/c memory 24MiB L3 cache /0/5 memory 288KiB L1 cache /0/6 memory 192KiB L1 cache /0/7 memory 7680KiB L2 cache /0/8 memory 24MiB L3 cache /0/9 memory 256KiB L1 cache /0/15 memory 16GiB System Memory /0/15/0 memory 2GiB Row of chips LPDDR4 Synchronous 4267 MHz (0,2 ns) /0/15/1 memory 2GiB Row of chips LPDDR4 Synchronous 4267 MHz (0,2 ns) /0/15/2 memory 2GiB Row of chips LPDDR4 Synchronous 4267 MHz (0,2 ns) /0/15/3 memory 2GiB Row of chips LPDDR4 Synchronous 4267 MHz (0,2 ns) /0/15/4 memory 2GiB Row of chips LPDDR4 Synchronous 4267 MHz (0,2 ns) /0/15/5 memory 2GiB Row of chips LPDDR4 Synchronous 4267 MHz (0,2 ns) /0/15/6 memory 2GiB Row of chips LPDDR4 Synchronous 4267 MHz (0,2 ns) /0/15/7 memory 2GiB Row of chips LPDDR4 Synchronous 4267 MHz (0,2 ns) /0/100 bridge 12th Gen Core Processor Host Bridge/DRAM Registers /0/100/2 /dev/fb0 display Alder Lake-P Integrated Graphics Controller /0/100/4 generic Alder Lake Innovation Platform Framework Processor Partici /0/100/6 bridge 12th Gen Core Processor PCI Express x4 Controller #0 /0/100/6/0 /dev/nvme0 storage PCIe-8 SSD 512GB /0/100/6/0/0 hwmon3 disk NVMe disk /0/100/6/0/2 /dev/ng0n1 disk NVMe disk /0/100/6/0/1 /dev/nvme0n1 disk 512GB NVMe disk /0/100/6/0/1/1 /dev/nvme0n1p1 volume 511MiB Windows FAT volume /0/100/6/0/1/2 /dev/nvme0n1p2 volume 1709MiB EXT4 volume /0/100/6/0/1/3 /dev/nvme0n1p3 volume 474GiB EFI partition /0/100/8 generic 12th Gen Core Processor Gaussian & Neural Accelerator /0/100/a generic Platform Monitoring Technology /0/100/d bus Alder Lake-P Thunderbolt 4 USB Controller /0/100/d/0 usb1 bus xHCI Host Controller /0/100/d/1 usb2 bus xHCI Host Controller /0/100/14 bus Alder Lake PCH USB 3.2 xHCI Host Controller /0/100/14/0 usb3 bus xHCI Host Controller /0/100/14/0/1 input6 input 2.4G Mouse /0/100/14/0/3 generic USB Type-C Digital AV Adapter /0/100/14/0/7 input9 multimedia Integrated Webcam_FHD: Integrat /0/100/14/0/a communication AX201 Bluetooth /0/100/14/1 usb4 bus xHCI Host Controller /0/100/14.2 memory RAM memory /0/100/14.3 wlp0s20f3 network Alder Lake-P PCH CNVi WiFi /0/100/15 bus Alder Lake PCH Serial IO I2C Controller #0 /0/100/15.1 bus Alder Lake PCH Serial IO I2C Controller #1 /0/100/16 communication Alder Lake PCH HECI Controller /0/100/19 bus Alder Lake-P Serial IO I2C Controller #0 /0/100/19.1 bus Alder Lake-P Serial IO I2C Controller #1 /0/100/1e communication Alder Lake PCH UART #0 /0/100/1e.2 bus Intel Corporation /0/100/1f bridge Alder Lake PCH eSPI Controller /0/100/1f/0 system PnP device PNP0c02 /0/100/1f/1 system PnP device PNP0b00 /0/100/1f/2 system PnP device PNP0c02 /0/100/1f/3 input PnP device PNP0303 /0/100/1f/4 system PnP device PNP0c02 /0/100/1f/5 system PnP device PNP0c02 /0/100/1f/6 system PnP device PNP0c02 /0/100/1f.3 card0 multimedia Alder Lake PCH-P High Definition Audio Controller /0/100/1f.4 bus Alder Lake PCH-P SMBus Host Controller /0/100/1f.5 bus Alder Lake-P PCH SPI Controller /1 power HB5781P1EEW-31 /2 input0 input Lid Switch /3 input1 input Power Button /4 input10 input Huawei WMI hotkeys /5 input11 input GXTP7863:00 27C6:01E0 Mouse /6 input12 input GXTP7863:00 27C6:01E0 Touchpad /7 input14 input sof-hda-dsp Mic /8 input15 input sof-hda-dsp Headphone /9 input16 input sof-hda-dsp HDMI/DP,pcm=3 /a input17 input sof-hda-dsp HDMI/DP,pcm=4 /b input18 input sof-hda-dsp HDMI/DP,pcm=5 /c input2 input AT Translated Set 2 keyboard /d input8 input Video Bus

During the last two crashes, I pressed Ctrl + Alt + F1 (or F2) and took photos of log messages:

enter image description here

enter image description here

karel
  • 114,770
RSafe
  • 21

3 Answers3

0

I currently have the same issue on the same laptop. It seems to be caused by the SSD not waking up properly from suspend. I had some luck and got it working yesterday, but I cannot reproduce it.

For now, a good workaround is using hibernation instead of suspend, but this might wear down the SSD over time.

  • Yes, suspend turn out not stable solution for this case. The hibernation have been working properly for me for the last four months. Why do you think it might wear down the SSD over time? – RSafe Mar 16 '23 at 11:19
0

It seems like I have the same issue ((23.04) OS crashes after waking from suspend/reopening lid). Have you managed fixing the suspend function? If not, how do you make ubuntu go hibernate instead of suspend? I tried hibernate from console and it just shut down my laptop.

0

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

Toliak
  • 101
  • 1