Skip to content

iio: aop_als: add opt-in J613 system-sleep report quiescing - #152

Draft
tonibergholm wants to merge 3 commits into
omacom:integration/aurorafrom
tonibergholm:j613-als-system-pm-candidate
Draft

tonibergholm wants to merge 3 commits into
omacom:integration/aurorafrom
tonibergholm:j613-als-system-pm-candidate

Conversation

@tonibergholm

@tonibergholm tonibergholm commented Oct 19, 2026 •

Copy link
Copy Markdown

J613 ambient-light reports continue during s2idle. This draft adds an opt-in ALS suspend/resume candidate: with aop_als.j613_suspend_quiesce=1 on apple,j613, ordinary system suspend sets the report interval to zero and resume restores 200000 us. Defaults remain unchanged. Failed suspend attempts to restore reporting before returning the error.

The first commit adds opt-in ordinary system PM callbacks to the Rust platform adapter (HAS_PM=false by default). The second uses them in the ALS driver. Runtime PM, noirq and hibernation callbacks are outside this draft. Lid-angle reporting is unchanged.

Test machine: MacBook Air 13-inch M3 (2024), J613 / T8122, Omarchy. OS firmware 14.7, system firmware 27.0, m1n1-aurora package 1.6.1.aurora17-5. Local display/camera modules and experimental CPU thermal DT bindings were present during the .20 tests; GPU remained capped at state 2. No firmware or calibration contents are included.

Validation:

  • Native-tested on Aurora .19 and rebuilt against release aurora-2026.10.17.20, kernel 7.1.12-2-20261017.20-sep-ARCH, source c46d7dcdb8712ea9aeb0ce47b439ffae76371e55.
  • Matching .20 configuration, Rust 1.93.1 and LLVM 22.1.8; reference/candidate builds completed without warnings or errors. All 47/52 undefined symbols matched the release export inventory. Both temporary awake loads passed; light readings worked and the lid sensor stayed present.
  • One .20 native lid cycle spent 135.784 seconds suspended, success 1→2, failures 0→0. Both callback messages appeared; light reporting was readable before restoring the original. AOP IRQ increased 152 across the hook window, including entry/exit activity; awake traffic returned to 12 interrupts over two seconds.
  • Operator confirmed Touch ID unlock; OpenGL/Vulkan readbacks and brightness restoration passed. Original module restored and temporary hook removed.

The earlier .19 longer candidate run reduced AOP interrupt frequency to about 1 Hz, but the sequential battery comparisons did not establish an energy saving. The .20 short test's charge gauge increased. No battery-saving claim follows.

This is draft review material: broader/repeated-cycle reliability, firmware error paths and other boards remain unqualified. It was built against .20, not the entire current development head; the two original affected files were verified byte-identical at base 339ea0487dfce434f8769d39046db95be03f6e48. Review of the generic Rust PM adapter and maintainer preference for the opt-in design are requested. Kernel DCO sign-off remains pending author certification before this is ready for submission/merge.

Evidence: build and awake loads, .20 native sleep, .19 longer comparison.

Prepared with Codex assistance; physical wake/unlock checks were confirmed by the owner at the laptop.

Submission follow-up: head 1d1f5c3e7fd2800fb73741a63ccb5e356dfa0a92 differs from native-tested 843b84dfccd3c1471b8f7ec843fcebb60125e975 only by shortening the module-parameter description. The .20 module rebuild passed without warnings/errors; strict checkpatch on the source diff reports 0 errors and 0 warnings. This description-only revision has not been loaded for another native cycle. No hosted checks were reported when inspected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant