Repository navigation
Conversation
…n the J700 The contact records of the J700 report layout carry the touch state and the path ID in their first word, as the standard records do. Allow apple,touch-states on a multi-touch node with the J700 compatible, and say what it adds there: the layout has no force, so the contacts that make or keep touch are reported with their touch and tool areas.
On the J700 every record of a report is passed on as a touch, with its position only. The records do carry the touch state and the path ID in their first word, like the standard MTP records: a capture of normal use (6102 records of 29 contacts) shows each contact going through states 1, (2,) 3, 4..., (5, 6,) 7 and then 0 under one path ID. The touch and tool areas are nonzero in states 1 to 6 and zero in 7 and 0, which are the "real contacts" with a zero touch area that made the driver ignore the areas. A finger approaching or leaving the pad is therefore reported as touching, and its position moves while it does: up to 12 mm between the start in range and the first touching record, and 3.2 mm over the last three records of a finger that had stopped, still in state 4 with a touch major of 87, 74 and 23 (125 and above while it rested on the pad). User space sees the first as a pointer jump and the second as a scroll or a pointer motion at the moment the fingers lift; libinput logs some of them as "Touch jump detected and discarded". With apple,touch-states on the J700 multi-touch node, report only the records that make or keep touch, each in the slot of its path ID, as on the J813 and J815. The states alone do not cover the lift above, so also report the touch and tool areas, scaled as for the other MTP trackpads: libinput ends a touch once its area falls below the threshold of its MTP quirk, as it does there. Pressure and orientation stay unadvertised. Without the property nothing changes. Replaying the capture through this rule and libinput's touch-size thresholds for MTP trackpads (150:130), the motion reported while landing falls from at most 11.9 mm to 1.6 mm, and over the lift of the four fingers that had stopped from 3.28, 0.30, 0.32 and 0.33 mm to 0.42, 0.14, 0.02 and 0.21 mm, with no touch dropped while it rested. Run on a J700 as a backport to a tree from 2026-11-21, with a local test parameter standing in for the property: in a second capture the 107 entries into states 3 and 4 gave 107 touches, and a two-finger scroll that had stopped scrolled 0.03 and 0.04 mm as the fingers lifted, against 1.9 mm before. All 12897 records in states 3 and 4 of the two captures have nonzero areas. Not run on this base, and the property itself has not been through a boot.
The J700 trackpad's contact records carry the touch state and the path ID. Report only the contacts that make or keep touch, with their touch and tool areas.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What: On the J700 (MacBook Neo) every contact record of a report is passed on as a touch, with its position only. A finger approaching or leaving the pad therefore moves the pointer, and a two-finger scroll that has stopped scrolls again as the fingers lift. With
apple,touch-stateson the J700multi-touchnode, the driver reports only the records that make or keep touch, in path-ID slots (the reporting #2613 added for the J813/J815), together with their touch and tool areas, so libinput can end a touch while its area collapses.Tested: not at this head (
b4e4808b). J700 (MacBook Neo), Aura 1.0.0b9, the same driver change backported to a 2026-11-21 integration tree (niteria/linuxc6d6756e): scroll after a stopped two-finger lift 0.03 and 0.04 mm, against 1.9 mm before; 107 make-touch entries gave 107 touches; 0 failed units.Risk: two-way door · Neo (J700) only, through its
multi-touchnode property. Without the property the driver reports as it does today.Not yet: a run at this head: on
main, with a supported Aura, and with the property coming from the device tree. The hardware run switched the states on with a local test parameter (not in this PR), because that boot chain supplies its own device tree, and I can't move this machine tomainand a newer Aura right now. Also not measured: taps and tap-to-click, and palms and flat thumbs, which matter because libinput's Apple MTP palm size threshold starts to apply once sizes are reported (see Details). The commits get theirSigned-off-bytogether with the hardware row; draft until then.Details
Thanks to Nick for the touch-state reporting in #2613, which this reuses unchanged, and to LiamRay11 and Ryan for the C1FE report layout the driver already decodes.
What the J700 records carry
The first word of each 30-byte contact record holds the path ID in its low byte and the touch state in its high byte, the same encoding as on the J813/J815. Two captures of normal use on one J700 (raw reports read from HID debugfs, 9,585 reports, 13,735 records):
Each contact goes through 1, (2,) 3, 4…, (5, 6,) 7 and then 0 under one path ID. The commit that added the layout (
ecd5dac9b258) left the areas out because "the touch area field is zero on some real contacts". In these captures the zero areas are exactly the records in states 7 and 0; all 12,897 records in states 3 and 4 have nonzero touch and tool areas. Pressure is always zero.Why the areas as well as the states
Today a landing finger is reported from its start-in-range record and moves up to 12 mm before its first touching record, which user space sees as a pointer jump. The states remove that.
The lift needs more. In the first capture one finger that had stopped moved 3.2 mm over its last three records while still in state 4, with its touch major falling 87, 74, 23 (125 and above while it rested). The states alone would report all of that as motion. With the areas, libinput's touch-size thresholds end the touch as the area falls.
The areas are reported as on the other MTP trackpads (
ABS_MT_TOUCH_MAJOR/MINOR,ABS_MT_WIDTH_MAJOR/MINOR, the record's values times two), so libinput's existing Apple MTP entry (AttrTouchSizeRange=150:130) applies without a new quirk. As #2613 notes for the J813/J815, I don't claim these fields are geometric sizes; they are used as the same relative measure libinput already thresholds on the other pads. Pressure and orientation stay unadvertised.libinput's palm size threshold
The Apple MTP entry also sets
AttrPalmSizeThreshold=1600, which starts to apply once sizes are reported. aurora-neo-platform-config's J700 quirk already sets it to 0, so installs with that package are unaffected. The run below was on a system without that quirk: the largest touch major/minor reported in the captures was 658/694, and no palm or flat thumb was in them, so I can't say where those land.Binding and fallback
The binding stops rejecting
apple,touch-stateson a node with the J700 compatible and describes what it adds there; the palm properties stay rejected for that layout. The driver reads the property as before; when it is absent the J700 path is unchanged (every record reported, position only), so an older device tree keeps today's behaviour.Evidence
Hardware run (not at this head). J700, Aura 1.0.0b9, kernel niteria/linux
c6d6756e= a 2026-11-21 integration tree with89d09f9f41ff(#2613's touch-state commit, context-only backport), this PR's driver commit and dts commit, and a local test parameter that sets what the property sets. The installed boot chain's device tree was not replaced, so the parameter, not the property, switched the states on.hid-magicmouse.c's J700 path is otherwise the code in this PR. libinput 1.29.2, Hyprland.Method: raw reports from HID debugfs,
libinput recordandlibinput debug-eventstaken together; the pad's report clock runs 0.23 % fast against the kernel's, so the two were aligned with a linear fit over 14 button edges (residuals ≤ 1.3 ms). "Lift" starts when the first finger's touch area falls below 85 % of its plateau.dockchannel-hid … uninitialized iface 3at boot, also on 2 of the 24 boots before it); one deep sleep entered and resumedReplaying the first capture (before the change) through "states 3/4 + 150:130": landing motion at most 11.9 mm → 1.6 mm; the four stopped-finger lifts 3.28, 0.30, 0.32, 0.33 mm → 0.42, 0.14, 0.02, 0.21 mm; no touch dropped while it rested.
At this head (
b4e4808b), build only:dt_binding_checkonapple,dockchannel-hid.yamlpasses;CHECK_DTBSont8140-j700.dtbpasses, and the same DTB is rejected againstmain's binding ("apple,touch-states: False schema does not allow True").hid-magicmouse.cbuilds withW=1and no warnings (as a module against amain-based arm64 build tree).checkpatch --strict: only the missingSigned-off-by.