Bug 71091 - ACPI code does not have the event SW_DOCK implemented. Systemd (git master) is depending that this event is correctly emitted and used
Summary: ACPI code does not have the event SW_DOCK implemented. Systemd (git master) i...
Status: CLOSED INVALID
Alias: None
Product: ACPI
Classification: Unclassified
Component: Config-Hotplug (show other bugs)
Hardware: All Linux
: P1 high
Assignee: Rafael J. Wysocki
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-24 15:48 UTC by Raymond Wooninck
Modified: 2014-06-16 17:46 UTC (History)
3 users (show)

See Also:
Kernel Version: 3.14-rc4
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Raymond Wooninck 2014-02-24 15:48:53 UTC
The latest git master of Systemd has changed the approach in the logind module to prevent suspended systems from switching on accidentally. The validation is that it checks if the lid is still closed or not. Of course this would always be true for docked laptops and therefore they also validate if the event SW_DOCK has been set. 

Checking this on my laptop, indicated that the SW_DOCK is never set and therefore during the boot process with the latest systemd, the system will constantly go to sleep when docked as that the lid is closed. 

After talking with Lennart Poettering, he check the code and also talked to Matthew Garrett about this issue and it seems that the ACPI docking code doesn't have SW_DOCK implemented. 

I am not sure for how many laptop vendors this is correct (I am running a Thinkpad (IBM/Lenovo)), but this would become a big issue once systemd 210 is being released.
Comment 1 Alan 2014-02-24 22:30:13 UTC
I think this bug mostly needs to be filed in systemd. Lots of machines don't reliably report LID state let alone dock.
Comment 2 Alan 2014-03-03 14:12:31 UTC
Having dug further this is clearly a Systemd problem.

1. SW_DOCK isn't required
2. It only covers system docs not 3rd party docks (eg USB, PCI split bridge, Thunderbolt etc) 
3. Lots of passive docks are not covered by it
4. It's perfectly possible to have a laptop shut and driving an external display without a dock.
5. There are legitimate timed wakeup cases with lid closed (eg waking up to collect email)
5. "Docked" for some devices like convertibles simply means "keyboard unit attached"

As far as I can tell systemd needs fixing to do something like not suspend when any of the following is true
- any external output is active
- an external keyboard is connected
- mains power is on
- under 3 minutes have elapsed since the wakeup

closing this bug therefore, it's not a kernel problem but a problem with the systemd heuristic.
Comment 3 Len Brown 2014-06-16 17:46:39 UTC
I concur w/ Alan, except this isn't closed as "Will not fix",
it is closed as "invalid".

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