Skip to content

Classify T2 built-in trackpads as internal - #10890

Open
Drecullith wants to merge 1 commit into
omacom:quattrofrom
Drecullith:fix/t2-trackpad-internal-hwdb
Open

Classify T2 built-in trackpads as internal#10890
Drecullith wants to merge 1 commit into
omacom:quattrofrom
Drecullith:fix/t2-trackpad-internal-hwdb

Conversation

@Drecullith

Copy link
Copy Markdown

Summary

Fix disable_while_typing on T2 MacBooks by marking Apple's built-in trackpad as an internal touchpad in the systemd hardware database.

On T2 machines, the internal keyboard/trackpad is exposed through the t2bce_vhci virtual USB controller. That makes the built-in trackpad appear removable/external to libinput, so its disable-while-typing feature is unavailable even when Hyprland has input:touchpad:disable_while_typing enabled.

This change adds a narrowly scoped hwdb override:

  • matches Apple's USB vendor;
  • matches the specific Apple Inc. Apple Internal Keyboard / Trackpad device name;
  • marks it with ID_INPUT_TOUCHPAD_INTEGRATION=internal;
  • does not hard-code one USB product ID, allowing the rule to cover T2 model variants;
  • does not match an external Apple Magic Trackpad.

Fresh T2 installs deploy and compile the rule through the existing fix-t2.sh hardware path.

A new migration applies the same rule to existing T2 installations, using the same T2 PCI detection already used by Omarchy's T2 setup. The migration only recompiles the hwdb when the installed rule differs from the shipped rule, making it idempotent.

The input-device retrigger is best-effort: if a live retrigger fails, the compiled hwdb remains installed and will apply on the next device enumeration or reboot.

Fixes #10815.

Tests

Added test/shell.d/t2-trackpad-test.sh covering:

  • fresh T2 setup installs and activates the hwdb rule;
  • the reported 05ac:027b internal trackpad is classified as internal;
  • another T2 product ID, 05ac:027e, is also classified as internal;
  • an external Apple Magic Trackpad does not match the override;
  • existing T2 installations receive the migration;
  • rerunning the migration with the current rule is a no-op;
  • non-T2 systems are left untouched.

The focused regression suite passes 6/6.

Also verified:

  • bash -n install/hardware/apple/fix-t2.sh
  • bash -n migrations/1788912000.sh
  • bash -n test/shell.d/t2-trackpad-test.sh
  • the shipped hwdb file compiles successfully with systemd-hwdb --strict

No physical T2 MacBook was available for live hardware verification. The issue reporter independently confirmed that setting ID_INPUT_TOUCHPAD_INTEGRATION=internal fixes disable-while-typing on the affected machine.

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.

T2 Macbook Pro Trackpad disable_while_typing setting not working

1 participant