Bug 976834 - Power Management: suspend when laptop lid close should be easily configurable
Power Management: suspend when laptop lid close should be easily configurable
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: control-center (Show other bugs)
19
Unspecified Linux
unspecified Severity high
: ---
: ---
Assigned To: Control Center Maintainer
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-21 11:17 EDT by Ondrej Hudlicky
Modified: 2014-02-19 08:26 EST (History)
16 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1001511 (view as bug list)
Environment:
Last Closed: 2013-09-19 09:26:30 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ondrej Hudlicky 2013-06-21 11:17:09 EDT
Description of problem:
Always when I close the laptop lip it suspends.

I want to have the option to change this behaviour. It is blocker for me using Fedora on work laptop as I go from room to room every hour and when laptop suspends I lose the vpn connection and need to reconnect after resume which takes so much time! Also it break my running scripts and virtualization. 
I can provide list of 20+ people who have the same problem.

I didn't find any way how to disable the suspend on lid close
a) no option in Settings->Power 
b) workaround described in docs doesn't work
$ gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action blank
No such key 'lid-close-ac-action'
$ gsettings set org.gnome.settings-daemon.plugins.power lid-close-battery-action blank
No such key 'lid-close-battery-action'


Version-Release number of selected component (if applicable):
control-center-3.8.3-1.fc19

How reproducible:
always

Steps to Reproduce:
1. close the laptop lid

Actual results:
always suspends

Expected results:
configurable behavior

Additional info:
urgent usability issue
Comment 1 Ondrej Hudlicky 2013-06-26 08:04:17 EDT
Hopefully this is the correct component, please advise.
Comment 3 Matthias Clasen 2013-07-01 10:32:00 EDT
> b) workaround described in docs doesn't work
> $ gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action blank
> No such key 'lid-close-ac-action'

Which docs were that ? They should be updated to not refer to nonexisting keys.
Comment 4 Ondrej Hudlicky 2013-07-08 04:07:11 EDT
(In reply to Matthias Clasen from comment #3)
> > b) workaround described in docs doesn't work
> > $ gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action blank
> > No such key 'lid-close-ac-action'
> 
> Which docs were that ? They should be updated to not refer to nonexisting
> keys.

I found this documentation in <F1> Gnome Help -- Power & Battery 
User menu -> Settings -> Power -> <F1>

Is there any way how to configure my laptop (with F19 Gnome Shell) to not suspend when the lid is closed while running on battery?
Comment 5 Dmitry Burstein 2013-07-13 14:48:02 EDT
As a workaround, make sure the file /etc/systemd/logind.conf includes an uncommented line "HandleLidSwitch=ignore", and then just restart the systemd-logind service.
But you are right: this should be made easily configurable in the power settings!
Comment 6 Matthias Clasen 2013-07-25 08:38:02 EDT
If we make this 'easily configurable', that basically means have to train our users to a) close the lid and b) wait for the suspend led to come on before putting the laptop away.

It is a recipe for accidents like:

Close the lid, start moving to another room, meet somebody in the hallway, get in a discussion, put the laptop in your back and go with the person for a walk. Now your laptop is simmering in its own heat in your bag...
Comment 7 Ondrej Hudlicky 2013-07-25 11:11:54 EDT
I agree that software should save misbehaving users from harming the system or themselves, but definitely not for cost of having the software unusable for common/majority user.

According to laptop user manual, everybody should check whether the laptop is properly suspended/hibernated/off before putting it to the bag (especially when the auto-suspend-on-lid-close is disabled). 
I do and take responsibility for my behaviour if I fail. 

I am afraid that points in comment 6 are not compatible with the usability maxims (e.g. comment 2). It make sense to remove useless config options to reduce maintenance costs and code complexity, but in this case I feel the user power are unnecessarily reduced -> usability drop -> quality deficiency.

Is the shiny Gnome3 for smart users or for cats and donkeys? Give me chance to use the system as a smart user and keep the standard config options. I'd like to configure my work environment according to my needs.
Comment 8 Michael 2013-09-09 08:07:53 EDT
I see no reason why this bug blocks 908276
Comment 9 Bastien Nocera 2013-09-19 09:26:30 EDT
It's the way we've always handled things by default at least, but the move to systemd to handle suspend and inhibition means that we need to do more work on the power plugin side. Re-adding the code would complicate already very complicated code for not much gain, since there are alternatives.

There's also a funny tool for your particular use case:
http://www.hadess.net/2011/09/omg-i-haz-designed-bug-fix.html

office-runner is being reviewed in Fedora at:
https://bugzilla.redhat.com/show_bug.cgi?id=998238

You can also modify /etc/systemd/logind.conf to read:
HandleLidSwitch=ignore

So that lid closure aren't taken into account. You can also inhibit suspend for a period of time, or while a particular application is running by doing:
systemd-inhibit --what=handle-lid-switch sleep 3600

Finally, there might also be a gnome-shell extension for this.

I'll close this, as we won't be bringing back the option, as alternatives are already available.
Comment 10 Gerard Braad 2014-02-19 08:26:20 EST
I do not believe the statement in comment #6 is valid; we are not protecting people against 'simmering laptops' as the original functionality was 'lid-close-ac-action', which handles the action to take for the lid switch when on AC power. This functionality has now disappeared... and for which HandleLidSwitch=ignore does not provide an appropriate alternative.

Note You need to log in before you can comment on or make changes to this bug.