FS#45450 - [systemd] 5 second delay between pressing power button and suspend

Attached to Project: Arch Linux
Opened by John Lindgren (jlindgren) - Wednesday, 24 June 2015, 13:22 GMT
Last edited by Evangelos Foutras (foutrelis) - Saturday, 27 June 2015, 20:34 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Evangelos Foutras (foutrelis)
Dave Reisner (falconindy)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

I have my laptop configured to suspend when the power button is pressed ("HandlePowerKey=suspend" in /etc/systemd/logind.conf). This was working fine up to systemd 219. After updating to version 220, I am seeing a 5 second delay between the time I press the power button and the time the system suspends. It's not a complete hang; the whole system (mouse, keyboard, XFCE desktop) is still usable for those 5 seconds.

Oddly, "systemctl suspend" still suspends the system immediately.

See https://bbs.archlinux.org/viewtopic.php?pid=1533307 for more info.

Additional info:

* package version(s)
systemd 221-1
networkmanager 1.0.2-4

* config and/or log files etc.
See description.

Steps to reproduce:

1. Press power button.
2. Wait.
This task depends upon

Closed by  Evangelos Foutras (foutrelis)
Saturday, 27 June 2015, 20:34 GMT
Reason for closing:  Fixed
Additional comments about closing:  systemd 221-2
Comment by Doug Newgard (Scimmia) - Wednesday, 24 June 2015, 16:24 GMT
You got a response to that post, did you ever check into it?
Comment by Evangelos Foutras (foutrelis) - Wednesday, 24 June 2015, 17:39 GMT
NetworkManager adds a "delay" inhibition lock (listed in `systemd-inhibit`). The inhibition lock goes away immediately but systemd still waits the full 5 seconds before suspending.

This does seem to be a bug in systemd, I'll investigate further.
Comment by John Lindgren (jlindgren) - Wednesday, 24 June 2015, 19:32 GMT
@Doug: Yes, disabling NetworkManager makes the delay go away, but this isn't a workable solution for me. Was that what you meant by "checking into it" or something more? Anyway, Evangelos seems to have a good lead.
Comment by Evangelos Foutras (foutrelis) - Wednesday, 24 June 2015, 19:43 GMT
Filed an upstream report: https://github.com/systemd/systemd/issues/360

It seems to be a bug in logind.
Comment by Doug Newgard (Scimmia) - Wednesday, 24 June 2015, 20:24 GMT
@John, yeah, since it's NetworkManager that triggered it, it was hard to say whether it was a systemd problem or a NetworkManager problem without looking deeper. Looks like it's already found, though.
Comment by John Lindgren (jlindgren) - Wednesday, 24 June 2015, 23:55 GMT
@Evangelos, thanks, I confirm that reverting c0f32805086f fixes the problem.
Comment by John Lindgren (jlindgren) - Friday, 26 June 2015, 23:29 GMT
Fixed with systemd 221-2 in testing.

Loading...