Repository navigation
Conversation
The sensor reports on its own at the interval the driver sets at probe, and each report is an AOP mailbox interrupt. Nothing set the interval back to zero: the sensor kept reporting after the driver was unbound, and through suspend-to-idle, where it woke a CPU five times a second. Set the interval to zero on unbind and on system suspend, and back on resume. Assisted-by: Claude Fable 5.2 Signed-off-by: Kyle Arrington <kyle@arrington.co>
The firmware streams the lid angle at its own interval whether anyone reads it or not, and the AOP mailbox interrupt stays enabled in suspend- to-idle, so every report ends the CPUs' idle period. On the J815 (MacBook Air 15-inch, M5), a 4 h lid-closed s2idle left the freeze loop 14478 times, once every 0.999 s, matched by 14413 AOP mailbox interrupts and 14551 RTKit receive works. The device-motion service already stops its reports for sleep, and the light sensor's equivalent is #1876; the lid angle is the AOP stream left running. Read the interval the firmware runs at when the system sleeps, set it to 0, and write it back when the system wakes, from a PM notifier as aop_devmotion does. A service that refuses the read is left alone. Lid open and close reach the kernel from the SMC, not from this sensor, so a sleeping system still wakes on the lid. Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
|
Blockers: 2.
Checked and fine: the ALS device is a child of the AOP device (registered with HW row: Neo J700 (T8140, CT817) and J813 (VD6286), on this head and the current stub firmware, default bootargs. On each: 10 s2idle and 3 firmware (deep) sleeps; after every resume Assisted-by: LLM (Claude:Opus 5.5) |
|
Replaced by #2713, on current integration/aurora with only the human Signed-off-by in the commit. Resume now replays the probe's CT817 sequence (verbosity, batch, raw, then the interval), with the offset stored in Assisted-by: LLM (Claude:Opus 5.5) |
The ALS reports on its own at the interval the driver sets at probe (200 ms), and each report is an AOP mailbox interrupt. Nothing set the interval back to zero, so:
This sets the interval to zero on unbind and in
.suspend, and back in.resume.Draft, because I can test one machine and this driver serves several. Feedback wanted on:
aop.rsstops the endpoints insuspend_latefor a firmware sleep; this runs before that, in.suspend. I could only test s2idle.Tested on J813 (Mac17,3, 27.0 stub, VD6286), integration/aurora 5d112b1 merged with #1532:
Not tested: any other Mac, a failed interval write on resume (it now warns).
Assisted-by: Claude Fable 5.2