[Hibernation] Intermittent black screen / freeze on Lenovo ThinkPad P16s Gen 5 AMD (Ryzen AI 9 / Radeon 890M)

Hello everyone,

I’m experiencing serious reliability issues with hibernation on my Lenovo ThinkPad P16s Gen 5 running Manjaro KDE.

Hibernation sometimes works correctly, but quite often the machine ends up with a black screen and becomes completely unresponsive, requiring a forced shutdown.

I’m trying to determine whether this is related to AMDGPU, the Linux kernel, ACPI/BIOS firmware, or power management.

To be precise, hibernate always work, but 2nd resume never works :

  • 1st hibernation / 1st resume → ok
  • 2nd hibernation → ok
  • 2nd resume → KO**

Hardware and software configuration

Laptop:

  • Manufacturer: Lenovo
  • Model: ThinkPad P16s Gen 5
  • Machine type: 21XGCTO1WW
  • CPU: AMD Ryzen AI 9 HX PRO 470
  • Integrated GPU: AMD Radeon 890M
  • RAM: 34 GB installed (approximately 23 GiB reported by free)
  • Storage: NVMe SSD

Software:

  • Distribution: Manjaro Linux
  • Desktop environment: KDE Plasma 6.7.5
  • KDE Frameworks: 6.30.0
  • Qt: 6.11.2
  • Kernel currently used: 7.2.9-1-MANJARO
  • Additional kernel tested: Linux 6.18 LTS
  • Display server: Wayland

Current hibernation configuration

I’m using a 32 GiB swapfile:

NAME      TYPE SIZE USED
/swapfile file  32G   0B

Root filesystem:

/dev/nvme0n1p3 ext4

Swapfile resume configuration:

resume=/dev/nvme0n1p3
resume_offset=124928

Root filesystem UUID:

5868591e-33de-42be-9515-9f0c3c2ffe8b

filefrag -v /swapfile reports 45 extents. The first physical extent starts at offset 124928, matching the configured resume_offset.

My /etc/mkinitcpio.conf contains:

MODULES=(amdgpu)
HOOKS=(base udev autodetect microcode kms modconf block keyboard keymap consolefont plymouth resume filesystems fsck)

The swapfile and resume configuration appear to be correct.


Troubleshooting already performed

A. pm_async=0

I tested disabling asynchronous device suspend/resume:

echo 0 | sudo tee /sys/power/pm_async

The problem remained intermittent: one successful cycle followed by another failure.

I also tested the kernel boot parameter:

pm_async=off

It correctly resulted in:

/sys/power/pm_async = 0

However, this did not solve the issue.

The experimental GRUB parameters added during troubleshooting have since been removed.

B. Different kernel versions

I tested both:

  • Linux 7.2.9-1-MANJARO
  • Linux 6.18 LTS

The problem occurs with both kernels.

C. Kernel power management tests (pm_test)

I successfully tested all five available PM test levels:

freezer
devices
platform
processors
core

All five tests completed successfully.

D. test_resume

I tested the kernel’s test_resume mechanism using:

sudo sh -c 'echo test_resume > /sys/power/disk && echo disk > /sys/power/state'

Result: complete black screen and system freeze.

The same behavior occurs:

  • On Linux 7.2.9.
  • On Linux 6.18.
  • Even after stopping KDE and the display manager and running the test from a text console (TTY).

Therefore, the issue is not limited to the KDE graphical session.

E. Alternative hibernation mode (shutdown)

I also attempted to use the shutdown hibernation mode through /sys/power/disk.

The attempt was unsuccessful and required a forced shutdown.

I have not established whether systemd was overriding the selected mode, so this test may not be conclusive.

F. Disabling AMDGPU GFXOFF

I found the following AMDGPU debugfs interfaces:

/sys/kernel/debug/dri/0000:c5:00.0/amdgpu_gfxoff
/sys/kernel/debug/dri/0000:c5:00.0/amdgpu_gfxoff_status
/sys/kernel/debug/dri/0000:c5:00.0/amdgpu_gfxoff_count
/sys/kernel/debug/dri/0000:c5:00.0/amdgpu_gfxoff_residency

Reading amdgpu_gfxoff_status returns:

Invalid argument

I attempted to disable GFXOFF by writing a binary zero value to amdgpu_gfxoff.

