Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep KMonad running when using KVM + USB switch (device no longer exists on switching)? #773

Open
Cobertos opened this issue Nov 29, 2023 · 0 comments

Comments

@Cobertos
Copy link

Cobertos commented Nov 29, 2023

I use a KVM switch with my PCs, and when I switch, all USB devices plugged in stop existing. This causes Kmonad to crash. I restart kmonad every time I switch PCs to handle this.

Is there any way to let kmonad not crash when a device stops existing? Is there any way to keep the device around outside of kmonad to prevent it from crashing? Do other people use kmonad and KVM switches?

Example log output when I switch away from the PC with kmonad on it to another PC

Repro steps:

  • I started kmonad
  • I clicked "NumLock" a few times to make sure it was working before I switched PCs
  • I switched from source 1 to 2 on my KVM to repro
cobertos@bepis:~$ kmonad $cobconf/kmonad.kbd -l debug
Opening KeySink
Registering Uinput device
Opening KeySource
Initiating ioctl grab
Launching process: emitter_proc

--------------------------------------------------------------------------------
Received event: Press <nlck>
Running hooks

--------------------------------------------------------------------------------
Received event: Release <nlck>
Running hooks

--------------------------------------------------------------------------------
Received event: Press <nlck>
Running hooks

--------------------------------------------------------------------------------
Received event: Release <nlck>
Running hooks
Encountered error in KeySource: <file descriptor: 40>: hGetBuf: unsupported operation (No such device)
Closing process: emitter_proc
Closing KeySource
Releasing ioctl grab
Closing KeySink
Unregistering Uinput device
Closing Uinput device file
kmonad: Could not perform IOCTL release on: /dev/input/by-id/usb-04d9_1203-event-kbd

Workaround?

Possibly, #177 (comment)

@Cobertos Cobertos changed the title Keep KMonad running when using KVM + USB switch? Keep KMonad running when using KVM + USB switch (device no longer exists on switching)? Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant