Bug 8813 - acpi does not rescan button event on resume, leading to userspace confusion
Summary: acpi does not rescan button event on resume, leading to userspace confusion
Status: CLOSED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: acpi_power-other
URL:
Keywords:
Depends on:
Blocks: 7216
  Show dependency tree
 
Reported: 2007-07-26 05:10 UTC by Richard Hughes
Modified: 2007-08-25 21:11 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.23rc1
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
patch to fix the issue (2.16 KB, patch)
2007-07-26 05:11 UTC, Richard Hughes
Details | Diff
patch in 2.6.23-rc3-git9 (2.00 KB, patch)
2007-08-25 21:10 UTC, Len Brown
Details | Diff

Description Richard Hughes 2007-07-26 05:10:58 UTC
Most recent kernel where this bug did not occur: N/A
Distribution: Fedora core 7 with vanilla kernel
Hardware Environment: ThinkPad X60, tested with 7 various other machines
Software Environment: Stock F7 with vanilla kernel
Problem Description:

On resume we need to refresh the lid status as we will not get an event if
the lid opening was what triggered the suspend.
This manifests itself in users never getting a "lid open" event when a
suspend happens because of lid close on hardware that supports wake on
lid open. This makes userspace gets very confused indeed.
Patch attached forces a check of the lid status in the resume handler.

Steps to reproduce:

1. install linux
2. start evtest or gnome-power-manager
3. shut lid [machine suspends]
4. open lid [machine resumes]
5. observe no lid open event, userspace still thinks the lid is down
6. shut lid [machine ignores "duplicate event" and does not suspend
7. open lid [machine gets lid up event]
8. shut lid [machine suspends]
Comment 1 Richard Hughes 2007-07-26 05:11:54 UTC
Created attachment 12154 [details]
patch to fix the issue

fixes the problem by rescanning the lid on resume.
Comment 2 Len Brown 2007-08-03 13:08:39 UTC
applied to acpi-test

BTW. what in user-space is monitoring the lid state?
Comment 3 Richard Hughes 2007-08-03 13:11:12 UTC
Cheers. HAL, and indirectly, gnome-power-manager.
Comment 4 Len Brown 2007-08-25 21:10:14 UTC
Created attachment 12539 [details]
patch in 2.6.23-rc3-git9

This patch shipped in 2.6.23-rc3-git9.
79d2dfaa4e787f94b7f65f4611bc7d1c8d85fabc
Please re-open this bug if there is still an issue after that release.

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