Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 157120 Details for
Bug 243030
closing laptop lid doesn't suspend system
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
kernel patch
button-resume.patch (text/plain), 2.01 KB, created by
Richard Hughes
on 2007-06-15 15:02:26 UTC
(
hide
)
Description:
kernel patch
Filename:
MIME Type:
Creator:
Richard Hughes
Created:
2007-06-15 15:02:26 UTC
Size:
2.01 KB
patch
obsolete
>From: Richard Hughes <richard@hughsie.com> > >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. > >Signed-off-by: Richard Hughes <richard@hughsie.com> >--- > >diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c >index cb4110b..fd3473b 100644 >--- a/drivers/acpi/button.c >+++ b/drivers/acpi/button.c >@@ -68,6 +68,7 @@ MODULE_LICENSE("GPL"); > > static int acpi_button_add(struct acpi_device *device); > static int acpi_button_remove(struct acpi_device *device, int type); >+static int acpi_button_resume(struct acpi_device *device); > static int acpi_button_info_open_fs(struct inode *inode, struct file *file); > static int acpi_button_state_open_fs(struct inode *inode, struct file *file); > >@@ -77,6 +78,7 @@ static struct acpi_driver acpi_button_driver = { > .ids = "button_power,button_sleep,PNP0C0D,PNP0C0C,PNP0C0E", > .ops = { > .add = acpi_button_add, >+ .resume = acpi_button_resume, > .remove = acpi_button_remove, > }, > }; >@@ -487,6 +489,29 @@ static int acpi_button_remove(struct acpi_device *device, int type) > return 0; > } > >+/* this is needed to learn about changes made in suspended state */ >+static int acpi_button_resume(struct acpi_device *device) >+{ >+ struct acpi_button *button; >+ struct acpi_handle *handle; >+ struct input_dev *input; >+ unsigned long state; >+ >+ button = device->driver_data; >+ handle = button->device->handle; >+ input = button->input; >+ >+ /* >+ * On resume we send the state; if it matches to what input layer >+ * thinks then the event will not even reach userspace. >+ */ >+ if (!ACPI_FAILURE(acpi_evaluate_integer(handle, "_LID", >+ NULL, &state))) >+ input_report_switch(input, SW_LID, !state); >+ >+ return 0; >+} >+ > static int __init acpi_button_init(void) > { > int result;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 243030
:
156405
|
156496
| 157120