mirror of
https://github.com/DeeJanuz/frametop.git
synced 2026-10-06 01:00:06 +02:00
Input relay: retry a new device until udev gives it to the input group
A new /dev/input node is root:root 0600 until udev applies GROUP=input. The scan probed each new node once and marked it seen even when the open failed, so a node caught in that gap was never opened. Behind a KVM, a switch brings back a hub of devices at once: on the Frame, four nodes failed with EACCES in one switch, the keyboard was never grabbed, and its keys went to gamescope instead of the desktop screens. A node that isn't readable yet now waits for the next scan.
This commit is contained in:
1 parent
ee2ce1a8d2
commit
12f2e844d5
1 file changed
+5
@@ -1139,6 +1139,11 @@ def main():
|
||||
# New here: a new device, or one that came back in the same place.
|
||||
for old in [n for n in nodes.values() if n.path == path]:
|
||||
drop(old, "replaced by a new device node")
|
||||
# A new node is root's alone until udev gives it to the input group, a moment
|
||||
# after it appears. Opened in that gap, it would fail and never be tried
|
||||
# again: leave it for the next scan instead.
|
||||
if not os.access(path, os.R_OK):
|
||||
continue
|
||||
seen[path] = ino
|
||||
node = probe(path)
|
||||
if node and node.volume_keys and not take_volume(node):
|
||||
|
||||
Reference in new issue
Block a user