ThinkPad P16 sleep and hibernation problems

Hi!

I’m having problems with sleep and hibernation on my ThinkPad P16 Gen 1. When I try to sleep/hibernate after several seconds my screen awekens and login screen is shown. I found at journalctl logs entries record ACPI: EC: interrupt blocked and thought that acpi_osi string might fix this problem, but it didn’t worked.
I use kernel version 5.15.93 and optimus-manager for GPU switching.

Does anybody knows how should I solve this issue?

system info:

System:
  Kernel: 5.15.93-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.2.1
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.15-x86_64
    root=UUID=d2835200-dfa1-4419-b102-5da29e7dcbae rw "acpi_osi=Windows 2022"
    resume=UUID=d2835200-dfa1-4419-b102-5da29e7dcbae resume_offset=4239360
    splash udev.log_priority=3
  Desktop: KDE Plasma v: 5.26.5 tk: Qt v: 5.15.8 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 21D7S2AV1M v: ThinkPad P16 Gen 1
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: LENOVO model: 21D7S2AV1M v: SDK0T76538 WIN
    serial: <superuser required> UEFI: LENOVO v: N3FET29W (1.14 )
    date: 09/02/2022
Battery:
  ID-1: BAT0 charge: 63.6 Wh (65.7%) condition: 96.8/94.0 Wh (102.9%)
    volts: 12.4 min: 11.6 model: LGES 5B10W51894 type: Li-poly serial: <filter>
    status: charging cycles: 5
