No suspend option for critical battery state in power settings UI

Bug #993440 reported by Steve Magoun
124
This bug affects 25 people
Affects Status Importance Assigned to Milestone
gnome-control-center
New
Undecided
Unassigned
gnome-control-center (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

The gnome-control-center power UI offers 2 options for "When power is critically low": Hibernate and Power Off. There should be a 'Suspend' option as well, for a couple reasons:

1) Some people (like me) want their computer to suspend when it reaches a critical low-battery state
2) We offer 'Suspend' as an option for the lid closed action, so we should offer it as a critical battery option for consistency

(Note that neither hibernate nor power off is selected by default in the "When power is critically low" combobox on a fresh install. Instead the combobox has no selection at all. This is probably a separate bug)

To reproduce:
1) Launch the Power settings app
1a) Observe the "When power is critically low" combobox; nothing is selected
2) Click the "When power is critically low" combobox

Expected results:
Suspend is an option for critical-battery action

Actual results:
Suspend is not an option for critical-battery action

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: gnome-control-center 1:3.4.1-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-24.37-generic 3.2.14
Uname: Linux 3.2.0-24-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu7
Architecture: amd64
Date: Wed May 2 13:46:02 2012
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Beta amd64 (20100901.1)
ProcEnviron:
 TERM=xterm
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: gnome-control-center
UpgradeStatus: Upgraded to precise on 2012-01-26 (96 days ago)
usr_lib_gnome-control-center:
 activity-log-manager-control-center 0.9.4-0ubuntu3
 deja-dup 22.0-0ubuntu2
 gnome-bluetooth 3.2.2-0ubuntu5
 indicator-datetime 0.3.94-0ubuntu2

Related branches

Revision history for this message
Steve Magoun (smagoun) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report, you probably don't want to suspend when the battery is almost empty since it will keep using power and drop off soon after that

Changed in gnome-control-center (Ubuntu):
importance: Undecided → Low
Revision history for this message
Steve Magoun (smagoun) wrote :

I do want it to suspend, that gives me a few hours to find power, swap in a new battery, etc. I understand and am willing to accept the risk of data loss in this situation. Perhaps I am the minority though?

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

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

Changed in gnome-control-center (Ubuntu):
status: New → Confirmed
Revision history for this message
Adam Baker (p-launchpad-baker-net-org-uk) wrote :

As suspend is the default behaviour it clearly should be in the menu otherwise if you change it you can't change it back. Also as power off doesn't save state there is nothing to lose from suspending and hopefully having time to find a power socket rather than powering off.

Ideally there should also be a "Do Nothing" option as well to cope with hardware that misreports the low battery condition.

Revision history for this message
Adam Baker (p-launchpad-baker-net-org-uk) wrote :

The Do Nothing option does seem to be supported if you don't use the gui for configuration. To set it from the command line use

gsettings set org.gnome.settings-daemon.plugins.power critical-battery-action 'nothing'

You can also say 'suspend' instead of 'nothing' to meet the original posters requirement

Revision history for this message
Tomislav (hefest) wrote :

Apparently, dconf-editor can be used to tweak lower-level power settings directly (see org->gnome->settings-daemon->plugins->power), but:

1) I haven't confirmed yet that it does, in fact, resolve this particular issue (suspend on low battery), although some of the other settings have taken effect
2) the "official" power settings dialogue is *extremely* spartan
3) having to use dconf-editor to configure the system is like having to use regedit to do the same on Windows: it makes no sense

Ada Wah (ailurius)
Changed in gnome-control-center (Ubuntu):
assignee: nobody → Joakim Langvand (jlangvand)
status: Confirmed → In Progress
Ada Wah (ailurius)
Changed in gnome-control-center (Ubuntu):
status: In Progress → Fix Committed
Ada Wah (ailurius)
Changed in gnome-control-center (Ubuntu):
status: Fix Committed → In Progress
Revision history for this message
Ada Wah (ailurius) wrote :

I see now that it fails to suspend after all. The patch i've committed does add the option to suspend, and gnome-control-center correctly updates the setting in dconf. The critical power level notification also tells that the machine is going to "suspend very soon". But the machine shuts down instead of suspending. It seems this is related to bug #160200, and the underlaying issue is probably in acpi.

As for now, all other options than "shut down" seems useless.

Changed in gnome-control-center (Ubuntu):
assignee: Joakim Langvand (jlangvand) → nobody
status: In Progress → Confirmed
Revision history for this message
Thomas Kluyver (takluyver) wrote :

This seems particularly pressing since Hibernate is disabled by default, so only the 'Power off' option can be selected. I was caught by this the other day (on Quantal) - I saw my battery getting low, and assumed it would suspend or hibernate, but when I plugged it back in and turned it on, I found it had completely shut down.

Revision history for this message
O Gopal (jswami) wrote :

Unless I enable hibernation, when power drops critically low Ubuntu offers only one option: sudden death. And I don't find that out until after installation. (More precisely: I find out the first time I reach the low-power threshold and Ubuntu suddenly just quits.)

And if, then, I'd want hibernation and haven't already made a swap partition big enough to accommodate it, I now have to monkey with my partitions.

Not friendly.

I'd like the Suspend option.

Revision history for this message
Markcortbass (markcortbass) wrote :

I confirm this bug for Ubuntu 14.04 LTS. There should be an option to select suspend.
Suspend is the default. When I select shutdown, I can't set it back to suspend!

Revision history for this message
teo1978 (teo8976) wrote :

Importance Low is ridiculous. This can cause data loss, as noted in comment 9, and hence should be critical.

And please, it's been almost four years!

By the way, there was a time suspend used to work (I'm not sure if it was available in the selector though, or just the default, but it definitely worked). Then a regression appeared such that, when the battery went critically low, the laptop would indeed suspend, and then immediately wake up, and so on forever until it ran completely out of battery.
Now it just turns off.

Revision history for this message
Kai (kanji) wrote :

I can confirm the significance of the problem as long as hibernate cannot be guaranteed to work reliably on all hardware platforms.

It seems Suspend works more often and can help to keep the system long enough available when the battery is at a critical level.

The user should have the option to use either Suspend or / and Hibernate independently of whatever the battery level is.

An option, in case the hardware does allow to hibernate reliably, can be made available in which case the user can select Hibernate or Suspend at a critical battery level.

Right now on my system ( Kernel: 3.16.0-38-generic x86_64 (64 bit) Desktop: Cinnamon 2.8.8 Distro: Linux Mint 17.3 Rosa) Hibernate fails, and Suspend is not allowed if the battery is critically low.
It may also have to do with the inaccurate battery status that does not exactly show how much power is left, meaning the system keeps running still until I find a mains plug, and I would have even more time with Suspend state.

I can understand the logic, that in theory at very low battery level the Suspend state does not protect the system to fail when the last battery energy is really (accurately measured) gone.
But even then, the user should have the freedom to overwrite the behavior for his own purpose, i.e. in my case, I would loose less data with Suspend and battery level critically low.

I would really look forward to have the option to Suspend at a battery level critically low.

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.