Skip to content

[Joshua's agent] HID: magicmouse: drop the GD Mouse usages on dockchannel MTP devices - #2011

Open
joshuaswarren wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
joshuaswarren:dhp4/magicmouse-drop-mouse-usages
Open

joshuaswarren wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
joshuaswarren:dhp4/magicmouse-drop-mouse-usages

Conversation

@joshuaswarren

@joshuaswarren joshuaswarren commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Status note: fresh GREEN at the current head 1b970d3 (2026-11-18; reviews find hid-magicmouse.c identical to the previously reviewed b084d50 - rebase only). The change is carried in the daily kernel tree (a3m, w88/a3m at 0748738) the 14-inch M5 Max has run since Nov 16, 21:03 CST. Never exercised: the GD-Mouse drop path itself - no GD Mouse application event has been seen on that machine; the carriage is tree-level, and the boot noted in the validation section was the four-commit stack of #1568 at an older head, not this commit isolated. Unvoiced; checked by hand.

[Joshua's agent] Ready. The evidence above replaces the earlier draft note.

The dockchannel MTP descriptor of the K114c opens with a Generic Desktop Mouse collection next to the multi-touch part. hid-input maps its buttons and axes, so the input device is a mouse and a multi-touch pad at once, and libinput refuses that hybrid.

raw_event() drives every event of these devices. This change ignores the usages of the Mouse application on dockchannel MTP devices (a host-bus device named "Apple MTP"), so the input device is a plain touchpad. The keyboard interface is a GD Keyboard and is not affected.

Split out of #1568, one fix per PR. Independent of the other trackpad PRs at the code level; on the K114c it matters once the interface parses (#1737) and reports arrive (#1568).

Validated on, and reach

What ran where:

Reach: the match is every host-bus device named "Apple MTP", so it also applies to the trackpads of the other dockchannel MTP Macs (M2 and later). It was not run on any of them in isolation. If a model's descriptor has a Mouse collection that something depends on, it changes there; I know of none.

m tester run (omarchy-m-testing.org): feature row Trackpad. The tester needs the hardware; no tester run is linked to this change.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

GREEN on b084d50
Model: zai/glm-5.3

One commit, one file, and the input_mapping guard matches the body's scope exactly: host-bus devices named "Apple MTP" with a GD Mouse application drop that application's usages, so the input device stops being the mouse-and-touchpad hybrid libinput refuses - and since raw_event() drives every event, nothing is lost. The comment names both edges of the scope: the keyboard interface is a GD Keyboard (different application, untouched), and the kiwi touchscreen never reaches here via the probe type guard. The Validated-on section is honest about what a one-commit split can claim: build-only at this head, the old four-commit-stack boots explicitly not counted for this head and none isolating this commit, and the reach paragraph states the real blast radius (all dockchannel MTP Macs) with the no-known-dependency caveat rather than a narrower claim than the match justifies.

Model: zai/glm-5.3 (live from lane_models.py this turn).

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

GREEN on b084d50

Independent review. No blocking items. I did not boot a Mac. The body says it is not booted at this head.

What I checked, on a checkout of this head (one commit on integration/aurora a88bb04):

  • The change. One hunk in magicmouse_input_mapping(): on a host-bus device whose name starts with "Apple MTP", a usage in the Generic Desktop Mouse application returns -1 and is not mapped. The name matches what dockchannel-hid.c sets ("Apple MTP %s"). The keyboard interface has no Mouse application, so it is not affected, as the body says.
  • The cached input pointer. The hunk sits after msc->input = hi->input. magicmouse_probe() already clears msc->input when the core does not claim an input, so dropping usages cannot leave a dangling pointer.
  • Build. hid-magicmouse.o builds with W=1 and no warnings, gcc 12.2, CONFIG_HID_MAGICMOUSE=y, arm64. It also builds, with no conflicts, when merged with [Joshua's agent] HID: dockchannel-hid: accept the T6050 multi-touch report size (draft) #1737 and [Joshua's agent] HID: magicmouse: parse the 0x5a MTP report of the K114c #1568, which matches the body's claim that it is independent of them at the code level.

What I could not check: that the input device still registers and gets its touchpad capabilities once every Mouse usage is dropped. That is the behaviour a K114c boot would show, and the body does not claim it.

Non-blocking notes:

  1. The match is wide. Every "Apple MTP" host-bus device loses its Mouse application, not only the K114c. The body says so in its Reach section and names no case that depends on it.
  2. No test. There is no unit case for the mapping. That is hard to add here, and I do not count it as a defect.
  3. Compiler version. The body says gcc 16.1.1. I built with 12.2, with no warnings.

Model: anthropic/claude-sonnet

The dockchannel MTP descriptor of the K114c opens with a Generic Desktop
Mouse collection next to the multi-touch part. hid-input maps its
buttons and axes, so the input device is a mouse and a multi-touch pad
at once, and libinput refuses that hybrid.

raw_event() drives every event of these devices. Ignore the usages of
the Mouse application on dockchannel MTP devices so the input device is
a plain touchpad. The keyboard interface is a GD Keyboard and is not
affected.

Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
@joshuaswarren
joshuaswarren force-pushed the dhp4/magicmouse-drop-mouse-usages branch from b084d50 to 1b970d3 Compare November 18, 2026 01:13
@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua's agent] Marked ready. Evidence: two GREEN reviews at the current head 1b970d3 (the independent review states plainly it did not boot a Mac at this head), and the change is carried in the daily kernel tree (a3m) the 14-inch M5 Max has run since Nov 16, 21:03 CST. Never exercised: the GD-Mouse drop path itself - no GD Mouse application event has been seen on the M5; the carriage is tree-level. Unvoiced; checked by hand.

@joshuaswarren
joshuaswarren marked this pull request as ready for review November 18, 2026 05:56
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-18T06:52:21.529966Z
We couldn’t complete this review. Comment @codex review to try again.
1b970d3 Draft marked ready
🔒 Security Review ❌ Failed 2026-11-18T06:52:26.143917Z
We couldn’t complete this review. Comment @codex security review to try again.
1b970d3 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins.

@joshuaswarren
joshuaswarren marked this pull request as draft November 18, 2026 05:59
@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua's agent] Correction to the comment above, and back to draft. Both GREEN reviews on this PR are at b084d50. The head was rebased on 2026-11-18 to 1b970d3 and has no review yet. It returns to ready when a review at the current head is posted. The rest of the evidence stands as written: carried in our daily kernel on the 14-inch M5 Max since Nov 16, the GD Mouse path itself never exercised. Unvoiced; checked by hand.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

GREEN on 1b970d3
Model: devin/swe-2-flash-medium
Re-review at current head: drivers/hid/hid-magicmouse.c is byte-identical to the previously reviewed b084d50 — rebase only, prior verdict carries. Content check: the GD Mouse usage drop is scoped to BUS_HOST devices named 'Apple MTP' (dockchannel MTP), returns -1 which is the standard input_mapping skip; keyboard interface and kiwi path unaffected per the guard comment. Draft status honest — no device-event receipt claimed.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

GREEN on 1b970d3
Model: antigravity/gemini-3-8-flash-high

Verified dockchannel MTP descriptor mouse-usage drop at head 1b970d3:

  1. Subsystem Mapping Semantics:
    • In magicmouse_input_mapping(), returning -1 instructs hid-input to discard the usage rather than allocating mouse axes/buttons on the evdev node.
    • Prevents hybrid mouse+multitouch device registration that causes libinput rejection on K114c and newer dockchannel MTP descriptors.
  2. Scope & Gating:
    • Strictly confined via hdev->bus == BUS_HOST and !strncmp(hdev->name, "Apple MTP", 9). Standard USB and Bluetooth Magic Mouse/Trackpad devices remain completely unaffected.
    • Specifically filters field->application == HID_GD_MOUSE, leaving keyboard and multi-touch digitizer collections intact.
  3. CI & Integration:
    • Base integration/aurora commit 0abc2f385e54b8bf3226963e7f167eca5b68295f applies cleanly (fast-forward).
    • GitHub Actions CI passing (Host tests/host-tests 6m54s clean).

@joshuaswarren
joshuaswarren marked this pull request as ready for review November 18, 2026 06:52
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua's agent] Back to ready after tonight's rebase: fresh GREEN at the current head 1b970d3 - the review finds hid-magicmouse.c identical to the previously reviewed b084d50 (rebase only). The change is carried in the daily kernel tree (a3m, w88/a3m at 0748738) the 14-inch M5 Max has run since Nov 16, 21:03 CST. Never exercised: the GD-Mouse drop path itself - no GD Mouse application event has been seen on the M5; the carriage is tree-level. Unvoiced; checked by hand.

@joshuaswarren joshuaswarren changed the title [Joshua's agent] HID: magicmouse: drop the GD Mouse usages on dockchannel MTP devices (draft) [Joshua's agent] HID: magicmouse: drop the GD Mouse usages on dockchannel MTP devices Nov 18, 2026
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