Skip to content

Stale "hide" udev rules persist across suspend/resume and hide the virtual target device #732

Description

@jorgemmsilva

As discussed in discord, follows the AI diagnostics for "controller not waking up from sleep on LEGO2".

InputPlumber 0.81.0, Legion Go 2 (CachyOS, kernel 7.2.3).
The 50-inputplumber-hide-*-early.rules / 96-...-late.rules files in
/run/udev/rules.d/ match devices by volatile node number
(KERNEL=="hidraw0"). On s2idle resume the physical controller
(17ef:61eb) disconnects and re-enumerates, and the uhid target (28DE:12FB)
is recreated before it, taking a node number that a stale rule still matches.
The rule then applies MODE:="0000" + chmod 000 + setfacl -b to the
target, so Steam (and gamescope) can no longer open the virtual controller.
Fresh rules are written for the new source numbers, but stale ones are never
removed (see file mtimes across a suspend). Suggested fix: match hide rules by
stable device identity (e.g. KERNELS=="0003:17EF:*") and/or remove rules
when their source device vanishes during suspend.

Installing this udev rule has worked for me as a workaround:

sudo tee /etc/udev/rules.d/99-inputplumber-deck-target.rules <<'EOF'
ACTION=="add|change", SUBSYSTEM=="hidraw", KERNELS=="000[356]:28DE:*", \
  TAG+="uaccess", \
  RUN+="/usr/bin/chmod 660 /dev/%k", \
  RUN+="/usr/bin/setfacl -m u:YOUR_USERNAME:rw /dev/%k"
EOF
sudo udevadm control --reload-rules

Addressing this should fix CachyOS/CachyOS-Handheld#124

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions