Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions install/config/hardware/asus/fix-asus-ptl-b9406-touchpad.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,32 @@
#
# Mask the pressure axes with a quirks override, same pattern as the
# Asus UX302LA entry in libinput's shipped 50-system-asus.quirks.
#
# Two things matter for the override to take effect:
# 1. libinput reads only ONE override file, /etc/libinput/local-overrides.quirks.
# Custom-named files in /etc/libinput/ are never loaded.
# 2. udev tags this pad as ID_INPUT_MOUSE, not ID_INPUT_TOUCHPAD, so a
# MatchUdevType=touchpad section is skipped. The bus/vendor/product/DMI
# keys already pin the device exactly, so we omit the type constraint.

if omarchy-hw-asus-expertbook-b9406; then
sudo mkdir -p /etc/libinput
sudo tee /etc/libinput/asus-expertbook-b9406.quirks >/dev/null <<EOF
[ASUS ExpertBook B9406 Touchpad]
QUIRKS_FILE="/etc/libinput/local-overrides.quirks"
QUIRKS_SECTION="[ASUS ExpertBook B9406 Touchpad]"

# Remove the stale, never-read file written by earlier Omarchy versions.
sudo rm -f /etc/libinput/asus-expertbook-b9406.quirks

# Append our section to the shared override file, but only once.
if ! sudo grep -qF "$QUIRKS_SECTION" "$QUIRKS_FILE" 2>/dev/null; then
sudo mkdir -p /etc/libinput
sudo tee -a "$QUIRKS_FILE" >/dev/null <<EOF

$QUIRKS_SECTION
Comment on lines +29 to +31
MatchBus=i2c
MatchUdevType=touchpad
MatchVendor=0x093A
MatchProduct=0x4F05
MatchDMIModalias=dmi:*svnASUS*:pn*B9406*
AttrEventCode=-ABS_MT_PRESSURE;-ABS_PRESSURE;
EOF
Comment on lines +26 to 37
fi
fi
5 changes: 5 additions & 0 deletions migrations/1781432360.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
echo "Fix touchpad quirk on ASUS ExpertBook B9406 (was written to a path libinput never reads)"

if omarchy-hw-asus-expertbook-b9406; then
source "$OMARCHY_PATH/install/config/hardware/asus/fix-asus-ptl-b9406-touchpad.sh"
fi