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

            Bug ID: 433408
           Summary: [systemd] System powers off when sleep button is
                    pressed instead of going to sleep
           Product: Powerdevil
           Version: 5.21.0
          Platform: openSUSE RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: plasma-b...@kde.org
          Reporter: szots...@gmail.com
  Target Milestone: ---

SUMMARY

When systemd startup is enabled in Plasma, pressing the sleep (power) button on
the computer turns the PC off. The button is configured to make the PC go to
sleep and it works fine when systemd is not enabled. 

STEPS TO REPRODUCE
1. Enable systemd startup with "kwriteconfig5 --file startkderc --group General
--key systemdBoot true"
2. Make sure that you have "Sleep when the power button is pressed" as a
desired action set up in Power settings module
3. Press the power button

OBSERVED RESULT

When systemd is enabled, it shuts down the computer instead of making it sleep.

Without systemd enabled after the power button pressed:
febr 21 22:28:16 openSUSE systemd-logind[780]: Power key pressed.
febr 21 22:28:16 openSUSE kded5[1658]: bluedevil: About to suspend
febr 21 22:28:16 openSUSE NetworkManager[1057]: <info>  [1613942896.6691]
manager: sleep: sleep requested (sleeping: no  enabled: yes)
[...]
febr 21 22:28:16 openSUSE systemd[1]: Reached target Sleep.
febr 21 22:28:16 openSUSE systemd[1]: Starting Suspend...

With systemd enabled:
febr 21 22:30:07 openSUSE systemd-logind[746]: Power key pressed.
febr 21 22:30:07 openSUSE systemd-logind[746]: Powering Off...
febr 21 22:30:07 openSUSE systemd-logind[746]: System is powering down.
febr 21 22:30:07 openSUSE systemd[1]: Stopping Session 1 of user aki.
febr 21 22:30:07 openSUSE systemd[1]: Stopping Session c3 of user aki.
febr 21 22:30:07 openSUSE systemd[1]: Removed slice system-modprobe.slice.
febr 21 22:30:07 openSUSE sddm[1292]: Authentication error: "Process crashed"
febr 21 22:30:07 openSUSE sddm[1292]: Auth: sddm-helper crashed (exit code 15)
febr 21 22:30:07 openSUSE sddm[1292]: Authentication error: "Process crashed"
febr 21 22:30:07 openSUSE sddm[1292]: Auth: sddm-helper exited with 15
febr 21 22:30:07 openSUSE sddm[1292]: Display server stopping...

Logs of systemd-logind without systemd enabled:
-- Logs begin at Fri 2020-06-12 14:50:46 CEST, end at Sun 2021-02-21 22:35:13
CET. --
febr 21 22:27:32 openSUSE systemd[1]: Starting User Login Management...
febr 21 22:27:32 openSUSE systemd-logind[780]: Watching system buttons on
/dev/input/event1 (Power Button)
febr 21 22:27:32 openSUSE systemd-logind[780]: Watching system buttons on
/dev/input/event0 (Power Button)
febr 21 22:27:32 openSUSE systemd-logind[780]: New seat seat0.
febr 21 22:27:32 openSUSE systemd[1]: Started User Login Management.
febr 21 22:27:32 openSUSE systemd-logind[780]: Watching system buttons on
/dev/input/event17 (Dell Dell USB Keyboard)
febr 21 22:27:34 openSUSE systemd-logind[780]: Watching system buttons on
/dev/input/event18 (Logitech MX Master 2S)
febr 21 22:27:35 openSUSE systemd-logind[780]: New session 1 of user aki.
febr 21 22:28:16 openSUSE systemd-logind[780]: Power key pressed.
febr 21 22:28:26 openSUSE systemd-logind[780]: Operation 'sleep' finished.
febr 21 22:28:56 openSUSE systemd-logind[780]: System is rebooting.
febr 21 22:28:56 openSUSE systemd-logind[780]: Session 1 logged out. Waiting
for processes to exit.
febr 21 22:28:56 openSUSE systemd-logind[780]: Removed session 1.
febr 21 22:29:01 openSUSE systemd[1]: Stopping User Login Management...
febr 21 22:29:01 openSUSE systemd[1]: systemd-logind.service: Succeeded.
febr 21 22:29:01 openSUSE systemd[1]: Stopped User Login Management.

Logs of systemd-logind with systemd enabled:
-- Logs begin at Fri 2020-06-12 14:50:46 CEST, end at Sun 2021-02-21 22:35:13
CET. --
febr 21 22:29:25 openSUSE systemd[1]: Starting User Login Management...
febr 21 22:29:25 openSUSE systemd-logind[746]: Watching system buttons on
/dev/input/event1 (Power Button)
febr 21 22:29:25 openSUSE systemd-logind[746]: Watching system buttons on
/dev/input/event0 (Power Button)
febr 21 22:29:25 openSUSE systemd-logind[746]: New seat seat0.
febr 21 22:29:25 openSUSE systemd[1]: Started User Login Management.
febr 21 22:29:25 openSUSE systemd-logind[746]: Watching system buttons on
/dev/input/event17 (Dell Dell USB Keyboard)
febr 21 22:29:28 openSUSE systemd-logind[746]: Watching system buttons on
/dev/input/event18 (Logitech MX Master 2S)
febr 21 22:29:28 openSUSE systemd-logind[746]: New session 1 of user aki.
febr 21 22:30:07 openSUSE systemd-logind[746]: Power key pressed.
febr 21 22:30:07 openSUSE systemd-logind[746]: Powering Off...
febr 21 22:30:07 openSUSE systemd-logind[746]: System is powering down.
febr 21 22:30:07 openSUSE systemd-logind[746]: Session 1 logged out. Waiting
for processes to exit.
febr 21 22:30:08 openSUSE systemd-logind[746]: Removed session 1.
febr 21 22:30:12 openSUSE systemd[1]: Stopping User Login Management...
febr 21 22:30:12 openSUSE systemd[1]: systemd-logind.service: Succeeded.
febr 21 22:30:12 openSUSE systemd[1]: Stopped User Login Management.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20210217
KDE Plasma Version: 5.21.0
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2
Kernel Version: 5.10.16-1-default
OS Type: 64-bit
Graphics Platform: X11

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

Reply via email to