Bug 77310

Summary: systemd doesn't check for external monitor when system is resumed and therefore suspends the system again (lid closed)
Product: systemd Reporter: Raymond Wooninck <tittiatcoke>
Component: generalAssignee: systemd-bugs
Status: RESOLVED WORKSFORME QA Contact: systemd-bugs
Severity: major    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Raymond Wooninck 2014-04-11 08:10:40 UTC
When I boot the system up docked with the lid closed and an external monitor connected, systemd is recognizing this and works fine. The issue starts when the system is suspended un-docked and no external monitor and then resumed when docked. 

The system is started un-docked and without an external monitor connected. The system boots fine as that the lid is open. After working for a couple of hours, I close the lid and the system is automatically suspending and remains suspended over night. The next morning I take the system to the office where I have a docking station with an external monitor connected. I put the laptop in the docking station and press the power button on the docking station to resume the system. I do not open the lid !!

The system resumes and the external monitor shows the screensaver/desktop. After about 3 minutes the system suddenly suspends again. Pressing the power button again, resumes the system, but directly goes to suspend state again after about 30 seconds. 

In order for me to work with the system I need either to reboot the system or to open the lid. Even if I open the lid no screen is shown there as that the external monitor is attached. 

I suspect that systemd is reading the system state during boot-up and does not refresh the system state upon resuming which causes that the external monitor is not detected and therefore a suspend is initiated as that the lid is closed. 

I haven't tried the other way around to boot the system with an external monitor and then to suspend it and resume it without an external monitor as that the powerbutton is not reachable without opening the lid. But I expect that systemd will make the same mistake and assumes that an external monitor is connected.
Comment 1 Lennart Poettering 2014-05-24 08:30:54 UTC
We actually continually check for the display plug state.

Which systemd version is this? Can you check with current git plz?

Which graphics driver is this?
Comment 2 Lennart Poettering 2014-05-24 08:31:29 UTC
Also, what is reported if you dump connector state from /sys after returning from suspend?
Comment 3 Lennart Poettering 2014-08-18 22:11:54 UTC
Closing due to lack of response. Please reopen if you can supply us with details.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.