Skip to content

Add thinkpad-t14-amd-touchpad-dkms: RMI4/SMBus touchpad on the ThinkPad T14 Gen 2a / P14s Gen 2 AMD - #472

Merged
ryanrhughes merged 4 commits into
omacom:masterfrom
orospakr:thinkpad-t14-amd-touchpad-dkms
Oct 15, 2026
Merged

ryanrhughes merged 4 commits into
omacom:masterfrom
orospakr:thinkpad-t14-amd-touchpad-dkms

Conversation

@orospakr

@orospakr orospakr commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

What

A DKMS package that lets the Synaptics touchpad in the ThinkPad T14 Gen 2a and P14s Gen 2 (AMD), and the T14/P14s Gen 1 AMD, run over RMI4/SMBus (InterTouch) instead of the PS/2 fallback the stock kernel leaves it on. On PS/2 the pad reports at 80 Hz single-finger and about 40 Hz two-finger, so the pointer feels laggy, scrolls are chunky and fast flicks whiff into pointer motion. Over SMBus it reports every 15 ms with two-finger gestures intact and the TrackPoint still on its PS/2 pass-through.

Upstream: https://github.com/orospakr/thinkpad-t14-amd-touchpad (tag v0.2.3). The companion Omarchy PR adds the detector and hardware leaf so this installs only on that machine.

Why a DKMS package

The stock kernel cannot use the SMBus path on this machine: psmouse's InterTouch needs an I2C adapter that offers SMBus Host Notify, and i2c-piix4 on AMD offers none. Lenovo's Windows driver does it through the ASF block of the same SMBus controller. This package rebuilds three in-tree modules (i2c-piix4, rmi_smbus, psmouse) from pristine kernel.org sources plus five patches, installed under /updates so they shadow the stock modules:

Patch What
0001 i2c: piix4 SMBus Host Notify through the ASF target block on ACPI SMB0001 platforms
0002 Input: synaptics-rmi4 300 ms settle after the PS/2 reset psmouse sends on resume (fixes 80 Hz / first-touch jump after suspend)
0003 Input: synaptics the RMI4 doze interval Lenovo's Windows driver programs (short taps and two-finger touches were dropped at the default)
0004 Input: synaptics LEN2073 (Gen 2 AMD) in the SMBus allowlist
0005 Input: synaptics LEN2064 (Gen 1 AMD) back in the SMBus allowlist; mainline removed it in 2022 (2fd003ee8ade) because Host Notify was unavailable, which 0001 supplies

The patches are written for upstream and carried here until they land; the README's "Carried patches" table names the tree, status and retirement condition for each, and the package is retired once a stock kernel drives the pad over SMBus on its own.

Packaging notes

  • source: local, built from the tagged GitHub tarball; .omarchy/package.json declares a git_tags upstream so sync-upstream follows new tags (verified: bin/sync-upstream thinkpad-t14-amd-touchpad-dkms reports current).
  • depends=('dkms') only, per the base-system guarantee of matching headers.
  • replaces/conflicts a private predecessor package (i2c-piix4-asf-dkms) that only ever existed on my machine.
  • Kernel policy is "patches apply and the build succeeds"; the DKMS PRE_BUILD hook warns when the kernel series differs from the pristine sources. The upstream repo's CI applies and builds the patches weekly against Arch linux-headers, Omarchy linux-omarchy-headers and mainline master, and refreshes the sources to each kernel's own tag to catch a series bump before it reaches a machine.
  • The modules are rebuilt from pristine sources, so hunks a distribution kernel carries in the same files would otherwise be dropped. 0.2.2 carries both psmouse hunks linux-omarchy 7.2.5 ships in 0560-input.patch as verbatim mainline backports, 761c2040a7d4 ("Input: psmouse - fix use-after-free during protocol disconnect") and 7f9c8c6716a9 ("Input: focaltech - use signed coordinates to prevent underflow"), applied after the package's own patches, so nothing linux-omarchy ships in these files is dropped; they fall away at the 7.3 source refresh. CI lists such patches as a warning.
  • 0.2.3 refreshes the pristine sources to v7.2.9, so the stable changes to rmi_smbus.c and synaptics.c since v7.2.3 are kept. From 7.2.8, linux-omarchy becomes a meta package for linux-omarchy-bore, whose 0560-input-updates.patch and 0563-input-fixes-2.patch carry more in these files: guard() refactors, a rewritten PnP ID matcher, a smb_block_read() cleanup, DLL0597 and LEN205b allowlist entries, and the board 2722 disable narrowed to the T440p. None changes behaviour on the Gen 1 or Gen 2 AMD (board 3471), so 0.2.3 does not carry them; the upstream README lists them.
  • thinkpad-t14-amd-touchpad-check (installed to /usr/bin) reports whether the three modules are built, loaded from the DKMS copies (/updates, or /extra on Fedora), and whether the pad is on the RMI4 transport.

