Send Lid status notification via devd from acpi_lid_status_update.
Some laptops don't send ACPI "lid status changed" notifications upon opening the lid if the system was currently suspended. In r358219 this was partially fixed, updating the "lid_status" variable upon resume even if there is no "status changed" notification from ACPI. Unfortunately the fix in r358219 did not include notifying userland via devd; this causes problems on systems using upowerd (e.g. KDE), since upowerd remembers the most recent devd notification about the lid status rather than querying the sysctl to get the current status. This showed up as two symptoms when KDE's "When laptop lid closed: Sleep" option is set: 1. 50% of the time, closing the lid would not trigger S3 sleep. 2. 50% of the time, plugging/unplugging AC power would trigger S3 sleep. PR: 246477 MFC after: 3 days
This commit is contained in:
parent
c1be839971
commit
2e09b2590e
@ -114,6 +114,9 @@ acpi_lid_status_update(struct acpi_lid_softc *sc)
|
||||
/* range check value */
|
||||
sc->lid_status = lid_status ? 1 : 0;
|
||||
|
||||
/* Send notification via devd */
|
||||
acpi_UserNotify("Lid", sc->lid_handle, sc->lid_status);
|
||||
|
||||
#ifdef EVDEV_SUPPORT
|
||||
/* Notify evdev about lid status */
|
||||
evdev_push_sw(sc->lid_evdev, SW_LID, lid_status ? 0 : 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user