Page 1 of 1

Turning off after closing lid or (dis)connecting charger

PostPosted: Apr 24th, '24, 09:41
by pmr
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.

Some small research resulted in the information that I am not alone - several users of Ryzen notebooks reported similar behavior. 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.

Code: Select all
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
[...]


Do you suggest any workaround or just some patience for kernel developers?

Re: Turning off after closing lid or (dis)connecting charger

PostPosted: Apr 25th, '24, 17:17
by morgano
Have you checked if this also happens in another desktop, like Xfce?
I wonder it it may also depend on the DM.
Maybe also try our linus kernel, which is less patched by us.
(not my cup of tea, but in absence of other ideas...)

Re: Turning off after closing lid or (dis)connecting charger

PostPosted: Apr 26th, '24, 05:23
by Garthhh
I have a few thinkpads, I always set them to do nothing when I close the lid on both cord & battery on Plasma system settings
They all have a switch that shuts off the screen when I close the lid
I set to hibernate if the battery gets to 5%

Re: Turning off after closing lid or (dis)connecting charger

PostPosted: Apr 27th, '24, 13:17
by pmr
THX for suggestions.

I checked with Plasma and Xfce - the same.
I installed and checked also the linus flavor (uname -a returns 6.6.28-1.mga9 - is this a linus indeed?) - the same :-/

The "set to do nothing when close the lid" and just closing the lid works - thank you - but it cannot be considered as anything more than a very temporary dirty workaround, at least assuming my usage profile: I suspend the computer quite frequently, sometimes for short, sometimes for much longer; either a strict procedure would have to to be followed (either select "Sleep" or close the lid - no both of them) and just closing the lid would result in a quick battery drain due to a system that just works.

I filed also a kernel bug (https://bugzilla.kernel.org/show_bug.cgi?id=218771), but with no reaction yet.

Re: Turning off after closing lid or (dis)connecting charger

PostPosted: Apr 27th, '24, 13:54
by morgano
pmr wrote:small research resulted in the information that I am not alone - several users of Ryzen notebooks reported similar behavior.


You could in the bug report mention that and link to those places.

Re: Turning off after closing lid or (dis)connecting charger

PostPosted: May 22nd, '24, 09:09
by pmr
It seem that the ideapad_laptop module is responsible for this:

https://bbs.archlinux.org/viewtopic.php ... 2#p2172632

Re: Turning off after closing lid or (dis)connecting charger

PostPosted: May 22nd, '24, 12:46
by morgano
Have you tried blacklisting it?