Skip to content

HID: dockchannel, soc: apple: rtkit: drop the pre-open report warning and quiet oslog - #311

Merged
RyanTheTide merged 3 commits into
aurora-wipfrom
j700/input-polish-20261015
Oct 15, 2026
Merged

RyanTheTide merged 3 commits into
aurora-wipfrom
j700/input-polish-20261015

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

What and why

Input and RTKit polish for the J700 internal keyboard and trackpad (MTP over DockChannel):

  • HID: dockchannel: Drop reports that arrive before the device is open (MED, bug fix). The MTP firmware sends reports as soon as an interface is enabled, before the HID device exists. Every boot logged Report received but keyboard is not initialized! and read iface->hid while the create work was still writing it. The open flag is now the only gate, and it uses release/acquire ordering.
  • soc: apple: rtkit: Handle oslog notifications quietly (LOW). Oslog types 2–5 are routine and need no reply. Type 2 was logged as an unknown-message warning, and types 3–5 at info level, four or five lines per co-processor. They are now debug. Genuinely unknown types still warn.
  • HID: dockchannel: Terminate log messages and fix two typos (LOW).

Regression test

neo-input-check.sh checks, among other things, no "is not initialized" line and no "Unknown oslog" line. Before this series both fail on every boot; with it, 12/12 checks pass on every release boot. Keyboard and trackpad both enumerate as input devices, the internal keyboard wake source stays enabled, and ALS still reports.

Risk

  • MED for the dockchannel fix (ordering change on the open flag).
  • LOW for the rest.

Hardware qualification (MacBook Neo J700, 2026-10-15)

This series was qualified on the Neo inside the 2026-10-15 release stack: aurora-wip ac89582 plus, in merge order, tipd polish, input polish, speaker KUnit, SEP (#303), DCP sleep fixes, platform polish, audio polish, radio polish, power polish and fixes, and storage polish. It used the published 5f config with LLVM=1 and clang 22, and modules installed with INSTALL_MOD_STRIP=1. Each test was a one-shot GRUB boot. The saved default stayed on the public 5f kernel. The DTB came from Stage 2 and was not changed.

Results on the release kernels (7.1.12-aurora-rel-g257ca7bed, then -g3faecd4f7 with audio and radio added), and on the earlier integration kernels that also carried the held USB wake line (-integ-ge78a80fd8, -g07a8a7ff4, -g32b5436bd):

  • Boot reaches running with no failed units.
  • Kernel and journal warnings were diffed against the public 5f baseline (neo-public5f-20261015). No new kernel warning types appeared. These went away as expected: dockchannel "keyboard is not initialized", AOP "Unknown oslog message", and the PMGR "always-on domain ... not on at boot" ×8 (now info).
  • Both displays came back after every cycle: eDP plus DP at 1080p180, the internal panel alive (77–91 flips per 2 s), 0 DCP errors and 0 "Failed to resume". Run as dcp-s2idle-regress.sh 6 30 5, 6/6 cycles per run, 3 runs. The DCP mailbox rate in s2idle was about 3 IRQ/s, down from about 62/s.
  • USB: tools/aurora-wake/s2idle-rtc-regression.sh -c 5 -s 20 passed 5/5 per run. W1 ran 10 RTC cycles with the lsusb count steady at 13, and no "HC died", Host System Error or DART fault.
  • Touch ID: 3 prints after every resume, no "state 9". The T1 storm (20 cancelled verifies) logged 0 EBUSY or "did not register" lines. T4 (suspend during a capture) logged "ending the capture in progress before sleep" with no drain failure.
  • Audio enumerates and speakerguardd is active. Mic capture is non-zero. Local sink volumes were identical before and after; nothing was written to the mixer.
  • The camera streams at 30.01 fps for 10 s, before and after s2idle.
  • NVMe: a 512 MiB direct read at 2.9 GB/s. The storage in-flight check passed 5/5 RTC cycles, with acknowledged data verified by size and content.
  • Power check: E 2424 / P 4044 MHz, die zones 44–47 °C at idle, MCC 4 planes, rtc1 wake.
  • KUnit under qemu arm64 on the release stack: 132 tests in total (apple-drm, apple-dart 13/13, cd321x-pm, dwc3_apple_state, speaker ceiling, Rust core), all passing. The radio, macsmc-hwmon and PMC suites run when the series that adds them is present.

Evidence: /Volumes/AuroraS500/aurora-ctl/artifacts/integ-20261015/ (per-boot dmesg, journal and checks; scripts are in scripts/).

🤖 Generated with Claude Code

The MTP firmware starts sending reports for an interface as soon as the
host enables it. dchid_create_interface_work() enables the interface
first and only then allocates and registers the HID device, while the
reports are handled on the interface's own workqueue. The keyboard sends
its first report in that window on every boot, so the driver logs

  Report received but keyboard is not initialized!

and reads iface->hid while the create work is still writing it.

A report that arrives before the HID device is open has nobody to go to
either way: the existing open check already dropped it once the device
was registered. Make the open flag the only gate, so this expected state
no longer warns, and use release/acquire on it so a reader that sees the
device open also sees iface->hid.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Besides the buffer request, RTKit firmware sends oslog messages of types
2 to 5 during normal operation. Types 3 to 5 arrive in a burst when SMC,
DCP and AOP firmware boot, and were logged at info level, four or five
lines per co-processor on every boot. Type 2 arrives once per boot from
the AOP and the MTP, and was logged as an unknown message with a
warning.

None of them expects a reply: the co-processors keep running, and
keyboard, trackpad and AOP sensors keep working after they arrive. The
payload is not decoded, so the lines say nothing actionable. Log all
four types at debug level and keep the warning for types that have not
been seen.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
Eight messages lack a trailing newline, so the next message can be
appended to the same console line, and two carry typos ("firmwareS",
"expFected"). No functional change.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
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