Shutdown does not have priority over suspend/hibernation

Bug #471457 reported by Zenigata17
88
This bug affects 15 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Fix Released
Undecided
Unassigned
Trusty
Confirmed
Undecided
Unassigned

Bug Description

When shutting down a laptop, if one closes the lid just after clicking shut down, the laptop may go to suspend/hibernation mode instead of shutting down. This is especially annoying since when recovering from suspend/hibernation, then the laptop continue the shut down process.

Revision history for this message
Dr. Kenobi (drkenobi) wrote :

Zenigata17, I've just tested your bug and everything is working fine here. I'm running Ubuntu 10.04 (Lucid Lynx) and everything updated. Are you still having this issue? Can you please test it again with Ubuntu 10.04 and all the updates? Thank you for your time.

Changed in ubuntu:
status: New → Incomplete
Revision history for this message
Dr. Kenobi (drkenobi) wrote :

We'd like to figure out what's causing this bug for you, but we haven't heard back from you in a while. Could you please provide the requested information? Now you can also try with Ubuntu 10.10. Thanks

Revision history for this message
Dr. Kenobi (drkenobi) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in ubuntu:
status: Incomplete → Invalid
Revision history for this message
Jens B. (jens-bavendiek) wrote :

I came across this today. I'd be very happy to provide the needed information.

Changed in ubuntu:
status: Invalid → New
Revision history for this message
Gert van Dijk (gertvdijk) wrote :

Just to clarify a bit more, this was asked on Ask Ubuntu (http://askubuntu.com/q/244323/88802) and it seems an issue still valid for current Ubuntu releases.

Steps to reproduce:

 - Start a regular desktop environment.
 - Configure the laptop "closing lid" action to suspend the machine.
 - Shut the system down using the regular "Shut Down" procedure in the GUI.
 - Close the lid while the system is still in the procedure of shutting down.

What happens?

 - The system is suspended in a shutting-down state.
 - Resuming the system returns to the state it was suspended and the shut down procedure is continued.

What do we expect to happen instead?

 - The system to ignore this closing-lid action, or:
 - Ignore all suspend requests together

It makes no sense to me to have a system allow to go in a suspend state while shutting down.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Revision history for this message
shankao (shankao) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This bug did not have a package associated with it, which is important for ensuring that it gets looked at by the proper developers. You can learn more about finding the right package at https://wiki.ubuntu.com/Bugs/FindRightPackage . I have classified this bug as a bug in gnome-power-manager.

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://help.ubuntu.com/community/ReportingBugs.

Changed in gnome-power-manager (Ubuntu):
status: New → Confirmed
shankao (shankao)
affects: ubuntu → gnome-power-manager (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-power-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Ivo Anjo (knuckles) wrote :

Just made a clean install of Ubuntu saucy and this started happening to me sometimes.

I believe the issue happens due to systemd-logind, which is set to always standby a laptop when you close the lid, and the supposed solution can be found here: http://askubuntu.com/questions/360615/ubuntu-server-13-10-now-goes-to-sleep-when-closing-laptop-lid (the HandleLidSwitch=ignore option).

Because this doesn't happen always I can't be 100% sure; I'm running with that option set for a few days, and if the issue never happens to me again I'll report this as a systemd-logind bug.

Revision history for this message
Serhiy (xintx-ua) wrote :

It also affects Kubuntu 14.04

Revision history for this message
Ivo Anjo (knuckles) wrote :

As an update, I never saw this issue again, so indeed it seems it is caused by a race in logind.

Revision history for this message
Ivo Anjo (knuckles) wrote :
Revision history for this message
Serhiy (xintx-ua) wrote :

I've already added systemd to the Affects list

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in systemd (Ubuntu):
status: New → Confirmed
Changed in upower (Ubuntu):
status: New → Confirmed
Serhiy (xintx-ua)
Changed in gnome-power-manager (Ubuntu):
status: Confirmed → Invalid
no longer affects: upower (Ubuntu)
Changed in gnome-power-manager (Ubuntu):
status: Invalid → Confirmed
no longer affects: systemd (Ubuntu)
affects: gnome-power-manager (Ubuntu) → systemd (Ubuntu)
Revision history for this message
Ivo Anjo (knuckles) wrote :

Bug still there in 14.04: when I upgraded I got asked if I wanted to keep my custom logind configuration, I said no, and issue reappeared.

Revision history for this message
alon (alon-ben-refael) wrote :

If anyone who knows how listens:
Please try and add a waiting piriod of about 5 seconds before suspend kicks in (Whenever it's invoked).
This way the "Shutdown" process will have time to kick in before suspend does, thus enabling the shutdown instead of suspend, and without any real troubles with the everyday work.

I am most humbely willing to be a guiny pig for this, It's just that I don't know how...

Revision history for this message
Patrik Nilsson (nipatriknilsson) wrote :

@alon : Test the solution in bug 1276659.

Revision history for this message
Martin Pitt (pitti) wrote :

This is fixed in vivid where we use systemd. Keeping trusty task open (where we use upstart with systemd-shim).

Changed in systemd (Ubuntu Trusty):
status: New → Confirmed
Changed in systemd (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.