Bug 56861 - Lid switch doesn't work properly (LIDS not updated) - gigabyte N601
Summary: Lid switch doesn't work properly (LIDS not updated) - gigabyte N601
Status: CLOSED DOCUMENTED
Alias: None
Product: ACPI
Classification: Unclassified
Component: BIOS (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: acpi_bios
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-19 17:44 UTC by Sergey Belyashov
Modified: 2014-06-03 03:35 UTC (History)
3 users (show)

See Also:
Kernel Version: 3.5.0, 3.8.8
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg of linux-3.8.8 (53.37 KB, text/plain)
2013-04-19 17:44 UTC, Sergey Belyashov
Details
acpidump output (82.26 KB, text/plain)
2013-04-19 17:44 UTC, Sergey Belyashov
Details

Description Sergey Belyashov 2013-04-19 17:44:00 UTC
Created attachment 99351 [details]
dmesg of linux-3.8.8

I have this problem with Gigabyte N601.

$ cat /proc/acpi/button/lib/LID0/state
state:      closed
$ cat /sys/firmware/acpi/interrupts/gpe10
     0 invalid

This result is always equals to "closed" and "invalid". Not depends on real lid state and AC
power.

Ubuntu 11.04 (2.6.38-9-generic), Ubuntu 12.04 (3.2.38-generic, 3.5.0-26-generic, and latest stable kernel 3.8.8)
Comment 1 Sergey Belyashov 2013-04-19 17:44:37 UTC
Created attachment 99361 [details]
acpidump output
Comment 2 Sergey Belyashov 2013-04-19 17:47:01 UTC
Laptop specification can be found here: http://www.gigabyte.us/products/product-page.aspx?pid=2034
Comment 3 Lan Tianyu 2013-04-21 15:24:01 UTC
Hi:
       LID state com from bios and ACPI driver expose the result to user space. Just check the acpi table, the LID state is from MNVS operation region, LIDS field. So this maybe a bios or hardware issue.

    OperationRegion (MNVS, SystemMemory, 0x4FF7BE7D, 0x40)
    Field (MNVS, AnyAcc, Lock, Preserve)
    {
      ...
      LIDS
      ...
    }

        Name (_HID, EisaId ("PNP0C0D"))
            Method (_LID, 0, NotSerialized)
            {
                If (LIDS)
                {
                    Return (0x01)
                }
                Else
                {
                    Return (0x00)
                }
            }



And about gpe10, I have not seen any info about it in the acpi table and it should not be used. Invalid state seems correct. Does I miss something?
Comment 4 Aaron Lu 2013-04-22 05:11:28 UTC
(In reply to comment #3)
> Hi:
>        LID state com from bios and ACPI driver expose the result to user
>        space.
> Just check the acpi table, the LID state is from MNVS operation region, LIDS
> field. So this maybe a bios or hardware issue.

Right, the LIDS symbol used to track lid's status is just a variable in memory space, and it's not set anywhere. Either the hardware does not support reporting LID status, or the BIOS asl code has a bug.

> 
>     OperationRegion (MNVS, SystemMemory, 0x4FF7BE7D, 0x40)
>     Field (MNVS, AnyAcc, Lock, Preserve)
>     {
>       ...
>       LIDS
>       ...
>     }
> 
>         Name (_HID, EisaId ("PNP0C0D"))
>             Method (_LID, 0, NotSerialized)
>             {
>                 If (LIDS)
>                 {
>                     Return (0x01)
>                 }
>                 Else
>                 {
>                     Return (0x00)
>                 }
>             }
> 
> 
> 
> And about gpe10, I have not seen any info about it in the acpi table and it
> should not be used. Invalid state seems correct. Does I miss something?

I asked Sergey to file a new bug report instead of describing his problem in bug #25802, where that bug reporter's EC uses gpe 10. Of course gpe10 doesn't make any sense here, so please ignore this information here.
Comment 5 Zhang Rui 2013-04-25 08:11:07 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Hi:
> >        LID state com from bios and ACPI driver expose the result to user
> space.
> > Just check the acpi table, the LID state is from MNVS operation region,
> LIDS
> > field. So this maybe a bios or hardware issue.
> 
> Right, the LIDS symbol used to track lid's status is just a variable in
> memory
> space,

It is in NVS area, so it may has been initialized by BIOS before booting into OS.

But anyway, this seems like a BIOS problem we can not cover, Sergey, is there any chance that you can check if lid works properly on this laptop in Windows?
Comment 6 Sergey Belyashov 2013-04-25 08:20:36 UTC
Some years ago lid works fine (2009-2010). 1-2 years ago laptop goto sleep on removing external power but not closing lid. I will try Windows...
Comment 7 Zhang Rui 2013-04-25 08:23:19 UTC
is there a BIOS update between 2010 and now?
if no, this seems like a software regression, so whether Windows works or not does not matter now in this case.
Comment 8 Sergey Belyashov 2013-04-25 08:31:12 UTC
I have update BIOS 2 weeks ago. But problem was early (see bug #25802). Update is not fix problem.
I will try WindowsXP at this weekend if can find HDD with this OS in my garage :-)
Comment 9 Sergey Belyashov 2013-05-06 06:54:02 UTC
I do not know, may it help or not. But laptop is going to sleep when I unplug external power. I can wake up it and it will work some long time (30-60 min).
Comment 10 Sergey Belyashov 2013-05-07 17:59:32 UTC
Today I check in Windows XP Home. All works fine. I have only install: Intel Inf driver, Intel 2200BG WLAN, and ATI Catalyst 9.3.
Comment 11 Aaron Lu 2013-05-08 00:53:21 UTC
(In reply to comment #10)
> Today I check in Windows XP Home. All works fine. I have only install: Intel
> Inf driver, Intel 2200BG WLAN, and ATI Catalyst 9.3.

What if you do not install any third party driver?
Comment 12 Sergey Belyashov 2013-05-08 05:03:42 UTC
In this case sleep and hibernate modes are unavailable.

Without any drivers power cable unplugging detected correctly and available option to change behaviour on closing lid in power settings. But only one behaviour present - "do nothing".
Comment 13 Lan Tianyu 2013-05-27 14:08:18 UTC
(In reply to comment #12)
> In this case sleep and hibernate modes are unavailable.
What meaning of this case? You don't load some windows's driver?

> Without any drivers power cable unplugging detected correctly and available
> option to change behaviour on closing lid in power settings. But only one
> behaviour present - "do nothing".
Comment 14 Sergey Belyashov 2013-05-27 14:31:24 UTC
See. I only install Windows XP Home SP3 (no any additional drivers). Now I go to Control Panel - Power management - Advanced (or additional - I do not know how it looks in English version). Here is behaviours for: power button press, lid close, sleep button press (hibernate - I do not know how it in English version). Possible behavious are: Do nothing, Ask user and Shutdown (sorry I do not know correct English text for these values). For lid close combobox available only 'Do nothing' value.
After installing three drivers listed above (chipset, VGA, WLAN) additional options are available: hibernate mode and sleep (standby) mode.
So I cannot test lid without installing these drivers.
Comment 15 Lan Tianyu 2013-05-28 01:09:15 UTC
Please run acpi_listen durng lid opening and closing to check whether Bios produces LID event correctly.
LID state and LID event are produced by different way.
Comment 16 Sergey Belyashov 2013-05-28 19:17:41 UTC
button/lid LID0 00000080 00000001
button/lid LID0 00000080 00000002
button/lid LID0 00000080 00000003
ac_adapter ADP1 00000080 00000000
battery BAT0 00000080 00000001
ac_adapter ADP1 00000080 00000001
battery BAT0 00000080 00000001
battery BAT0 00000081 00000001


Here I 3 times close and open lid and then unplug and plug power cable.
Comment 17 Lan Tianyu 2013-05-30 02:30:15 UTC
(In reply to comment #16)
> button/lid LID0 00000080 00000001
> button/lid LID0 00000080 00000002
> button/lid LID0 00000080 00000003
You enabled system suspend on Lid? Since you said close and open lid tree times,
both open and close should have events.
Comment 18 Sergey Belyashov 2013-05-30 05:41:26 UTC
I think no. Only monitor switches off when I close lid (hw function, I think). Event generated for close action. For open nothing is generated.
Comment 19 Lan Tianyu 2013-06-28 08:12:39 UTC
Sorry for later reply.
From the result, there is no open lid event.
No idea about how Windows works. Reassign to Bios catagory.
Comment 20 Zhang Rui 2014-06-03 03:35:44 UTC
As stated in comment #4, Linux kernel just reads from Memory to get the Lid status, while it is actually updated by firmware.
Plus, vanilla windows can not handle Lid events properly as well.

So, this is either a firmware bug, or we're missing some vendor driver to make lid work in a specific way.
In any case, this is not an ACPI Lid problem, bug Closed.

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