https://bugs.kde.org/show_bug.cgi?id=523093

            Bug ID: 523093
           Summary: Power button/lid close sleep action not working on
                    battery
    Classification: Plasma
           Product: plasmashell
      Version First 6.7.2
       Reported In:
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Power management & brightness
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: 1.0

DESCRIPTION
Since I upgraded to KDE Plasma 6.7, I've noticed that sometimes the power
button/lid close action to put my laptop to sleep does not work consistently
when on battery (but works consistently when plugged in).

STEPS TO REPRODUCE
1. In system settings, go to "Power Management" and then the "On Battery"
section. Change the dropdowns for "When power button pressed: " and "When
laptop lid closed: " to "Sleep".
2. Disconnect any power supply.
3. Press the power button or close the laptop lid.

OBSERVED RESULT
Laptop does not suspend.

EXPECTED RESULT
Laptop should suspend.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 44
KDE Plasma Version: 6.7.2
KDE Frameworks Version: 6.28.0
Qt Version: 6.11.1
Kernel Version: 7.1.3-200.fc44.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × 12th Gen Intel® Core™ i7-1260P
Memory: 32 GiB of RAM (31.0 GiB usable)
Graphics Processor: Intel® Iris® Xe Graphics
Manufacturer: Framework
Product Name: Laptop (12th Gen Intel Core)
System Version: A6

ADDITIONAL INFORMATION
I think it usually stops working after resuming from hibernation but I'm not
totally sure.

Strangely, if I change e.g. the power button action to e.g. "Lock screen", it
works fine on battery.

I ran the following command both on AC power (when it sleeps) and on battery
(when it does not sleep) and then pressed the power button.

journalctl -f | grep -E "powerdevil|logind|suspend|Button"

On AC power:

Jul 15 15:04:47 framira systemd-logind[1512]: Power key pressed short.
Jul 15 15:04:47 framira systemd[1]: Started
dbus-:[email protected].
Jul 15 15:04:47 framira 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.wakeupsourcehelper@13 comm="systemd"
exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jul 15 15:04:47 framira systemd-logind[1512]: The system will suspend now!
Jul 15 15:04:47 framira ModemManager[1702]: <msg> [sleep-monitor-systemd]
system is about to suspend
Jul 15 15:04:47 framira systemd[1]: Started
dbus-:[email protected].
Jul 15 15:04:47 framira 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@41 comm="systemd"
exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jul 15 15:04:48 framira systemd[1]: Starting
systemd-suspend-then-hibernate.service - System Suspend then Hibernate...
Jul 15 15:04:48 framira systemd-sleep[212423]: Performing sleep operation
'suspend'...
Jul 15 15:04:48 framira kernel: PM: suspend entry (s2idle)
Jul 15 15:04:52 framira kernel: printk: Suspending console(s) (use
no_console_suspend to debug)
Jul 15 15:04:52 framira kernel: PM: suspend devices took 0.270 seconds
Jul 15 15:04:52 framira systemd-sleep[212423]: System returned from sleep
operation 'suspend-then-hibernate'.
Jul 15 15:04:52 framira kernel: PM: suspend exit
Jul 15 15:04:52 framira systemd-sleep[212504]: suspend-then-hibernate (post
suspend): enabling swapfile and disabling zram
Jul 15 15:04:52 framira (system-sleep)[212503]:
/usr/lib/systemd/system-sleep/suspend-then-hibernate-post-suspend.sh failed
with exit status 255.
Jul 15 15:04:52 framira systemd[1]: systemd-suspend-then-hibernate.service:
Deactivated successfully.
Jul 15 15:04:52 framira systemd[1]: Finished
systemd-suspend-then-hibernate.service - System Suspend then Hibernate.
Jul 15 15:04:52 framira audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295
ses=4294967295 subj=system_u:system_r:init_t:s0
msg='unit=systemd-suspend-then-hibernate comm="systemd"
exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jul 15 15:04:52 framira audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295
ses=4294967295 subj=system_u:system_r:init_t:s0
msg='unit=systemd-suspend-then-hibernate comm="systemd"
exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jul 15 15:04:52 framira systemd[1]: Reached target suspend.target - Suspend.
Jul 15 15:04:52 framira systemd-logind[1512]: Operation 'suspend' finished.
Jul 15 15:04:52 framira systemd[1]: Stopped target suspend.target - Suspend.
Jul 15 15:04:57 framira systemd-logind[1512]: Watching system buttons on
/dev/input/event20 (PLT_BBTPRO (AVRCP))
Jul 15 15:04:58 framira systemd[1]:
dbus-:[email protected]: Deactivated
successfully.
Jul 15 15:04:58 framira 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.wakeupsourcehelper@13 comm="systemd"
exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jul 15 15:05:03 framira systemd[1]:
dbus-:[email protected]: Deactivated
successfully.
Jul 15 15:05:03 framira 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@41 comm="systemd"
exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

On battery:

Jul 15 15:08:25 framira systemd-logind[1512]: Power key pressed short.
Jul 15 15:08:25 framira systemd[1]: Started
dbus-:[email protected].
Jul 15 15:08:25 framira 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.wakeupsourcehelper@14 comm="systemd"
exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jul 15 15:08:26 framira systemd[1]:
dbus-:[email protected]: Deactivated
successfully.
Jul 15 15:08:26 framira 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@42 comm="systemd"
exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

I also ran the same command on battery when closing the lid and got the
following output:

Jul 15 15:14:06 framira systemd-logind[1512]: Lid closed.
Jul 15 15:14:06 framira systemd[1]: Started
dbus-:[email protected].
Jul 15 15:14:06 framira 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.wakeupsourcehelper@16 comm="systemd"
exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jul 15 15:14:06 framira systemd[1]: Started
dbus-:[email protected].
Jul 15 15:14:06 framira 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@47 comm="systemd"
exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jul 15 15:14:16 framira systemd[1]:
dbus-:[email protected]: Deactivated
successfully.
Jul 15 15:14:16 framira 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.wakeupsourcehelper@16 comm="systemd"
exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jul 15 15:14:16 framira systemd[1]:
dbus-:[email protected]: Deactivated
successfully.
Jul 15 15:14:16 framira 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@47 comm="systemd"
exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jul 15 15:14:17 framira systemd-logind[1512]: Lid opened.
Jul 15 15:14:17 framira systemd[1]: Started
dbus-:[email protected].
Jul 15 15:14:17 framira 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@48 comm="systemd"
exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

Let me know if there are more helpful logs I can provide.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to