Simplify the haptic trackpad fix

This commit is contained in:
David Heinemeier Hansson
2026-03-19 23:09:41 -04:00
parent e02186551a
commit 886320acee
@@ -14,16 +14,19 @@ ACTION=="add", SUBSYSTEM=="platform", KERNEL=="i2c_designware.0", ATTR{power/con
EOF EOF
sudo udevadm control --reload-rules sudo udevadm control --reload-rules
# Rebind the I2C HID touchpad on resume to fully reinitialize haptic engine # Rebind the I2C HID touchpad on boot and resume to reinitialize haptic engine
sudo tee /usr/lib/systemd/system-sleep/dell-xps-haptic-touchpad << 'HOOK' sudo tee /etc/systemd/system/dell-xps-haptic-touchpad.service << 'SVC'
#!/bin/bash [Unit]
if [[ $1 == "post" ]]; then Description=Rebind Dell XPS haptic touchpad
if [[ -d /sys/bus/i2c/devices/i2c-VEN_06CB:00 ]]; then After=systemd-udev-settle.service
echo "i2c-VEN_06CB:00" > /sys/bus/i2c/drivers/i2c_hid_acpi/unbind 2>/dev/null
sleep 1 [Service]
echo "i2c-VEN_06CB:00" > /sys/bus/i2c/drivers/i2c_hid_acpi/bind 2>/dev/null Type=oneshot
fi ExecStart=/bin/bash -c 'if [[ -d /sys/bus/i2c/devices/i2c-VEN_06CB:00 ]]; then echo "i2c-VEN_06CB:00" | tee /sys/bus/i2c/drivers/i2c_hid_acpi/unbind > /dev/null 2>&1; sleep 1; echo "i2c-VEN_06CB:00" | tee /sys/bus/i2c/drivers/i2c_hid_acpi/bind > /dev/null 2>&1; fi'
fi
HOOK [Install]
sudo chmod +x /usr/lib/systemd/system-sleep/dell-xps-haptic-touchpad WantedBy=multi-user.target suspend.target hibernate.target
SVC
sudo systemctl daemon-reload
sudo systemctl enable dell-xps-haptic-touchpad.service
fi fi