Ubuntu

should check that hibernate is really allowed before listing it

Reported by maxcoolds on 2013-06-25
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
gnome-control-center (Ubuntu)
Low
Unassigned

Bug Description

Running ubuntu 13.10 testing with gnome
Linux tatooine 3.9.0-7-generic #15-Ubuntu SMP Fri Jun 21 12:22:17 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

# lsb_release -rd
Description: Ubuntu Saucy Salamander (development branch)
Release: 13.10

I've set my "on close lid" action to hibernate (i've done all the polkit stuff and sudo pm-hibernate works fine) on settings - power, but it just doesn't work.

I've installed the acpi_listen package, and when I run it and close the lid, nothing happens. There is no /var/log/acpid either.

tests:

# acpi_available
# echo $?
0

# acpi_listen
(at this moment i closed the lid)
#NOTHING HAPPENED!
^C
root@tatooine:~# echo $?
130

# service acpid status
acpid start/running, process 1089

# ls /etc/acpi/ -R
/etc/acpi/:
asus-keyboard-backlight.sh asus-wireless.sh events ibm-wireless.sh powerbtn.sh tosh-wireless.sh undock.sh

/etc/acpi/events:
asus-keyboard-backlight-down asus-keyboard-backlight-up asus-wireless-off asus-wireless-on ibm-wireless lenovo-undock powerbtn thinkpad-cmos tosh-wireless

I'm running a Samsung Ultrabook NP530UC

Launchpad Janitor (janitor) wrote :

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

Changed in gnome-settings-daemon (Ubuntu):
status: New → Confirmed
Diesel (erickit) wrote :

Here is how you fix that.

In your file:

/etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

Make sure you have two settings in there

[Enable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

[Enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
ResultActive=yes

Here is why. In this file:

/var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla

it sets the two options to "no"

The file you created should be executed after the one in /var/lib so it should take priority over it (Tested it and it does). You can read the information for that here under the section "Evaluation Order". When your "upower" option is set to "yes" you can select hibernate from the power settings in Ubuntu. However, you are still unable to hibernate because the 10-vendor.d file was setting the login1.hibernate to "no" and that must also be a "yes"

Looks like the bug is that Ubuntu should check both options before allowing hibernate to be selected.

Thanks a lot dude, it really worked!

On Sat, Jul 13, 2013 at 1:21 AM, Eric Kitaif <email address hidden> wrote:

> Here is how you fix that.
>
> In your file:
>
> /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
>
> Make sure you have two settings in there
>
> [Enable hibernate by default in upower]
> Identity=unix-user:*
> Action=org.freedesktop.upower.hibernate
> ResultActive=yes
>
> [Enable hibernate by default in logind]
> Identity=unix-user:*
> Action=org.freedesktop.login1.hibernate
> ResultActive=yes
>
> Here is why. In this file:
>
> /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla
>
> it sets the two options to "no"
>
> The file you created should be executed after the one in /var/lib so it
> should take priority over it (Tested it and it does). You can read the
> information for that here under the section "Evaluation Order". When
> your "upower" option is set to "yes" you can select hibernate from the
> power settings in Ubuntu. However, you are still unable to hibernate
> because the 10-vendor.d file was setting the login1.hibernate to "no"
> and that must also be a "yes"
>
> Looks like the bug is that Ubuntu should check both options before
> allowing hibernate to be selected.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1194328
>
> Title:
> Ubuntu 13.10 Close LID actions Ignored
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/1194328/+subscriptions
>

--
[]'s
Alfredo Casanova
Linux User #228230
msn: <email address hidden>
tel: +55 61 9655 9619

Still can't select hibernate in power settings

Sebastien Bacher (seb128) wrote :

That seems a low priority issue, since it happens only for users that tweak their config to add hibernate back and don't do it correctly...

Changed in gnome-settings-daemon (Ubuntu):
importance: Undecided → Low
affects: gnome-settings-daemon (Ubuntu) → gnome-control-center (Ubuntu)
summary: - Ubuntu 13.10 Close LID actions Ignored
+ should check that hibernate is really allowed before listing it
Markus Golser (golserma) wrote :

@seb128 what is the "correctly" way to do it without "teak their config" to add hibernate?

Sebastien Bacher (seb128) wrote :

@Markus: Ubuntu doesn't provide a recommended way to add back that option without tweaking at the moment, tweaking the configuration works but it's not a supported workflow and you can't blame the distribution if you get it wrong...

Markus Golser (golserma) wrote :

I'm confused. this is a regression and there is no official workaround or fix. and you flag this bug as low priority. how can a regression be a low priority?

Sebastien Bacher (seb128) wrote :

what is a regression? not supporting hibernate? that has never worked well enough and it has been decided to not expose it to users, that's not a regression but a decision

Markus Golser (golserma) wrote :

I use hibernation since 13.04 came out 3-4 times a day and it has never failed me. it still works 100% of the time if i enter pm-hibernate. The regression is that you don't respect the policy anymore.

Stephan Schaefer (schaefer001) wrote :

I am also use hibernate often. I understand a importand failure!

In some cases the hardware after hibernating is changed:

Maybe:

I connected at home a second monitor and ad work i wake it up with only the laptop-screen

Or

I used a Blootooth-Dongle or a USB-Flash Or connected a USB-Printer and others and at waking up the devices are not present!

In many of this cases the wake up crashed.

Also another problem I have at 13.04!

If I connected to internet with a Bloototh-DUN (for example Nokia C6) the system crashes after disconnecting complete!!!
The crash is complete and no chance for sending the crash-report because it is complete crashed!

wordsmyth2 (wordsmyth2) wrote :

HOLD IT! Another regression in the name of 'improvement'? I've used power saving HIBERNATE for YEARS in Ubuntu without any problems. This is the sort of smug action that alienates potential users keen to migrate from Windows, where hibernate works just fine. I'm currently sticking with 12.04, where hibernate works fine, but recently - and foolishly - I installed 13.10 on my daughter's computer. I'll be re-installing 12.04 for her tomorrow ...

Wake up, people: give the people what they need.

Tim (darkxst) wrote :

wordsmyth2, if you want hibernate on lid close, it needs to be set as a system default in /etc/systemd/logind.conf. If you still don't like that go yell at Red Hat, since they control systemd/logind.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers