Sleep/suspend not working on Thinkpad E14 gen 5

I just got a new Thinkpad E14 gen 5, and installed fedora kde spin on it. The issue is that i am unable to resume from sleep when on battery. The laptop uses s2idle and it does not support S3 power state(s2idle deep).

Case 1:
When on battery, I go to sleep and then resume, the screen brightness automatically dims, and then starts to increase, the fluctuates a bit and screen turns off, to recover, i either need to connect laptop to power or restart.
When I connect the power, the screen turns on, and works but when I remove power same happens, until I reconnect power or restart.

Case2:
when laptop is connected to power, the sleep works perfectly fine.

I looked into journalctl, but could not understand much. After resuming from sleep, and connecting power, and disconnecting it repeatedly, The logs say when power is disconnected, the org.kde.powerdevil.backlighthelper gets deactivated, and when power is connected, it gets activated.

Hi! Are you able to try using a live USB from a different distribution, with a different Linux kernel version, to see if there’s any difference in sleep behavior?

The reason I’d suspect something all the way down at the kernel-to-hardware interaction level is a decent number of sleep or standby-related issues that folks have brought up about recent Lenovo laptops, including even your specific model.

If the issue persists with a totally different distribution, then I think it’d be pretty safe to say it’s a lower-level issue, and testing that on a live USB could be a decently quick way to diagnose that :slight_smile:

I reinstalled the fedora kde yesterday, and then updated it. The problem is on kernel 6.12.6, but there is no problem on 6.11.4.

I also noticed one more thing, after resuming from sleep, on battery, when I set power mode to performance, it works fine but get issue only on battery saver and balanced.
So, it could be something with kernel 6.12.6

Here are the logs, when switching power modes, after resuming from sleep,

Dec 28 23:20:47 shaan systemd[1]: dbus-:1.3-org.kde.powerdevil.backlighthelper@2.service: Deactivated successfully.

Dec 28 23:20:47 shaan audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=‘unit=dbus-:1.3-org.kde.powerdevil.backlighthelper@2 comm=“systemd” exe=“/usr/lib/systemd/systemd” hostname=? addr=? terminal=? res=success’

Dec 28 23:20:50 shaan systemd[1415]: Starting grub-boot-success.service - Mark boot as successful…

Dec 28 23:20:50 shaan systemd[1415]: Started app-org.kde.konsole@518b8ba1773f46c3a642f4edbea85fe9.service - Konsole - Terminal.

Dec 28 23:20:50 shaan systemd[1415]: Finished grub-boot-success.service - Mark boot as successful.

Dec 28 23:20:51 shaan systemd[1415]: Started app-org.kde.konsole-3600.scope.
Dec 28 23:21:28 shaan systemd[1]: Started dbus-:1.3-org.kde.powerdevil.backlighthelper@3.service.

Dec 28 23:21:28 shaan audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=‘unit=dbus-:1.3-org.kde.powerdevil.backlighthelper@3 comm=“systemd” exe=“/usr/lib/systemd/systemd” hostname=? addr=? terminal=? res=success’

Dec 28 23:21:36 shaan plasmashell[1990]: The cached device pixel ratio value was stale on window update. Please file a QTBUG which explains how to reproduce.

When, don’t switch power mode, but connect and disconnect power supply, I just get powerdevil logs, and don’t get that grub logs

Ah, great catch there - I would also suspect some sort of regression in between those kernel versions.

If you have a default Fedora configuration and updated straight from 6.11.4 to 6.12.6, then you should be able to boot into 6.11.4 from the GRUB menu. That uses the older kernel, but doesn’t change any other installed software versions on your system, so it should give a way to rule out any other package updates that happened along the way.

If it’s confirmed to be in the kernel, then typically the best approach to those bugs is to work through your distribution - for Fedora, that would be the process mentioned on their Docs page here: How to file a bug :: Fedora Docs

yup, it should be someting from the packages that were updated that started to cause issues with the powerdevil/powerprofiles. Would try to see if I can find which package’s update caused the issue…