https://bugs.kde.org/show_bug.cgi?id=525555
Bug ID: 525555
Summary: Touchpad disabled on lid open — spurious activation of
"Toggle Touchpad" global shortcut (Surface Go 3 Type
Cover)
Classification: Plasma
Product: kwin
Version First 6.3.6
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: input
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: ---
Product: kwin
Component: Input (CC: kglobalaccel)
Version: 6.3.6
SUMMARY
On a Microsoft Surface Go 3 with the Surface Type Cover (045E:096F) under
Wayland,
opening the lid triggers KWin's touchpad global shortcut (component
kcm_touchpad,
action "Toggle Touchpad") without any user input. The touchpad is disabled
and the
state is persisted, so it stays off until re-enabled manually.
ENVIRONMENT
- Debian 13 (trixie)
- Plasma 6.3.6 / KWin 6.3.6
- KGlobalAccel: libkf6globalaccel 6.13.0, kglobalacceld 6.3.6,
libkglobalacceld0 6.3.6
- Qt 6.8.2
- libinput 1.28.1 (Wayland session)
- Kernel 6.12.107+deb13-amd64
- Microsoft Surface Go 3, Surface Type Cover (045E:096F)
STEPS TO REPRODUCE
1. Touchpad enabled.
2. Close the lid (fold the Type Cover over the screen).
3. Open the lid and unlock.
ACTUAL
The touchpad is disabled: KWin InputDevice "enabled" becomes false and
~/.config/kcminputrc gets:
[Libinput][1118][2415][Microsoft Surface Type Cover Touchpad]
Enabled=false
It remains disabled until manually re-enabled.
EXPECTED
The touchpad stays enabled.
ANALYSIS / EVIDENCE
- InputRedirection::enableOrDisableTouchpads(false) is only reachable from
the
touchpad global shortcut actions in setupTouchpadShortcuts()
(src/input.cpp).
- D-Bus monitoring shows, ~0.7 s after SW_LID open, a signal:
/component/kcm_touchpad,
org.kde.kglobalaccel.Component.globalShortcutPressed
"kcm_touchpad", "Toggle Touchpad"
while NO key event was observed on any input device at that moment.
- allShortcutInfos() for the component shows a bogus 0 entry in the active
list of
"Toggle Touchpad": [16777488, 0, 352321808, 352325930].
This comes from registering Qt::Key_TouchpadToggle twice:
setShortcut(touchpadToggleAction,
{Key_TouchpadToggle, Key_TouchpadToggle,
Meta+Ctrl+Key_TouchpadToggle, Meta+Ctrl+Key_Zenkaku_Hankaku});
A key event with no keysym (Qt key 0 / Key_unknown) may match the 0 entry
and
activate the action.
- On this hardware, opening the lid also emits spurious key events from the
Surface
HID (observed: KEY_F21 on the Type Cover, which the default keymap maps to
XF86TouchpadToggle, and KEY_UNKNOWN/0xF0 from the "Intel HID 5 button
array").
So an unknown/phantom key ends up toggling the touchpad and the state is
persisted.
REQUEST
Please avoid registering duplicate/Qt::Key_TouchpadToggle entries (no 0
shortcut),
and make touchpad enable/disable robust against unknown/phantom key events
(e.g. ignore key events with no keysym, and/or don't persist shortcut-driven
state).
WORKAROUND (for other users)
Unset the touchpad shortcuts (System Settings → Shortcuts → Touchpad), or
mask the
phantom keycodes via /etc/libinput/local-overrides.quirks:
[Surface Type Cover - mask phantom keys]
MatchName=Microsoft Surface Type Cover
MatchDMIModalias=dmi:*pnSurfaceGo3*
AttrEventCode=-KEY_ZENKAKUHANKAKU;-KEY_F21;-EV_KEY:0xf0
(Both stop the touchpad from being disabled; requires a KWin restart to
load.)
--
You are receiving this mail because:
You are watching all bug changes.