Bug 94761 - Laptop HandleLidSwitch Event Not Recognized
Summary: Laptop HandleLidSwitch Event Not Recognized
Status: CLOSED WILL_NOT_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: Other (show other bugs)
Hardware: Other Linux
: P1 normal
Assignee: Aaron Lu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-11 20:09 UTC by nathangrammel
Modified: 2015-08-20 08:46 UTC (History)
2 users (show)

See Also:
Kernel Version: 3.18.6, 4.0-rc3
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Output of "cat sys/bus/acpi/drivers/button/*/path" (53 bytes, text/plain)
2015-03-13 02:44 UTC, nathangrammel
Details
Output of acpidump (339.19 KB, text/plain)
2015-03-13 02:45 UTC, nathangrammel
Details
dmesg log (58.70 KB, text/plain)
2015-04-02 20:01 UTC, nathangrammel
Details

Description nathangrammel 2015-03-11 20:09:14 UTC
Hello, I am using Arch, version 3.18.6-1, though I have also tested this on the mainline kernel version 4.0-rc3. The systemd power management does not sleep/suspend when closing the laptop lid. /proc/acpi/button/lid/LID0/state reports "open" at all times, even when the lid is closed. It seems there that ACPI does not recognize when the lid is closed, and the HandleLidSwitch event is never triggered, nor does the state ever get reported as closed.

Output of "systemctl status systemd-logind":
Mar 11 15:34:12 Euclid systemd-logind[340]: New seat seat0.
Mar 11 15:34:12 Euclid systemd-logind[340]: Watching system buttons on /dev/input/event4 (Power Button)
Mar 11 15:34:12 Euclid systemd-logind[340]: Watching system buttons on /dev/input/event12 (Video Bus)
Mar 11 15:34:12 Euclid systemd-logind[340]: Watching system buttons on /dev/input/event1 (Power Button)
Mar 11 15:34:12 Euclid systemd-logind[340]: Watching system buttons on /dev/input/event2 (Sleep Button)
Mar 11 15:34:12 Euclid systemd-logind[340]: Watching system buttons on /dev/input/event3 (Lid Switch)

However, systemd never reports a "Lid closed" or "Lid opened" event.
"systemctl suspend" works as expected.

Additional information:
Output of uname -a:
Linux Euclid 3.18.6-1-ARCH #1 SMP PREEMPT Sat Feb 7 08:44:05 CET 2015 x86_64 GNU/Linux

The laptop model is Lenovo Y50-70.
Comment 1 Zhang Rui 2015-03-12 01:37:01 UTC
please attach the acpidump output
please attach the output of "cat /sys/bus/acpi/drivers/button/*/path"
Comment 2 nathangrammel 2015-03-13 02:44:53 UTC
Created attachment 170561 [details]
Output of "cat sys/bus/acpi/drivers/button/*/path"
Comment 3 nathangrammel 2015-03-13 02:45:30 UTC
Created attachment 170571 [details]
Output of acpidump
Comment 4 Aaron Lu 2015-03-19 07:32:11 UTC
The LID status is got from a field in the EC operation region, it may be related to EC problem. Do you have problems with other notification source? like if you plug in/out the power adapter?
Comment 5 nathangrammel 2015-03-24 20:56:19 UTC
I haven't noticed anything thus far and as far as I can tell, everything else is working fine.
Comment 6 Aaron Lu 2015-03-31 03:27:27 UTC
Sounds like an EC problem to me, please refer to this comment:
https://bugzilla.kernel.org/show_bug.cgi?id=89211#c8
to provide more information.
Comment 7 nathangrammel 2015-04-02 20:01:28 UTC
Created attachment 173041 [details]
dmesg log

The log from dmesg after following the steps at https://bugzilla.kernel.org/show_bug.cgi?id=89211#c8.

If I wait for a minute or two I see many duplicates of the "ACPI : EC: ##### Query(0x25) stopped #####" and "ACPI : EC: ##### Query(0x25) started #####" messages. The longer I wait, the more duplicates appear. This log is as it appears immediately after closing and reopening the lid.
Comment 8 Aaron Lu 2015-04-07 07:58:47 UTC
        Device (LID0)
        {
            Name (_HID, EisaId ("PNP0C0D") /* Lid Device */)  // _HID: Hardware ID
            Method (_LID, 0, NotSerialized)  // _LID: Lid Status
            {
                Return (!^^PCI0.LPCB.EC0.LIDF)
            }

            Method (_PSW, 1, NotSerialized)  // _PSW: Power State Wake
            {
                SLID = Arg0
            }
        }

        Method (_Q15, 0, NotSerialized)  // _Qxx: EC Query
        {
            P80H = 0x15
            Local0 = LIDF /* \_SB_.PCI0.LPCB.EC0_.LIDF */
            If ((Zero == Local0))
            {
                Sleep (0x03E8)
            }

            Local0 = ~Local0
            GP36 = Local0
            Notify (LID0, 0x80) // Status Change
        }

The status of the LID is got from the PCI0.LPCB.EC0.LIDF, which is a field in the system memory space and there is no assignment for it in the whole ACPI table. So if it is one after boot(probably initialized by the BIOS), it will keep its value as one, which means the LID is open. And from the log of comment #7, the corresponding event when LID is closed or open never triggered(there is no Query(0x15) in the log).

The LID may work in a non-standard ACPI way, I have no idea of it though.
Comment 9 Aaron Lu 2015-08-20 08:46:21 UTC
I'll close it as will_not_fix as there is no can_not_fix.

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