Address the new haptic touchpad in the shipping xps
This commit is contained in:
@@ -11,7 +11,6 @@ Trigger protocol used by these Synaptics touchpads.
|
|||||||
import fcntl, glob, os, struct, sys
|
import fcntl, glob, os, struct, sys
|
||||||
|
|
||||||
VENDOR = "06CB"
|
VENDOR = "06CB"
|
||||||
PRODUCT = "D01A"
|
|
||||||
REPORT_ID = 0x37
|
REPORT_ID = 0x37
|
||||||
INTENSITY = 40 # 0-100
|
INTENSITY = 40 # 0-100
|
||||||
|
|
||||||
@@ -34,7 +33,7 @@ def find_hidraw():
|
|||||||
try:
|
try:
|
||||||
with open(uevent) as f:
|
with open(uevent) as f:
|
||||||
content = f.read().upper()
|
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))
|
return os.path.join("/dev", os.path.basename(path))
|
||||||
except OSError:
|
except OSError:
|
||||||
continue
|
continue
|
||||||
@@ -46,7 +45,7 @@ def find_touchpad_event():
|
|||||||
try:
|
try:
|
||||||
with open(path) as f:
|
with open(path) as f:
|
||||||
name = f.read().strip().upper()
|
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]
|
event = path.split("/")[-3]
|
||||||
return os.path.join("/dev/input", event)
|
return os.path.join("/dev/input", event)
|
||||||
except OSError:
|
except OSError:
|
||||||
|
|||||||
@@ -1,8 +1,23 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Reload the intel_quicki2c driver to fix a dead trackpad.
|
# Reset the trackpad by unbinding and rebinding its driver.
|
||||||
# The THC (Touch Host Controller) can fail to initialize interrupts
|
# Covers both driver paths:
|
||||||
# during boot or after suspend, leaving the trackpad registered but
|
# - i2c_hid_acpi (DesignWare I2C, e.g. XPS 14/16 Synaptics trackpad)
|
||||||
# not delivering events.
|
# - 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
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Fix Dell XPS haptic touchpad.
|
# 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.
|
# protocol, but the kernel's HID haptic subsystem only supports Auto Trigger.
|
||||||
# This sets up a lightweight daemon that monitors touchpad button events and
|
# This sets up a lightweight daemon that monitors touchpad button events and
|
||||||
# sends haptic pulses via HID feature reports on the hidraw device.
|
# sends haptic pulses via HID feature reports on the hidraw device.
|
||||||
|
|||||||
Reference in New Issue
Block a user