Bug 869998

Summary: systemd-logind integration broke "Suspend when closing lid" policy
Product: [Fedora] Fedora Reporter: Paolo Bonzini <pbonzini>
Component: gnome-settings-daemonAssignee: Bastien Nocera <bnocera>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: bnocera, johannbg, kem, lnykryn, metherid, mkasik, msekleta, ondra.pelech, pbonzini, plautrba, rstrode, rvokal, systemd-maint, tiagomatos, valent.turkovic, vpavlin
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-05 16:07:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 752665    
Bug Blocks: 876396, 876782    

Description Paolo Bonzini 2012-10-25 10:16:12 UTC
Description of problem:
Something in the integration with logind broke the "always suspend when closing
lid, even with external monitors" mode introduced in GNOME 3.6.

I'm opening a Fedora bug because upstream it is a 3.7.x feature, while in Fedora it's 3.6.x.

Version-Release number of selected component (if applicable):
gnome-settings-daemon-3.6.1-3.fc18.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Attach an external display to a laptop
2. In gnome-tweak-tool's shell pane, set the "Laptop lid, when closed, will suspend even if there is an external monitor plugged in" setting to true.
3. Put windows on both displays.
4. Close lid.
5. Open lid and unlock screen saver.
  
Actual results:
Windows are amassed on the external monitor.

Expected results:
Windows stay where they were across a suspend/resume cycle.

Additional info:
Upstream bug at https://bugzilla.gnome.org/show_bug.cgi?id=686856.
Patch at http://bugzilla-attachments.gnome.org/attachment.cgi?id=227242

Comment 1 Paolo Bonzini 2013-01-23 11:37:01 UTC
You can see that the upstream bug&patch are for g-s-d, please do not change the component.

Comment 2 Fedora End Of Life 2013-04-03 14:02:04 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 3 Valent Turkovic 2014-09-10 18:08:19 UTC
I have laptop connected to external monitor and can't suspend with closing the lid as I was used to.

Please change bug to Fedora 20 because this issue is still live and kicking in current Fedora 20 with all updates applied. 

ps. is there a fix for this behaviour? How can I suspend my laptop even with external monitor attached?

Comment 4 Paolo Bonzini 2014-09-11 10:00:54 UTC
You need to do

gsettings org.gnome.settings-daemon.plugins.xrandr \
   default-monitors-setup 'do-nothing'

It broke again with Fedora 21 though.

Comment 5 Bastien Nocera 2014-12-05 16:07:18 UTC
(In reply to Paolo Bonzini from comment #4)
> You need to do
> 
> gsettings org.gnome.settings-daemon.plugins.xrandr \
>    default-monitors-setup 'do-nothing'
> 
> It broke again with Fedora 21 though.

Then file upstream bugs, this is unlikely to have anything to do with downstream problems.

(In reply to Valent Turkovic from comment #3)
> I have laptop connected to external monitor and can't suspend with closing
> the lid as I was used to.

Nothing changed about this recently, we still block suspend when an external monitor is connected, as we pretty much always have (or always aimed for at least).