Laptop wakes from sleep when plugged in/unplugged from charger

Which Linux distro are you using?
Arch Linux

Which release version?
Rolling release, updated today.

Which kernel are you using?
6.18.2-zen2-1-zen

Which BIOS version are you using?
4.02

Which Framework Laptop 16 model are you using?
AMD Ryzen™ 7040 Series - 7840HS Processor

Pretty much as the title states, recently (noticed around Christmas day), my laptop has started waking itself up from sleep the moment the charger is plugged in or unplugged. It doesn’t matter if the lid is closed or not, it will always wake up. It does not do this when the system is powered off. “Wake on AC” is disabled in the BIOS.

Only package I’ve changed before I noticed was I replaced tlp with power-profiles-daemon, could that be causing a conflict?

Any help would be appreciated.

EDIT: I’m such an idiot. I reset KDE’s power management settings and it immediately solved itself.

EDIT 2: See post number 7 for the offending setting.

EDIT 3: Happened again with the lid closed. Removing solved tag.

What power management setting? And are you saying you essentially toggled that on/off, ending at the same value you started?

I had my laptop switch to the performance profile while plugged in, revert to balanced when unplugged, and switch to power saving when the battery is low. I reset the settings to KDE’s defaults (do not switch power profiles automatically)

The behaviour I was experiencing might be related to a bug in Plasma 6.5.x fixed in Plasma 6.6

I’ll change my settings back to what they were when 6.6 releases and see if that was causing it.

This is the reason. Bios v4.02 does this. Try updating to 4.03 and see if it goes away. So far, mine has been staying asleep on bios 4.03.

4.03 is marked as a beta release at the moment. I’m a bit apprehensive about running software marked as beta on a machine that gets used daily, especially such critical software such as its BIOS. I did find a workaround in KDE that provides the correct behaviour, but I’ll update to 4.03 or later once it’s not marked as beta.

I take back what I said about 4.03. I connected power to my laptop this morning (after it was sitting closed in sleep mode all night), and it powered on as a result. This issue comes and goes, was the same issue on 4.02 (and 4.01). I think it has something to do with the BIOS/EC not working correctly rather than KDE power settings, but I would love to be wrong. A fresh reboot always fixes it for a short time for me.

Framework doesn’t fix the beta before marking it stable. In every update I have looked at, the “stable” is always the same exact buggy release as the “beta”. So the beta label means nothing. The process has always been the following:

  1. they release a beta in the forums
  2. some of us apply it and test
  3. we report the new bugs it contains, and it usually still has the same bugs as the last release
  4. framework marks it stable anyway (hashing both versions is the exact same)
  5. many more install it because it is now “stable” and start reporting on the same bugs.

Can you please share which KDE setting effects this issue? I don’t see any obvious options in settings. I would love to be able to resolve it instead of waiting for Framework to release a new bios.

Is the “When sleeping, enter:” setting set to “Standby, then hibernate” on any power profiles? Just set my settings back to the way they were when I started the thread and the issue returned, changed this setting to the default on all power profiles (Standby) and the issue disappeared.

1hr update: it returned :frowning: laptop was unplugged with the lid closed. Plugged it back in only to hear KDE’s charging sound. Going to sleep now but will return to diagnosing tomorrow.

Did some testing. With the “With sleeping, enter” setting in KDE set to “Standby, then hibernate”. The system will not wake up with the lid open. However, in all settings, it will wake up when plugged in or unplugged with the lid closed.

I also updated to 4.03 as it was marked stable in the meantime which had no effect.

Just a note. If it still wakes up when hibernated, that confirms it is an issue with the laptop firmware and NOT with Linux.

I don’t use hibernate so I have not tested that myself.

It’s not a helpful comment, but reading through this thread has made me glad I gave up on sleep mode entirely for both Windows and Linux. I do hope you guys figure it out.

1 Like

I never hibernated the laptop. “Standby, then hibernate” puts the machine into standby then hibernates the machine when the battery level gets too low. Hibernate saves the session to disk then completely powers off the system. Only wake on AC in the BIOS would have an effect on a hibernate the machine.