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

KMonads crashes frequently #177

Closed
MaxGyver83 opened this issue Jan 28, 2021 · 5 comments
Closed

KMonads crashes frequently #177

MaxGyver83 opened this issue Jan 28, 2021 · 5 comments

Comments

@MaxGyver83
Copy link
Contributor

Recently, KMonad crashes very often but only for one external (USB) keyboard. That's why I'm running KMonad in an endless loop now.
Today I had 278 crashes in 9.5 hours. In most cases, I get these two error messages (for 2 subsequent restarts):

kmonad: /dev/input/by-id/usb-SONiX_USB_DEVICE-event-kbd: openFd: does not exist (No such file or directory)
kmonad: Could not perform IOCTL release on: /dev/input/by-id/usb-SONiX_USB_DEVICE-event-kbd

This might be a hardware problem, as these crashes don't happen with my other keyboard. Do you have an idea what could be the reason? Maybe the keyboard gets disconnected (although it's connected via a USB cable)?

@slotThe
Copy link
Member

slotThe commented Jan 28, 2021 via email

@MaxGyver83
Copy link
Contributor Author

OK, then it's not caused by KMonad. This is the corresponding part in my syslog, btw:

Jan 28 21:55:39 kernel: [48518.879974] usb 3-1.1-port4: disabled by hub (EMI?), re-enabling...
Jan 28 21:55:39 kernel: [48518.880131] usb 3-1.1.4: USB disconnect, device number 19
Jan 28 21:55:39 acpid: input device has been disconnected, fd 7
Jan 28 21:55:39 upowerd[3328]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:1d.6/0000:06:00.0/0000:07:02.0/0000:3e:00.0/usb3/3-1/3-1.1/3-1.1.4/3-1.1.4:1.0/0003:05AC:024F.0109
Jan 28 21:55:39 upowerd[3328]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:1d.6/0000:06:00.0/0000:07:02.0/0000:3e:00.0/usb3/3-1/3-1.1/3-1.1.4/3-1.1.4:1.0
Jan 28 21:55:39 acpid: input device has been disconnected, fd 27
Jan 28 21:55:39 acpid: input device has been disconnected, fd 8
Jan 28 21:55:39 upowerd[3328]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:1d.6/0000:06:00.0/0000:07:02.0/0000:3e:00.0/usb3/3-1/3-1.1/3-1.1.4/3-1.1.4:1.1/0003:05AC:024F.010A
Jan 28 21:55:39 upowerd[3328]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:1d.6/0000:06:00.0/0000:07:02.0/0000:3e:00.0/usb3/3-1/3-1.1/3-1.1.4/3-1.1.4:1.1
Jan 28 21:55:39 upowerd[3328]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:1d.6/0000:06:00.0/0000:07:02.0/0000:3e:00.0/usb3/3-1/3-1.1/3-1.1.4
Jan 28 21:55:39 kernel: [48519.280240] input: KMonad output as /devices/virtual/input/input588
Jan 28 21:55:39 acpid: input device has been disconnected, fd 7
Jan 28 21:55:40 kernel: [48519.364643] usb 3-1.1.4: new full-speed USB device number 20 using xhci_hcd
Jan 28 21:55:40 kernel: [48519.490046] usb 3-1.1.4: New USB device found, idVendor=05ac, idProduct=024f
Jan 28 21:55:40 kernel: [48519.490049] usb 3-1.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jan 28 21:55:40 kernel: [48519.490051] usb 3-1.1.4: Product: USB DEVICE
Jan 28 21:55:40 kernel: [48519.490053] usb 3-1.1.4: Manufacturer: SONiX
Jan 28 21:55:40 kernel: [48519.493143] input: SONiX USB DEVICE as /devices/pci0000:00/0000:00:1d.6/0000:06:00.0/0000:07:02.0/0000:3e:00.0/usb3/3-1/3-1.1/3-1.1.4/3-1.1.4:1.0/0003:05AC:024F.010B/input/input589
Jan 28 21:55:40 kernel: [48519.553276] apple 0003:05AC:024F.010B: input,hidraw4: USB HID v1.11 Keyboard [SONiX USB DEVICE] on usb-0000:3e:00.0-1.1.4/input0
Jan 28 21:55:40 kernel: [48519.554146] apple 0003:05AC:024F.010C: Fn key not found (Apple Wireless Keyboard clone?), disabling Fn key handling
Jan 28 21:55:40 kernel: [48519.554187] input: SONiX USB DEVICE as /devices/pci0000:00/0000:00:1d.6/0000:06:00.0/0000:07:02.0/0000:3e:00.0/usb3/3-1/3-1.1/3-1.1.4/3-1.1.4:1.1/0003:05AC:024F.010C/input/input590
Jan 28 21:55:40 kernel: [48519.612869] apple 0003:05AC:024F.010C: input,hidraw5: USB HID v1.11 Keyboard [SONiX USB DEVICE] on usb-0000:3e:00.0-1.1.4/input1
Jan 28 21:55:40 mtp-probe: checking bus 3, device 20: "/sys/devices/pci0000:00/0000:00:1d.6/0000:06:00.0/0000:07:02.0/0000:3e:00.0/usb3/3-1/3-1.1/3-1.1.4"
Jan 28 21:55:40 mtp-probe: bus: 3, device: 20 was not an MTP device
Jan 28 21:55:40 upowerd[3328]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1d.6/0000:06:00.0/0000:07:02.0/0000:3e:00.0/usb3/3-1/3-1.1/3-1.1.4/3-1.1.4:1.0/0003:05AC:024F.010B
Jan 28 21:55:40 upowerd[3328]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1d.6/0000:06:00.0/0000:07:02.0/0000:3e:00.0/usb3/3-1/3-1.1/3-1.1.4/3-1.1.4:1.0
Jan 28 21:55:40 upowerd[3328]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1d.6/0000:06:00.0/0000:07:02.0/0000:3e:00.0/usb3/3-1/3-1.1/3-1.1.4/3-1.1.4:1.1/0003:05AC:024F.010C
Jan 28 21:55:40 upowerd[3328]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1d.6/0000:06:00.0/0000:07:02.0/0000:3e:00.0/usb3/3-1/3-1.1/3-1.1.4/3-1.1.4:1.1
Jan 28 21:55:40 upowerd[3328]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1d.6/0000:06:00.0/0000:07:02.0/0000:3e:00.0/usb3/3-1/3-1.1/3-1.1.4
Jan 28 21:55:40 kernel: [48519.694742] input: KMonad output as /devices/virtual/input/input591

Maybe some power saving function!? Nevermind, I'm closing this.

@bard
Copy link
Contributor

bard commented Jan 28, 2021

@MaxGyver83 FYI there's a systemd unit at https://github.com/david-janssen/kmonad/blob/master/startup/kmonad.service that will restart on exit. It won't solve the problem but at least it would save the trouble of managing a loop in a shell.

@MaxGyver83
Copy link
Contributor Author

OK, meanwhile I found the root cause. I googled the first line of the syslog posted above: EMI stands for Electromagnetic interference and there are interesting stories about what could cause a USB hub to be disabled, like turning off an exhaust fan in the adjacent bath room. After reading this, I recognized a pattern. The USB port disconnects (and KMonad crashes) every time I lean towards the screen (only!) while standing up from my office chair. I would never have thought about that. I guess I need better isolated cables...

@bard : Thanks for you comment. I hope that I don't need this after changing the USB cable.

@david-janssen
Copy link
Collaborator

Just popping into the old issue to say: haha! Posture-induced bug, great fun :-)

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

4 participants