Opened 6 years ago

Last modified 6 years ago

#10604 new task

upstream XO-1.5 wakeup source detection via _SWS

Reported by: dsd Owned by: dsd
Priority: normal Milestone: Future Release
Component: kernel Version: not specified
Keywords: Cc:
Blocked By: Blocking:
Deployments affected: Action Needed: never set
Verified: no


Upstream wakeup source detection for XO-1.5 is a bit tricky because the wakeup reason needs to be read *really* early during resume, even before acpi_suspend_enter() terminates.

This is because we lose the ability to query power button state:

	/* ACPI 3.0 specs (P62) says that it's the responsibility
	 * of the OSPM to clear the status bit [ implying that the
	 * POWER_BUTTON event should not reach userspace ]
	if (ACPI_SUCCESS(status) && (acpi_state == ACPI_STATE_S3))

and I also suspect that we lose some of the other bits quite soon after.

A dirty hook here would likely be rejected, and instead the correct solution would be implementing _SWS support in Linux and our DSDT.

The DSDT side should actually be quite easy to do, as all of the wakeup sources can be represented by PM1 or GPE0 bits. We would have to implement _BFS to read the wakeup source then store it in memory, and then \_GPE._SWS and \_SB._SWS to present that info to Linux. One complication is the wifi, see explanation and workaround at

The Linux side would need a bit of design consideration but shouldn't be hard to pull off.

In the mean time, I'll attach a non-upstreamable patch illustrating how this can work.

Attachments (1)

0001-xo15-sci-wakeup-reason-WIP.patch (9.2 KB) - added by dsd 6 years ago.

Download all attachments as: .zip

Change History (2)

comment:1 Changed 6 years ago by dsd

  • Summary changed from upstream XO-1.5 wakeup source detection to upstream XO-1.5 wakeup source detection via _SWS

Changed 6 years ago by dsd

Note: See TracTickets for help on using tickets.