Bug 218771 - Lenovo Thinkbook - turning off after closing lid or (dis)connecting charger
Summary: Lenovo Thinkbook - turning off after closing lid or (dis)connecting charger
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Platform_x86 (show other bugs)
Hardware: AMD Linux
: P3 high
Assignee: drivers_platform_x86@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-24 13:45 UTC by PMR
Modified: 2024-09-09 13:02 UTC (History)
4 users (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description PMR 2024-04-24 13:45:59 UTC
After installing Mageia on a new notebook I can observe problem with making it sleep.

The machine can go to the sleeping state after selecting "Sleep" from Menu, everything seems to work properly (LEDs flash slowly, pressing any key wakes it) but closing the lid or (dis)connecting the charger results in turning the computer completely off - it has to be then turned on via the hardware switch and go through a full starting procedure. Especially a reaction for the charger (dis)connecting is weird.

I made some experiments with energy management settings (changing the actions for the lid closing, moving to sleep through selection of a menu point or through closing the lid), but with no satisfying results.

I am not sure whether the bug is related more to the kernel (I think so) or distribution. I observed the same behavior for AFAIR 6.6.18, 6.6.22 and 6.6.28 kernels.

System:
Host: think Kernel: 6.6.28-desktop-1.mga9 arch: x86_64 bits: 64
Desktop: KDE Plasma v: 5.27.10 Distro: Mageia 9
Machine:
Type: Laptop System: LENOVO product: 21LF v: ThinkBook 14 G6+ AHP
serial: <superuser required>
Mobo: LENOVO model: LNVNB161216 v: SDK0T76479 WIN
serial: <superuser required> UEFI: LENOVO v: NLCN23WW date: 01/04/2024
Battery:
ID-1: BAT1 charge: 66.5 Wh (76.5%) condition: 86.9/85.0 Wh (102.2%)
CPU:
Info: 8-core AMD Ryzen 7 8845H w/ Radeon 780M Graphics [MT MCP] speed (MHz):
avg: 1745 min/max: 1600/6680
[...]
Comment 1 woobble 2024-05-04 13:59:48 UTC
I encountered the same issue for this laptop. Maybe a BIOS problem?


Operating System: Arch Linux 
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Kernel Version: 6.8.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 8845H w/ Radeon 780M Graphics
Memory: 27.2 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: LENOVO
Product Name: 21LF
System Version: ThinkBook 14 G6+ AHP
Comment 2 PMR 2024-05-08 14:44:25 UTC
Do you have a possibility of checking whether the issue demonstrates also in MS Windows? I have removed Window from this computer completely.
Comment 3 PMR 2024-05-19 21:49:20 UTC
I encountered similar problem reports:

https://bbs.archlinux.org/viewtopic.php?id=295464
https://bbs.archlinux.org/viewtopic.php?id=292867

Following a hint from there I switched UEFI settings
AMD PBS -> Power Management -> Modern Standby Mode:
Modern Standby + si03x -> Modern Standby + si02x

It seems to help a bit: closing the lid does not result in turning the computer off now.

I made several experiments.

AC disconnected:
GUI                      OK
Lid                      OK
GUI, then Lid            Turns off
GUI, then connect AC     Turns off
Lid, then connect AC     Turns off

AC connected:
GUI                      OK (fan remains on)
Lid                      OK (fan remains on)
GUI, then Lid            Turns off
GUI, then disconnect AC  Turns off
Lid, then disconnect AC  Turns off

Seems like the system does not like more than one power management events(?)

I tweaked also a Fedora 40 Live (6.8.5-301.fc40.x86_64).
The behavior did not change. I observed however additionally some nondeterminism:

AC disconnected:
Lid, then connect AC     turns off or falls asleep but does not wake up


This misbehavior makes using of the computer extremely cumbersome: although it is possible to suspend it and wake up, it is necessary however to strictly follow a certain procedure; any divert results in a shutdown which means loss of the state :-/
Comment 4 PMR 2024-05-22 07:07:48 UTC
It seem that the ideapad_laptop module is responsible for this:

https://bbs.archlinux.org/viewtopic.php?pid=2172632#p2172632
Comment 5 PMR 2024-06-01 17:07:57 UTC
"There is an aur package solving this issue, ideapad-laptop-tb2024g6plus-dkms
The author said this makes the laptop ignore acpi events when suspended."

https://bbs.archlinux.org/viewtopic.php?pid=2175065#p2175065


Can it be included into the main line, plz?
Comment 6 Mario Limonciello (AMD) 2024-06-05 20:20:14 UTC
> Modern Standby + si03x -> Modern Standby + si02x

This option will prevent the system from entering a deep enough sleep state.  I don't generally suggest it.


With mainline kernel 6.9, can this issue still be reproduced when the BIOS is configured to "Modern Standby + s0i3"?

If so; can you please append a report from https://gitlab.freedesktop.org/drm/amd/-/blob/master/scripts/amd_s2idle.py 

Thanks!
Comment 7 PMR 2024-06-26 13:44:02 UTC
(In reply to Mario Limonciello (AMD) from comment #6)
> > Modern Standby + si03x -> Modern Standby + si02x
> 
> This option will prevent the system from entering a deep enough sleep state.
> I don't generally suggest it.
> 
> 
> With mainline kernel 6.9, can this issue still be reproduced when the BIOS
> is configured to "Modern Standby + s0i3"?
> 
> If so; can you please append a report from
> https://gitlab.freedesktop.org/drm/amd/-/blob/master/scripts/amd_s2idle.py 

Just to explain: I did not check it yet because no update to 6.9 has been made in the stable Mageia up to now. I would like to omit "messing" the system with "external" kernels. I will check it after kernel will be updated to 6.9 or later.
Comment 8 Mario Limonciello (AMD) 2024-06-26 14:07:38 UTC
Conversely; I do want to point out upstream kernel bug trackers are for upstream kernels.

Distros sometimes pick up patches that cause problems and so they're "usually" the best first triage. If they confirm it's not their patch they will generally suggest an upstream kernel and reporting it upstream.
Comment 9 Vitaly Chikunov 2024-09-09 13:02:20 UTC
The problem still persists on v6.11-rc6 on Lenovo ThinkBook 14 G6+ 2024 AMD Ryzen 7 8845H. Blacklisting ideapad_laptop module helps to solve it locally.

Note You need to log in before you can comment on or make changes to this bug.