From 111307fba3dc3e218efd18ccac3e5ef7247be0c5 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 10 Apr 2026 06:10:38 -0400 Subject: [PATCH] Address the new haptic touchpad in the shipping xps --- bin/omarchy-haptic-touchpad | 5 ++-- bin/omarchy-restart-trackpad | 25 +++++++++++++++---- .../hardware/dell/fix-xps-haptic-touchpad.sh | 2 +- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/bin/omarchy-haptic-touchpad b/bin/omarchy-haptic-touchpad index f800f0d0..f0240116 100755 --- a/bin/omarchy-haptic-touchpad +++ b/bin/omarchy-haptic-touchpad @@ -11,7 +11,6 @@ Trigger protocol used by these Synaptics touchpads. import fcntl, glob, os, struct, sys VENDOR = "06CB" -PRODUCT = "D01A" REPORT_ID = 0x37 INTENSITY = 40 # 0-100 @@ -34,7 +33,7 @@ def find_hidraw(): try: with open(uevent) as f: content = f.read().upper() - if f"0000{VENDOR}" in content and f"0000{PRODUCT}" in content: + if f"0000{VENDOR}" in content: return os.path.join("/dev", os.path.basename(path)) except OSError: continue @@ -46,7 +45,7 @@ def find_touchpad_event(): try: with open(path) as f: name = f.read().strip().upper() - if VENDOR in name and PRODUCT in name and "TOUCHPAD" in name: + if VENDOR in name and "TOUCHPAD" in name: event = path.split("/")[-3] return os.path.join("/dev/input", event) except OSError: diff --git a/bin/omarchy-restart-trackpad b/bin/omarchy-restart-trackpad index 80bdfcfd..4e2d584a 100755 --- a/bin/omarchy-restart-trackpad +++ b/bin/omarchy-restart-trackpad @@ -1,8 +1,23 @@ #!/bin/bash -# Reload the intel_quicki2c driver to fix a dead trackpad. -# The THC (Touch Host Controller) can fail to initialize interrupts -# during boot or after suspend, leaving the trackpad registered but -# not delivering events. +# Reset the trackpad by unbinding and rebinding its driver. +# Covers both driver paths: +# - i2c_hid_acpi (DesignWare I2C, e.g. XPS 14/16 Synaptics trackpad) +# - intel_quicki2c (THC Touch Host Controller) -sudo modprobe -r intel_quicki2c && sudo modprobe intel_quicki2c +# Try i2c_hid_acpi path (DesignWare I2C trackpads) +for dev in /sys/bus/i2c/drivers/i2c_hid_acpi/i2c-*; do + [ -e "$dev" ] || continue + I2C_DEVICE=$(basename "$dev") + echo "Resetting $I2C_DEVICE via i2c_hid_acpi unbind/rebind..." + echo "$I2C_DEVICE" | sudo tee /sys/bus/i2c/drivers/i2c_hid_acpi/unbind > /dev/null + sleep 1 + echo "$I2C_DEVICE" | sudo tee /sys/bus/i2c/drivers/i2c_hid_acpi/bind > /dev/null + echo "Done" +done + +# Also try THC path +if lsmod | grep -q intel_quicki2c; then + echo "Reloading intel_quicki2c..." + sudo modprobe -r intel_quicki2c && sudo modprobe intel_quicki2c +fi diff --git a/install/config/hardware/dell/fix-xps-haptic-touchpad.sh b/install/config/hardware/dell/fix-xps-haptic-touchpad.sh index 427f3783..dd079611 100644 --- a/install/config/hardware/dell/fix-xps-haptic-touchpad.sh +++ b/install/config/hardware/dell/fix-xps-haptic-touchpad.sh @@ -1,5 +1,5 @@ # Fix Dell XPS haptic touchpad. -# The Synaptics haptic touchpad (06CB:D01A) uses the HID Manual Trigger +# The Synaptics haptic touchpad (vendor 06CB) uses the HID Manual Trigger # protocol, but the kernel's HID haptic subsystem only supports Auto Trigger. # This sets up a lightweight daemon that monitors touchpad button events and # sends haptic pulses via HID feature reports on the hidraw device.