Bug 82670

Summary: logind fails to suspend anymore after random number of suspends
Product: systemd Reporter: Weng Xuetian <wengxt>
Component: generalAssignee: systemd-bugs
Status: RESOLVED WORKSFORME QA Contact: systemd-bugs
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Weng Xuetian 2014-08-15 17:46:43 UTC
When call suspend from login1, suspend will fail after certain random number of suspend, login1 will not be able to suspend anymore, error message is "There's already a shutdown or sleep operation in progress".

Maybe networkmanager related, if network manager is disabled, suspend will always working.

Tried with systemd 214 & 215, upgraded from 204 which seems doesn't have this problem.
Comment 1 Lennart Poettering 2014-08-18 20:24:44 UTC
When this happens, what jobs do you see queued in "systemctl list-jobs"? What's the state of the systemd-supend.service and suspend.target units?
Comment 2 Weng Xuetian 2014-08-25 17:34:24 UTC
Well, systemctl suspend with root can still work, just suspend from logind doesn't work.

# systemctl status suspend.target
● suspend.target - Suspend
   Loaded: loaded (/usr/lib/systemd/system/suspend.target; static)
   Active: inactive (dead)
     Docs: man:systemd.special(7)

# systemctl list-jobs
No jobs running.

# systemctl status suspend.target
● suspend.target - Suspend
   Loaded: loaded (/usr/lib/systemd/system/suspend.target; static)
   Active: inactive (dead)
     Docs: man:systemd.special(7)
Comment 3 Eli S. 2015-06-30 01:13:35 UTC
(In reply to Lennart Poettering from comment #1)
> When this happens, what jobs do you see queued in "systemctl list-jobs"?
> What's the state of the systemd-supend.service and suspend.target units?

I think I'm having the same issue. I just upgraded my system yesterday to 4.0.6-1-ARCH. Along with that upgrade, I got systemd 221.

I just tried to `systemctl suspend` without root, and nothing happened. I did this from dmenu, so I didn't get an error message per se. Here's the output of `systemctl list-jobs` and the statuses associated with each job:


 JOB UNIT                    TYPE  STATE  
2986 systemd-suspend.service start running
2985 suspend.target          start waiting


● suspend.target - Suspend
   Loaded: loaded (/usr/lib/systemd/system/suspend.target; static; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:systemd.special(7)


● systemd-suspend.service - Suspend
   Loaded: loaded (/usr/lib/systemd/system/systemd-suspend.service; static; vendor preset: disabled)
   Active: activating (start) since Mon 2015-06-29 18:05:56 PDT; 3min 59s ago
     Docs: man:systemd-suspend.service(8)
 Main PID: 1803 (systemd-sleep)
   CGroup: /system.slice/systemd-suspend.service
           └─1803 /usr/lib/systemd/systemd-sleep suspend
Comment 4 Eli S. 2015-06-30 01:19:26 UTC
(In reply to Eli S. from comment #3)

If I'm tailing `journalctl -x` when I try to suspend, I get the following (actual machine name replaced with "localhost"):


Jun 29 18:17:43 localhost login[3439]: [56B blob data]
Jun 29 18:17:49 localhost login[3439]: pam_tally(login:auth): pam_get_uid; no such user
Jun 29 18:17:49 localhost polkitd[653]: Registered Authentication Agent for unix-process:3500:307073 (system bus name :1.64 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
Jun 29 18:17:49 localhost polkitd[653]: Unregistered Authentication Agent for unix-process:3500:307073 (system bus name :1.64, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
Comment 5 Lennart Poettering 2017-10-27 18:19:43 UTC
Hmm, given that the "systemd-suspend" binary is hanging, this appears to be a kernel problem. That said, this is a really old bug, and most likely has been fixed in the kernel in the meantime. Closing this hence. If this is still a problem with current kernel/systemd versions, please file a new issue on github. Thanks.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.