Unfortunately, this did not improve the situation: test_resume still results in a black screen and freeze.

G. ASPM

The current AMDGPU ASPM parameter was checked:

cat /sys/module/amdgpu/parameters/aspm

It returned:

-1

I have tested with amdgpu.aspm=0, same result.


Relevant kernel log messages

The Linux 6.18 kernel logs following a failed test_resume contain repeated AMDGPU errors:

amdgpu: Fence fallback timer expired on ring sdma0
amdgpu: ring gfx_0.0.0 timeout
amdgpu: Process kwin_wayland
amdgpu: Starting gfx_0.0.0 ring reset
amdgpu: Ring gfx_0.0.0 reset succeeded
[drm] device wedged, but recovered through reset

These messages repeat continuously.

The affected userspace processes include:

  • kwin_wayland
  • plasmashell
  • kscreenlocker_g

On Linux 7.2.9, I also observed:

amdgpu: VM memory stats for proc kscreenlocker_g
is non-zero when fini

During a previous hibernation/resume attempt, the logs also showed:

amdgpu: PSP is resuming...
amdgpu: SMU is resumed successfully!
[drm] DMUB hardware initialized

So AMDGPU initialization appears to succeed on some occasions, although GPU ring timeouts occur during other attempts.


Questions for the Manjaro / Linux community

I would particularly appreciate feedback on the following:

  1. Has anyone experienced hibernation/resume issues with AMD Ryzen AI 400-series CPUs and the Radeon 890M?

  2. Are there known AMDGPU issues with test_resume on these newer AMD integrated GPUs?

  3. Are there specific AMDGPU kernel parameters worth testing to improve hibernation/resume reliability?

  4. Are there known ACPI, BIOS/UEFI or kernel workarounds for this generation of ThinkPad?

  5. Are there recent kernel fixes or known commits related to Fence fallback timer expired and GFX/SDMA ring timeouts during hibernation or resume?


Any suggestions, similar experiences or debugging recommendations would be greatly appreciated.

Thank you!


Mod edit:- General tidy for the sake of brevity, and to save others scrolling back and forth from the polar caps to find relevant information. No charge.

you need to search , and maybe report here

I would try one of the following kernel paremeters (to be added in your /etc/default/grub):

amdgpu.noretry=0

or

amdgpu.gpu_recovery=1

Afterwards, don’t forget

$ sudo update-grub

In theory, this ensures that the GPU is reset in the event of errors in the driver stack, rather than causing the system to freeze.

Another kernel parameter worth to be tested is:

nvme_core.default_ps_max_latency_us=0

This completely disables the deep NVMe sleep mode and should significantly improve stability on resume.

Last but not least: The order of the hooks is important. I would try following HOOK line with/without plymouth:

HOOKS=(base udev autodetect microcode modconf block resume keyboard keymap consolefont filesystems fsck)

Of course followed by

$ sudo mkinitcpio -P

and a reboot.

I suspect you don’t have enough Swap space. typically I find for Hibernation to work properly I need approximately twice as much Swap as RAM plus overhead. On 8 GB systems I have found 20 GB of swap works well.

So extrapolating that you may want at least 64 Gb plus overhead for your Swap file. How much overhead I can’t say. But based on my 8 GB numbers that might be closer to 80 GB.

Note: I’m no longer using Hibernate. I increased my RAM to 16 GB, but did not touch Swap. I am using sleep only. With SSDs, I don’t have any HDDs to worry about, so I don’t need to shut the computer right down, when I’m travelling.

Okay, I’ll try your suggestions this week,
Thanks

@titi

You have provided much useful information :white_check_mark: ; many would not bother. However, most of that information might have been provided by the output of one simple command:

inxi -zv8

In future, please use this method instead for the sake of brevity; and because the majority of forum members already expect inxi output to be provided, when wishing to help. See below. :point_down:


[Mini-HowTo] Provide System Information

Basic details provided by *-fetch type apps might give enough information for someone wishing to buy a computer, however, for Support purposes it’s best to ask your system directly.

Output of the inxi command will generate more useful and detailed information for those who may wish to help:


Suggested inxi command (use either):

inxi -zv8 (short-form)
inxi --filter --verbosity=8 (long-form)

Command output should be presented as pre-formatted text in accordance with forum guidelines. :eyes:


Running inxi within a chroot environment

  • Add --color=0 to the long-form command, or…
  • Change the short-form command to inxi -zv8c0

Your privacy is respected


[Mini-HowTo] Present code or command output

Note: Grave accent (or, backtick) characters are used. :eyes:

For inline code or to show a single command:

  • please follow this simple example: code here.

For multi-line command output:

  • place text beween two rows of three (```) backtick characters to form a scrollable text box, or …
  • use the </> button in the Compose window to achieve the same result.

The empty row between these rows of backtick characters is where to paste any multi-line command output (such as inxi).

An example of a pre-formatted text enclosure:

What is a Quark?

A. In Physics, an elementary particle and fundamental constituent of matter. 
B. A character from the Star Trek: "Deep Space Nine" television series.
C. A soft, creamy, usually unsalted cheese traditional to central Europe.

Hello guys and thanks a lot for your help.

Parameters

I firstly tried @Wollie suggestions, I tried every grub parameters with multiple mkinitcpio options.

Find out that this config is the one with better results :

/etc/mkinitcpio.conf
HOOKS=(base udev autodetect microcode kms modconf block resume keyboard keymap consolefont filesystems fsck)

/etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT=‘quiet splash udev.log_priority=3 resume=UUID=d953c797-f741-4a49-bc9f-03b5cb54b2a9 resume_offset=86941696 amdgpu.gpu_recovery=1’

From my previous configuration amdgpu.gpu_recovery=1 has been added, and resume has been moved.

Swap size

I followed @tracyanne suggestion and found this page : Swap - Manjaro

So I decided to create a swap file of 64Gb in order to do my testings.

Result

Unfortunately I cannot say it works completely, but I would say it works between 1/3 or 2/3 of the time …

When the resume is not working, I think theses kind of errors comes up :

amdgpu: MES failed to respond to msg=REMOVE_QUEUE
amdgpu: failed to unmap legacy queue

Apparently I’m not the only one facing these kind of errors, I will wait some weeks and follow what @stephane linked (Similar issue)

Have a look here for recommended size acc. to Arch wiki:
Partitioning - ArchWiki

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

I did suggest 80 GB might be more reasonable, for Hibernating. As I recall.

For 32 GiB RAM this is by far more than needed for hibernation.

From experience,I have found twice your RAM Plus overhead.

Since 64 Gig doesn’t appear to be reliable for the OP, then Obviously the overhead is still needed. My original post gave a a wet finger in the air amount that included overhead.

The only way to be sure is to experiment.

Indeed. The OP might have several VMs running, for example, and/or other RAM-hungry applications, and may actually be using some swap when hibernation is triggered. :wink:

Indeed. I know for a fact that 20 GB won’t allow me to hibernate with my 16GB system, because of how I use my computer. Even with the move to 16 GB I am still using large amounts of swap, simply because I am now opening more application Windows. It’s also likely given my usage 32 GB will not be enough. But I don’t need Hibernation.

As I noted before with the SSD for my travel purposes, sleep is enough.

The point is for successful hibernation you need to account for how you use the computer. Which is why at 64 GB Swap with a 32 GB system it might work sometimes but not others.

As hibernation always worked first place swap size is not the issue in this case.

I would not be too sure about that. The only way to be certain is to create a Swap Partition that is of the size i suggested. Then if it still doesn’t work Swap is not the problem.

BTW a Swap file instead of a swap Partition, may be the actual problem.

I experienced the issue even with almost no app launched …
But you’re right, I need to experiment to be sure, I will try a bigger swap file and let you know about the results.

@titi

Before you experiment too much, have a look at;

7.3.4 System does not power off when hibernating

With some firmware (especially on laptops designed as Windows-first) – the S4 sleep state may not work reliably (in some cases, a sleep state may be missing entirely) – the link from @medmedin describes a potential workaround for that.

I would generally suggest a swap partition rather than a file, when hibernation is a consideration – ideally set up during the initial Manjaro install.

With 32 GiB of physical RAM, a 64 GiB swap should be more than adequate for hibernation, and any additional overhead that may potentially be needed.

Thank you I have already tried these options but it doesn’t seems to fix my problem.

Maybe replacing the swap file with a real partition will be my last test

I recommend a Swap partition over a Swap file, in any case. A Swap file is a potential candidate for fragmentation, which will slow your system down over time… yes even on Linux based systems.