Tested

  • T14 Gen 2a (20XL, Ryzen 7 PRO 5850U, TM3471 / LEN2073): makepkg from this directory, install, reboot on linux 7.2.3-arch1-3 and on linux-omarchy 7.2.5-3 (Omarchy 4.0.4). thinkpad-t14-amd-touchpad-check all ok on both, with the three modules loaded from /updates/dkms.
  • Suspend soak on linux-omarchy 7.2.5-3: three suspend/resume cycles over a day, pad on RMI4 throughout, no rmi4/piix4 kernel messages after the boot-time attach, no first-touch jump after wake. Report rate measured afterwards with evtest over 10 s of continuous motion: one finger 563 frames, median 14.9 ms (p90 15.1, max 15.5); two fingers 458 frames, median 14.9 ms (p90 15.1, max 16.0). Stock PS/2 is 12.5 ms single-finger and ~25 ms two-finger.
  • 0.2.1 (the interrupt fix): overnight soak on linux-omarchy 7.2.5-3 with several suspend/resume cycles, pad on RMI4 throughout. IRQ 7 now takes about five interrupts per touchpad frame (one Host Notify plus the block reads) and none while idle, down from some seventy per frame in 0.2.0.
  • 0.2.2 (backports): built by DKMS against 7.2.3-arch1-3 and 7.2.5-3-omarchy headers, no warnings; the two backports apply with no offset after 0001-0004.
  • 0.2.3: makepkg from this directory (checksum verified); the patches apply and the modules build against 7.2.5-3-omarchy and 7.2.3-arch1-3 headers, and upstream CI is green against Arch 7.2.9, linux-omarchy 7.2.5 and mainline. A T14 Gen 1 AMD owner (20UD, LEN2064) ran the 0.2.3 tree on Fedora 44 / 7.2.9 and reports it working: RMI4 at 15 ms, taps and suspend fine, TrackPoint at 7-8 ms instead of 23-40 ms on the pass-through (orospakr/thinkpad-t14-amd-touchpad#1). Fedora builds psmouse in, so that run exercised 0001 and 0002 with psmouse.synaptics_intertouch=1 rather than 0005 itself.
  • The Omarchy side is Run the ThinkPad T14 Gen 2a (AMD) touchpad over RMI4/SMBus omarchy#12055; the two go together. Its detector matches only the Gen 2 AMD, so Gen 1 owners get this package only by installing it by hand.

🤖 Generated with Claude Code

Runs the Synaptics touchpad in the ThinkPad T14 Gen 2a / P14s Gen 2 AMD
over RMI4/SMBus (InterTouch) instead of the PS/2 fallback. DKMS rebuilds
i2c-piix4, rmi_smbus and psmouse from pristine kernel sources plus four
patches carried until they land upstream. Local package sourced from the
tagged release; the git_tags upstream block lets sync-upstream follow it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QMoJtbVrnbn1excdwv9YEW
Upstream 0.2.1 acks the SMBus host transaction-completion interrupt in
the ASF handler, which the block raises on every master transfer; left
unacked it cost some seventy interrupts per touchpad frame.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QMoJtbVrnbn1excdwv9YEW
@ryanrhughes ryanrhughes added new-omarchy-feature build-approved Maintainer approved this PR to build on the self-hosted pool and removed build-approved Maintainer approved this PR to build on the self-hosted pool labels Sep 21, 2026
orospakr and others added 2 commits October 1, 2026 06:43
0.2.2 carries the two hunks linux-omarchy ships in 0560-input.patch as
verbatim backports of mainline 761c2040a7d4 ("Input: psmouse - fix
use-after-free during protocol disconnect") and 7f9c8c6716a9 ("Input:
focaltech - use signed coordinates to prevent underflow"), so installing
the package on linux-omarchy no longer drops the psmouse use-after-free
fix from the rebuilt psmouse module.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds the ThinkPad T14/P14s Gen 1 AMD (LEN2064, patch 0005), refreshes the
pristine kernel sources from v7.2.3 to v7.2.9, and makes the -check tool
accept Fedora's /extra DKMS location and a built-in psmouse.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QMoJtbVrnbn1excdwv9YEW
@ryanrhughes
ryanrhughes enabled auto-merge (squash) October 15, 2026 01:51
@ryanrhughes
ryanrhughes merged commit ea7b502 into omacom:master Oct 15, 2026
7 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Publish succeeded → live

Packages: thinkpad-t14-amd-touchpad-dkms (x86_64, PR artifact)

  • edge/x86_64: thinkpad-t14-amd-touchpad-dkms-0.2.3-1-x86_64

Commit ea7b502 · run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-approved Maintainer approved this PR to build on the self-hosted pool new-omarchy-feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants