我买了一台华为 MateBook D 16 笔记本电脑。它预装了供应商提供的 Windows 11,运行正常。安装 Ubuntu 22.04 和所有最新更新后,我遇到了一个问题。当我合上和打开盖子时,它无法正常唤醒。我登录到我的工作区,但什么也做不了。如果 Chrome 浏览器已打开,它不会响应我的操作并消失。Ubuntu 菜单没有显示。我无法启动任何程序。我在谷歌上搜索解决方案,但没有任何帮助。只有硬重启(按住电源按钮)才有用,但这对于日常使用来说并不方便。
系统和硬件信息:
$ 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: 7*8
Boot ID: 9*9
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
在最近两次崩溃期间,我按下了 Ctrl + Alt + F1(或 F2)并拍摄了日志消息的照片:
答案1
我目前在同一台笔记本电脑上遇到了同样的问题。这似乎是由于 SSD 无法从挂起状态正常唤醒造成的。我昨天很幸运地让它工作了,但我无法重现它。
目前,一个好的解决方法是使用休眠而不是挂起,但这可能会随着时间的推移磨损 SSD。
答案2
好像我也有同样的问题((23.04)从挂起状态唤醒/重新打开盖子后操作系统崩溃)。你成功修复了挂起功能吗?如果没有,你如何让 ubuntu 进入休眠而不是挂起?我尝试从控制台进入休眠,结果它关闭了我的笔记本电脑。
答案3
我的华为 Matebook D16 RLEF-X 也遇到了同样的问题。
就我而言,该问题与 dmesg 消息有关(在 USB-live OS 中测试并接收)
nvme 0000:01:00.0: can't change power state from D3cold to D0 (config space inaccessible)
好消息是我找到了解决方案。坏消息是——它需要修补并重新编译内核。
内核补丁包括强制禁用将 NVMe 置于 D3cold 状态的功能。
在内核源文件中drivers/pci/quirks.c
我放入了以下行:
DECLARE_PCI_FIXUP_CLASS_EARLY(0x126f, PCI_ANY_ID,
0x0108, 8, quirk_no_ata_d3);
在类似的行之后PCI_VENDOR_ID_VIA
。
“魔法数字” 0x126f 和 0x0108 分别是 VENDOR_ID 和 CLASS_ID。它们可以使用以下lspci -nn
命令获取:
lspci -nn | grep Non-V
01:00.0 Non-Volatile memory controller [0108]: Silicon Motion, Inc. Device [126f:1001] (rev 03)
^^^^ ^^^^
不幸的是,我无法提供完整的 Ubuntu 内核重新编译指南。也许“BuildYourOwnKernel”主题有帮助。
关于华为笔记本电脑 NVMe 暂停问题的完整研究(可能对某些人有帮助)位于我的 GitHub Gist