Add ROG Flow Z13 trackpad DWT/palm rejection fix
Udev rule to override ID_INPUT_TOUCHPAD_INTEGRATION from external to internal for the Z13 folio touchpad, plus reference docs and install script.
This commit is contained in:
commit
3485fea240
3 changed files with 275 additions and 0 deletions
32
CLAUDE.md
Normal file
32
CLAUDE.md
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
# ROG Flow Z13 Trackpad Fix
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
Fixes "Disable while typing" (DWT) + palm rejection on the ASUS ROG Flow Z13
|
||||||
|
folio keyboard touchpad. The detachable keyboard connects via USB, which causes
|
||||||
|
the touchpad to be misclassified as "external," blocking DWT in KDE Plasma.
|
||||||
|
|
||||||
|
## Files
|
||||||
|
- `fix-rog-z13-trackpad.sh` — install script (run with sudo)
|
||||||
|
- `ROG_Flow_Z13_trackpad_fix_reference.txt` — full documentation
|
||||||
|
- `rules/99-rog-z13-touchpad.rules` — standalone copy of the udev rule
|
||||||
|
|
||||||
|
## System Files Created
|
||||||
|
- `/etc/udev/rules.d/99-rog-z13-touchpad.rules` — marks touchpad as internal
|
||||||
|
- `/etc/libinput/local-overrides.quirks` — marks keyboard as internal (optional)
|
||||||
|
|
||||||
|
## Root Cause
|
||||||
|
Systemd's `65-integration.rules` sets `ID_INPUT_TOUCHPAD_INTEGRATION=external`
|
||||||
|
because the USB device is flagged `removable`. Libinput refuses DWT for external
|
||||||
|
touchpads. The built-in libinput quirk (`50-system-asus.quirks`) only marks the
|
||||||
|
keyboard as internal, not the touchpad — libinput has no `AttrTouchpadIntegration`
|
||||||
|
quirk attribute.
|
||||||
|
|
||||||
|
## Fix
|
||||||
|
A udev rule at priority 99 overrides the property to `internal` after
|
||||||
|
`65-integration.rules` (priority 65) sets it to `external`.
|
||||||
|
|
||||||
|
## Key Details
|
||||||
|
- USB VID:PID = `0b05:1a30`
|
||||||
|
- Touchpad event device: `event8` (identified by `ID_INPUT_TOUCHPAD=1`)
|
||||||
|
- Touchpad input name: `ASUSTeK Computer Inc. GZ302EA-Keyboard Touchpad`
|
||||||
|
- The keyboard and touchpad share the same `LIBINPUT_DEVICE_GROUP`, enabling DWT pairing
|
||||||
139
ROG_Flow_Z13_trackpad_fix_reference.txt
Normal file
139
ROG_Flow_Z13_trackpad_fix_reference.txt
Normal file
|
|
@ -0,0 +1,139 @@
|
||||||
|
ROG Flow Z13 — Touchpad Palm Rejection / DWT Fix
|
||||||
|
==================================================
|
||||||
|
Created: 2026-05-13
|
||||||
|
Device: ASUS ROG Flow Z13 (folio keyboard, USB 0b05:1a30)
|
||||||
|
OS: CachyOS (Arch Linux)
|
||||||
|
KDE: Plasma 6 (Wayland)
|
||||||
|
Issue: "Disable while typing" checkbox greyed out in Touchpad settings
|
||||||
|
|
||||||
|
=====================================================================
|
||||||
|
PROBLEM SUMMARY
|
||||||
|
=====================================================================
|
||||||
|
|
||||||
|
The ROG Flow Z13's magnetic folio keyboard connects via USB. Since it's
|
||||||
|
a detachable keyboard, the kernel marks the USB device as "removable."
|
||||||
|
Systemd's 65-integration.rules uses this to set:
|
||||||
|
|
||||||
|
ID_INPUT_TOUCHPAD_INTEGRATION=external
|
||||||
|
|
||||||
|
on the touchpad. Libinput refuses to enable "Disable While Typing" (DWT)
|
||||||
|
for external touchpads, and KDE respects this by greying out the checkbox.
|
||||||
|
|
||||||
|
The libinput quirks system ships a quirk (50-system-asus.quirks) that
|
||||||
|
marks the KEYBOARD interface as internal, but there is no libinput quirk
|
||||||
|
attribute to mark a TOUCHPAD as internal — so the touchpad remained
|
||||||
|
external despite the keyboard being correctly handled.
|
||||||
|
|
||||||
|
The USB device exposes these input nodes:
|
||||||
|
|
||||||
|
event3 — Vendor keys (HID interface 1.0)
|
||||||
|
event4 — Keyboard (HID interface 1.2) ← quirk marks internal
|
||||||
|
event7 — Mouse (HID interface 1.3)
|
||||||
|
event8 — Touchpad (HID interface 1.3) ← was marked external
|
||||||
|
|
||||||
|
Both keyboard and touchpad share the same LIBINPUT_DEVICE_GROUP, so
|
||||||
|
they *can* be paired for DWT — but only if both are internal.
|
||||||
|
|
||||||
|
=====================================================================
|
||||||
|
FILES INVOLVED
|
||||||
|
=====================================================================
|
||||||
|
|
||||||
|
1. /usr/share/libinput/50-system-asus.quirks [SYSTEM — do not edit]
|
||||||
|
----------------------------------------------------------------
|
||||||
|
The libinput package ships this file. It includes a quirk:
|
||||||
|
|
||||||
|
[Asus ROG FLow Z13 2025 keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x0B05
|
||||||
|
MatchProduct=0x1A30
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
This correctly marks the keyboard interface as internal, but since
|
||||||
|
MatchUdevType=keyboard, it does not affect the touchpad.
|
||||||
|
|
||||||
|
This file is overwritten on libinput updates. Do not modify it.
|
||||||
|
|
||||||
|
2. /etc/libinput/local-overrides.quirks [USER — was already present]
|
||||||
|
----------------------------------------------------------------
|
||||||
|
A broader local override that matches all ASUS USB keyboards:
|
||||||
|
|
||||||
|
[ASUS ROG Flow Z13 All USB Keyboards]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x0B05
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
This is redundant with the system quirk above (it's less specific
|
||||||
|
since it matches any ASUS keyboard product ID). It's harmless and
|
||||||
|
can be kept or removed — the system quirk alone is sufficient for
|
||||||
|
the keyboard side. If kept, it serves as a catch-all for future
|
||||||
|
ASUS folio keyboards with different product IDs.
|
||||||
|
|
||||||
|
3. /etc/udev/rules.d/99-rog-z13-touchpad.rules [USER — NEW, created for fix]
|
||||||
|
----------------------------------------------------------------
|
||||||
|
The actual fix. This udev rule overrides the touchpad's integration
|
||||||
|
type from "external" to "internal":
|
||||||
|
|
||||||
|
ACTION=="add|change", SUBSYSTEM=="input", \
|
||||||
|
ENV{ID_VENDOR_ID}=="0b05", ENV{ID_MODEL_ID}=="1a30", \
|
||||||
|
ENV{ID_INPUT_TOUCHPAD}=="1", \
|
||||||
|
ENV{ID_INPUT_TOUCHPAD_INTEGRATION}="internal"
|
||||||
|
|
||||||
|
How it works:
|
||||||
|
- Matches input events from the Z13 folio (USB 0b05:1a30)
|
||||||
|
- Only affects touchpad devices (ID_INPUT_TOUCHPAD=1)
|
||||||
|
- Runs after systemd's 65-integration.rules (which set it to "external")
|
||||||
|
- Changes ID_INPUT_TOUCHPAD_INTEGRATION to "internal"
|
||||||
|
|
||||||
|
Libinput picks up this udev property at runtime, which:
|
||||||
|
a) Unlocks the "Disable while typing" checkbox in KDE
|
||||||
|
b) Enables DWT behavior (touchpad ignored ~300-500ms after keypress)
|
||||||
|
c) Enables libinput's more aggressive palm rejection defaults for
|
||||||
|
internal touchpads (larger exclusion zones, lower palm thresholds)
|
||||||
|
|
||||||
|
=====================================================================
|
||||||
|
REVERTING
|
||||||
|
=====================================================================
|
||||||
|
|
||||||
|
To undo the fix, delete the udev rule and reload:
|
||||||
|
|
||||||
|
sudo rm /etc/udev/rules.d/99-rog-z13-touchpad.rules
|
||||||
|
sudo udevadm control --reload-rules && sudo udevadm trigger
|
||||||
|
|
||||||
|
The keyboard quirks files can remain as-is — they only affect the
|
||||||
|
keyboard and don't cause issues on their own.
|
||||||
|
|
||||||
|
Optionally also remove:
|
||||||
|
|
||||||
|
sudo rm /etc/libinput/local-overrides.quirks
|
||||||
|
|
||||||
|
=====================================================================
|
||||||
|
TROUBLESHOOTING
|
||||||
|
=====================================================================
|
||||||
|
|
||||||
|
If DWT still doesn't work after applying:
|
||||||
|
|
||||||
|
1. Verify the udev rule is loaded:
|
||||||
|
udevadm info --query=property /dev/input/event8 | grep INTEGRATION
|
||||||
|
Should show: ID_INPUT_TOUCHPAD_INTEGRATION=internal
|
||||||
|
|
||||||
|
2. Verify the keyboard quirk is applied:
|
||||||
|
sudo libinput quirks list /dev/input/event4
|
||||||
|
Should show: AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
3. Verify both devices are recognized:
|
||||||
|
sudo libinput list-devices | grep -A15 "Touchpad"
|
||||||
|
Should show: Disable-w-typing: enabled
|
||||||
|
|
||||||
|
4. If you changed the event number (e.g. after a kernel update), re-check:
|
||||||
|
sudo libinput list-devices
|
||||||
|
Look for your touchpad and keyboard event numbers, then re-verify.
|
||||||
|
|
||||||
|
=====================================================================
|
||||||
|
REFERENCES
|
||||||
|
=====================================================================
|
||||||
|
|
||||||
|
- libinput Device Quirks: https://wayland.freedesktop.org/libinput/doc/latest/device-quirks.html
|
||||||
|
- Linux Touchpad Dev Guide: https://linuxtouchpad.org/libinput/2022/05/07/disable-while-typing.html
|
||||||
|
- libinput DWT docs: https://wayland.freedesktop.org/libinput/doc/latest/configuration.html#disable-while-typing
|
||||||
104
fix-rog-z13-trackpad.sh
Executable file
104
fix-rog-z13-trackpad.sh
Executable file
|
|
@ -0,0 +1,104 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# fix-rog-z13-trackpad.sh
|
||||||
|
# Enables "Disable while typing" (DWT) + palm rejection on the
|
||||||
|
# ASUS ROG Flow Z13 folio keyboard touchpad.
|
||||||
|
#
|
||||||
|
# Usage: ./fix-rog-z13-trackpad.sh
|
||||||
|
# (must be run as root)
|
||||||
|
#
|
||||||
|
# Tested on: CachyOS / Arch Linux, KDE Plasma 6, Wayland
|
||||||
|
# Applies to: ROG Flow Z13 (2023 & 2025 models, USB 0b05:1a30)
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
|
echo "ERROR: This script must be run as root."
|
||||||
|
echo "Usage: sudo ./fix-rog-z13-trackpad.sh"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "=== ROG Flow Z13 Trackpad Fix ==="
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# ──────────────────────────────────────
|
||||||
|
# 1. udev rule — mark touchpad as internal
|
||||||
|
# ──────────────────────────────────────
|
||||||
|
UDEV_RULE="/etc/udev/rules.d/99-rog-z13-touchpad.rules"
|
||||||
|
|
||||||
|
if [ -f "$UDEV_RULE" ]; then
|
||||||
|
echo "[SKIP] $UDEV_RULE already exists"
|
||||||
|
else
|
||||||
|
echo "[CREATE] $UDEV_RULE"
|
||||||
|
cat > "$UDEV_RULE" << 'EOF'
|
||||||
|
# ROG Flow Z13 folio keyboard touchpad integration override
|
||||||
|
#
|
||||||
|
# The Z13's detachable folio keyboard connects via USB (0b05:1a30).
|
||||||
|
# The touchpad on this device is correctly exposed as a touchpad, but
|
||||||
|
# udev marks it as ID_INPUT_TOUCHPAD_INTEGRATION=external because the
|
||||||
|
# USB device is flagged as "removable" (it's a detachable keyboard).
|
||||||
|
#
|
||||||
|
# Libinput refuses to enable "Disable While Typing" (DWT) for touchpads
|
||||||
|
# marked as external, which greyed out the checkbox in KDE Plasma.
|
||||||
|
#
|
||||||
|
# This rule overrides the integration type to "internal" for the Z13
|
||||||
|
# touchpad only, which allows DWT pairing with the keyboard (already
|
||||||
|
# marked internal via the libinput quirk in 50-system-asus.quirks).
|
||||||
|
|
||||||
|
ACTION=="add|change", SUBSYSTEM=="input", \
|
||||||
|
ENV{ID_VENDOR_ID}=="0b05", ENV{ID_MODEL_ID}=="1a30", \
|
||||||
|
ENV{ID_INPUT_TOUCHPAD}=="1", \
|
||||||
|
ENV{ID_INPUT_TOUCHPAD_INTEGRATION}="internal"
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ──────────────────────────────────────
|
||||||
|
# 2. libinput quirk — mark keyboard as internal (belt-and-suspenders)
|
||||||
|
# ──────────────────────────────────────
|
||||||
|
LIBINPUT_QUIRKS="/etc/libinput/local-overrides.quirks"
|
||||||
|
|
||||||
|
# Only create if it doesn't exist; if it does, it may have user customizations
|
||||||
|
if [ -f "$LIBINPUT_QUIRKS" ]; then
|
||||||
|
echo "[SKIP] $LIBINPUT_QUIRKS already exists (not overwriting)"
|
||||||
|
else
|
||||||
|
echo "[CREATE] $LIBINPUT_QUIRKS"
|
||||||
|
mkdir -p /etc/libinput
|
||||||
|
cat > "$LIBINPUT_QUIRKS" << 'EOF'
|
||||||
|
[ROG Flow Z13 All USB Keyboards]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x0B05
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ──────────────────────────────────────
|
||||||
|
# 3. Apply udev changes
|
||||||
|
# ──────────────────────────────────────
|
||||||
|
echo ""
|
||||||
|
echo "[APPLY] Reloading udev rules..."
|
||||||
|
udevadm control --reload-rules
|
||||||
|
|
||||||
|
echo "[APPLY] Triggering udev for existing devices..."
|
||||||
|
udevadm trigger --subsystem-match=input
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "=== DONE ==="
|
||||||
|
echo ""
|
||||||
|
echo "The fix has been applied. To activate it:"
|
||||||
|
echo ""
|
||||||
|
echo " 1. Log out and log back in (or reboot)"
|
||||||
|
echo " 2. Open System Settings -> Touchpad"
|
||||||
|
echo " 3. Check \"Disable touchpad when typing\""
|
||||||
|
echo ""
|
||||||
|
echo "The checkbox should now be available. If the touchpad already"
|
||||||
|
echo "feels better at rejecting palm brushes while typing — that's"
|
||||||
|
echo "expected. DWT and improved palm rejection both activate when"
|
||||||
|
echo "the touchpad is recognized as internal."
|
||||||
|
echo ""
|
||||||
|
echo "To undo this fix later, run:"
|
||||||
|
echo " sudo rm /etc/udev/rules.d/99-rog-z13-touchpad.rules"
|
||||||
|
echo " sudo rm /etc/libinput/local-overrides.quirks"
|
||||||
|
echo " sudo udevadm control --reload-rules"
|
||||||
|
echo " sudo udevadm trigger --subsystem-match=input"
|
||||||
|
echo ""
|
||||||
Loading…
Add table
Add a link
Reference in a new issue