CPU:
  Info: model: 12th Gen Intel Core i7-12850HX bits: 64 type: MST AMCP
    arch: Alder Lake gen: core 12 level: v3 note: check built: 2021+
    process: Intel 7 (10nm ESF) family: 6 model-id: 0x97 (151) stepping: 2
    microcode: 0x26
  Topology: cpus: 1x cores: 16 mt: 8 tpc: 2 st: 8 threads: 24 smt: enabled
    cache: L1: 1.4 MiB desc: d-8x32 KiB, 8x48 KiB; i-8x32 KiB, 8x64 KiB
    L2: 14 MiB desc: 8x1.2 MiB, 2x2 MiB L3: 25 MiB desc: 1x25 MiB
  Speed (MHz): avg: 800 high: 801 min/max: 800/4700:4800:3400 scaling:
    driver: intel_pstate governor: powersave cores: 1: 800 2: 800 3: 800 4: 800
    5: 800 6: 800 7: 800 8: 801 9: 800 10: 801 11: 801 12: 800 13: 800 14: 801
    15: 800 16: 800 17: 800 18: 800 19: 799 20: 800 21: 800 22: 799 23: 800
    24: 800 bogomips: 116160
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl and seccomp
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 status: Vulnerable: eIBRS with unprivileged eBPF
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel Alder Lake-HX GT1 [UHD Graphics 770] vendor: Lenovo
    driver: i915 v: kernel arch: Gen-12.2 process: Intel 10nm built: 2021-22+
    ports: active: eDP-1 empty: none bus-ID: 00:02.0 chip-ID: 8086:4688
    class-ID: 0300
  Device-2: NVIDIA GA107GLM [RTX A2000 8GB Laptop GPU] vendor: Lenovo
    driver: nvidia v: 470.161.03 alternate: nouveau,nvidia_drm non-free: 525.xx+
    status: current (as of 2023-02) arch: Ampere code: GAxxx
    process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 4 speed: 16 GT/s lanes: 8
    link-max: lanes: 16 ports: active: none empty: DP-1, DP-2, DP-3, HDMI-A-1
    bus-ID: 01:00.0 chip-ID: 10de:25ba class-ID: 0300
  Device-3: Acer Integrated Camera type: USB driver: uvcvideo bus-ID: 1-4:3
    chip-ID: 5986:1177 class-ID: fe01 serial: <filter>
  Display: x11 server: X.Org v: 21.1.7 compositor: kwin_x11 driver: X:
    loaded: modesetting,nvidia dri: iris gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1200 s-dpi: 96 s-size: 508x317mm (20.00x12.48")
    s-diag: 599mm (23.57")
  Monitor-1: eDP-1 mapped: eDP-1-1 model: BOE Display 0x0a7d built: 2021
    res: 1920x1200 hz: 60 dpi: 141 gamma: 1.2 size: 345x215mm (13.58x8.46")
    diag: 407mm (16") ratio: 16:10 modes: 1920x1200
  API: OpenGL v: 4.6.0 NVIDIA 470.161.03 renderer: NVIDIA RTX A2000 8GB
    Laptop GPU/PCIe/SSE2 direct-render: Yes
Audio:
  Device-1: Intel Alder Lake-S HD Audio vendor: Lenovo
    driver: sof-audio-pci-intel-tgl
    alternate: snd_hda_intel,snd_sof_pci_intel_tgl bus-ID: 00:1f.3
    chip-ID: 8086:7ad0 class-ID: 0403
  Device-2: NVIDIA vendor: Lenovo driver: snd_hda_intel v: kernel pcie:
    gen: 4 speed: 16 GT/s lanes: 8 link-max: lanes: 16 bus-ID: 01:00.1
    chip-ID: 10de:2291 class-ID: 0403
  Sound API: ALSA v: k5.15.93-1-MANJARO running: yes
  Sound Server-1: JACK v: 1.9.21 running: no
  Sound Server-2: PulseAudio v: 16.1 running: yes
  Sound Server-3: PipeWire v: 0.3.65 running: yes
Network:
  Device-1: Intel Alder Lake-S PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:7af0 class-ID: 0280
  IF: wlp0s20f3 state: up mac: <filter>
  IF-ID-1: docker0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel type: USB driver: btusb v: 0.8 bus-ID: 1-14:5
    chip-ID: 8087:0033 class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 1 state: up address: see --recommends
Drives:
  Local Storage: total: 476.94 GiB used: 59.1 GiB (12.4%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Micron model: MTFDKBA512TFH
    size: 476.94 GiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: 7005P7LN temp: 39.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 476.64 GiB size: 468.09 GiB (98.21%)
    used: 59.1 GiB (12.6%) fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 312 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 40 GiB used: 0 KiB (0.0%) priority: -2
    file: /swapfile
Sensors:
  System Temperatures: cpu: 34.0 C mobo: N/A gpu: nvidia temp: 38 C
  Fan Speeds (RPM): fan-1: 1769
Info:
  Processes: 408 Uptime: 26m wakeups: 2476 Memory: 31.05 GiB
  used: 2.55 GiB (8.2%) Init: systemd v: 252 default: graphical
  tool: systemctl Compilers: gcc: 12.2.1 clang: 15.0.7 Packages: pm: pacman
  pkgs: 1270 libs: 358 tools: pamac,yay pm: flatpak pkgs: 0 Shell: Zsh v: 5.9
  default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.25

/etc/fstab:

# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=1DBC-60A0                            /boot/efi      vfat    umask=0077 0 2
UUID=d2835200-dfa1-4419-b102-5da29e7dcbae /              ext4    defaults,noatime 0 1
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0
/swapfile none swap defaults 0 0

swapfile size:

-rw------- 1 root root 40G Feb 20 23:30 /swapfile

Hi there.

I did a brief search online & one of the suggestions was to try an older LTS kernel. If you haven’t tried 5.10 yet, it might be worth installing & selecting on reboot - just to rule it out.

There is also quite a bit on the Arch Wiki here, toward the bottom of the page…

https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate

I hope you find your solution soon. More power to you.

Ruziel :slight_smile:

Thank you!

I’m unable to use older kernel 5.10. Having this messages on boot:

[  4.347440] intel-spi 0000:00:1F.5: unrecognized JEDEC in bytes: 3c f0 30 09 00 1c
[  4.493082] iwlwifi 0000:00:14.3: no suitable firmware found!
[  4.493694] iwlwifi 0000:00:14.3: minimum version required: iwlwifi-so-a0-gf-a0-39
[  4.493193] iwlwifi 0000:00:14.3: maximum version supported: iwlwifi-so-a0-gf-a0-59
[  4.493112] iwlwifi 0000:00:14.3: check git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
[  5.950680]
1 Like

Ah okay, understood. You’ve probably tried 6.1 already but if not, that’s worth trying just so you can cross it off the list. Sorry I can’t help you more! R

I’ve tried 6.1 earlier and it didn’t work.
I have given it a try, installed 6.1.12-1 kernel. After that I’ve tried to remove optimus manager, nvidia470 drivers and acpi_osi string (for clear test).
After that suspend finally worked! But hibernate is still not working.

new system info:

System:
  Kernel: 6.1.12-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.2.1
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1-x86_64
    root=UUID=d2835200-dfa1-4419-b102-5da29e7dcbae rw quiet
    resume=UUID=d2835200-dfa1-4419-b102-5da29e7dcbae resume_offset=4239360
    splash udev.log_priority=3
  Desktop: KDE Plasma v: 5.26.5 tk: Qt v: 5.15.8 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 21D7S2AV1M v: ThinkPad P16 Gen 1
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: LENOVO model: 21D7S2AV1M v: SDK0T76538 WIN
    serial: <superuser required> UEFI: LENOVO v: N3FET32W (1.17 )
    date: 12/20/2022
Battery:
  ID-1: BAT0 charge: 96.7 Wh (100.0%) condition: 96.7/94.0 Wh (102.9%)
    volts: 13.1 min: 11.6 model: LGES 5B10W51894 type: Li-poly serial: <filter>
    status: full cycles: 6
CPU:
  Info: model: 12th Gen Intel Core i7-12850HX bits: 64 type: MST AMCP
    arch: Alder Lake gen: core 12 level: v3 note: check built: 2021+
    process: Intel 7 (10nm ESF) family: 6 model-id: 0x97 (151) stepping: 2
    microcode: 0x26
  Topology: cpus: 1x cores: 16 mt: 8 tpc: 2 st: 8 threads: 24 smt: enabled
    cache: L1: 1.4 MiB desc: d-8x32 KiB, 8x48 KiB; i-8x32 KiB, 8x64 KiB
    L2: 14 MiB desc: 8x1.2 MiB, 2x2 MiB L3: 25 MiB desc: 1x25 MiB
  Speed (MHz): avg: 2333 high: 2400 min/max: 800/4700:4800:3400 scaling:
    driver: intel_pstate governor: powersave cores: 1: 2400 2: 2400 3: 2400
    4: 2400 5: 2400 6: 2400 7: 2400 8: 2400 9: 800 10: 2400 11: 2400 12: 2400
    13: 2400 14: 2400 15: 2400 16: 2400 17: 2400 18: 2400 19: 2400 20: 2400
    21: 2400 22: 2400 23: 2400 24: 2400 bogomips: 116160
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Enhanced IBRS, IBPB: conditional, RSB
    filling, PBRSB-eIBRS: SW sequence
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel Alder Lake-HX GT1 [UHD Graphics 770] vendor: Lenovo
    driver: i915 v: kernel arch: Gen-12.2 process: Intel 10nm built: 2021-22+
    ports: active: eDP-1 empty: none bus-ID: 00:02.0 chip-ID: 8086:4688
    class-ID: 0300
  Device-2: NVIDIA GA107GLM [RTX A2000 8GB Laptop GPU] vendor: Lenovo
    driver: nouveau v: kernel non-free: 525.xx+ status: current (as of 2023-02)
    arch: Ampere code: GAxxx process: TSMC n7 (7nm) built: 2020-22 pcie:
    gen: 4 speed: 16 GT/s lanes: 8 link-max: lanes: 16 ports: active: none
    empty: DP-1, DP-2, DP-3, HDMI-A-1, eDP-2 bus-ID: 01:00.0
    chip-ID: 10de:25ba class-ID: 0300
  Device-3: Acer Integrated Camera type: USB driver: uvcvideo bus-ID: 1-4:3
    chip-ID: 5986:1177 class-ID: fe01 serial: <filter>
  Display: x11 server: X.Org v: 21.1.7 compositor: kwin_x11 driver: X:
    loaded: modesetting alternate: fbdev,vesa dri: iris gpu: i915 display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 1920x1200 s-dpi: 96 s-size: 508x317mm (20.00x12.48")
    s-diag: 599mm (23.57")
  Monitor-1: eDP-1 model: BOE Display 0x0a7d built: 2021 res: 1920x1200
    hz: 60 dpi: 141 gamma: 1.2 size: 345x215mm (13.58x8.46") diag: 407mm (16")
    ratio: 16:10 modes: 1920x1200
  API: OpenGL v: 4.6 Mesa 22.3.5 renderer: Mesa Intel UHD Graphics (ADL-S
    GT1) direct-render: Yes
Audio:
  Device-1: Intel Alder Lake-S HD Audio vendor: Lenovo
    driver: sof-audio-pci-intel-tgl
    alternate: snd_hda_intel,snd_sof_pci_intel_tgl bus-ID: 00:1f.3
    chip-ID: 8086:7ad0 class-ID: 0403
  Device-2: NVIDIA vendor: Lenovo driver: snd_hda_intel v: kernel pcie:
    gen: 4 speed: 16 GT/s lanes: 8 link-max: lanes: 16 bus-ID: 01:00.1
    chip-ID: 10de:2291 class-ID: 0403
  Sound API: ALSA v: k6.1.12-1-MANJARO running: yes
  Sound Server-1: JACK v: 1.9.22 running: no
  Sound Server-2: PulseAudio v: 16.1 running: yes
  Sound Server-3: PipeWire v: 0.3.65 running: yes
Network:
  Device-1: Intel Alder Lake-S PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:7af0 class-ID: 0280
  IF: wlp0s20f3 state: up mac: <filter>
  IF-ID-1: docker0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel type: USB driver: btusb v: 0.8 bus-ID: 1-14:5
    chip-ID: 8087:0033 class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
Drives:
  Local Storage: total: 476.94 GiB used: 59.57 GiB (12.5%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Micron model: MTFDKBA512TFH
    size: 476.94 GiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: 7006P7LN temp: 34.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 476.64 GiB size: 468.09 GiB (98.21%)
    used: 59.55 GiB (12.7%) fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 21.3 MiB (7.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 40 GiB used: 0 KiB (0.0%) priority: -2
    file: /swapfile
Sensors:
  System Temperatures: cpu: 35.0 C mobo: N/A
  Fan Speeds (RPM): fan-1: 0 fan-2: 0
Info:
  Processes: 364 Uptime: 8m wakeups: 500 Memory: 31.05 GiB
  used: 1.93 GiB (6.2%) Init: systemd v: 252 default: graphical
  tool: systemctl Compilers: gcc: 12.2.1 clang: 15.0.7 Packages: pm: pacman
  pkgs: 1274 libs: 357 tools: pamac,yay pm: flatpak pkgs: 0 Shell: Zsh v: 5.9
  default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.25

journalctl log on hibernate:

> journalct -f -p 3
Feb 21 14:12:57 ishimura kernel: Non-boot CPUs are not disabled
Feb 21 14:12:57 ishimura kernel: pcieport 0000:20:00.0: Unable to change power state from unknown to D0, device inaccessible
Feb 21 14:12:57 ishimura kernel: pcieport 0000:21:01.0: Unable to change power state from unknown to D0, device inaccessible
Feb 21 14:12:57 ishimura kernel: pcieport 0000:21:00.0: Unable to change power state from unknown to D0, device inaccessible
Feb 21 14:12:57 ishimura kernel: pcieport 0000:21:02.0: Unable to change power state from unknown to D0, device inaccessible
Feb 21 14:12:57 ishimura kernel: pcieport 0000:21:03.0: Unable to change power state from unknown to D0, device inaccessible
Feb 21 14:12:57 ishimura kernel: thunderbolt 0000:22:00.0: Unable to change power state from unknown to D0, device inaccessible
Feb 21 14:12:57 ishimura kernel: xhci_hcd 0000:48:00.0: Unable to change power state from unknown to D0, device inaccessible
Feb 21 14:12:57 ishimura kernel: xhci_hcd 0000:48:00.0: Unable to change power state from D3cold to D0, device inaccessible
Feb 21 14:12:57 ishimura kernel: xhci_hcd 0000:48:00.0: PCI post-resume error -19!
Feb 21 14:12:57 ishimura kernel: xhci_hcd 0000:48:00.0: HC died; cleaning up
Feb 21 14:12:57 ishimura kernel: xhci_hcd 0000:48:00.0: PM: dpm_run_callback(): pci_pm_restore+0x0/0xe0 returns -19
Feb 21 14:12:57 ishimura kernel: xhci_hcd 0000:48:00.0: PM: failed to restore async: error -19

I’m glad to hear you’ve at least got “suspend” to work - that’s a step forward. Is your Swap large enough? Apparently hibernate can still work if Swap is smaller than RAM but I thought I’d mention it.

You’ve got a very nice notebook there! I’m a big fan of ThinkPads & they tend to work great with Linux + built like tanks.

1 Like

Thank you!
It’s my third Lenovo laptop and they all are amazing!

Following this guide Swap - Manjaro I’ve created 40G swapfile for my 32G RAM capacity.

-rw------- 1 root root 40G Feb 20 23:30 /swapfile

That should be plenty. I hope you sort this soon.

The P-Series are awesome. I bought the old W-series workstation quite a few years ago & was very impressed.

More power to you meantime, R :slight_smile:

1 Like

Thank you!

I solved hibernation issue.
I added acpi_osi=‘Windows 2022’ to grub config:

GRUB_CMDLINE_LINUX_DEFAULT="acpi_osi='Windows 2022' resume=UUID=d2835200-dfa1-4419-b102-5da29e7dcbae resume_offset=4239360 splash udev.log_priority=3 ibt=off"

and by following this troubleshooting guide Power management/Suspend and hibernate - ArchWiki created config file:

> cat /etc/systemd/sleep.conf.d/hibernatemode.conf
[Sleep]
HibernateMode=shutdown

And it all finally works!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.