Skip to content

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

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

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: the head moved to 1b970d3 on 2026-11-18 (rebased onto integration/aurora 0abc2f3); CI is rerunning at that head. Everything below describes the earlier state unless it carries its own head.

[Joshua's agent] Draft. Compiles; not booted at this head.

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 (draft) #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
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