NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.39k stars 13.61k forks source link

Rebuilding with ckb-next enabled breaks keyboard input #64032

Open joepie91 opened 5 years ago

joepie91 commented 5 years ago

Issue description

Since setting up the ckb-next daemon, my keyboard will frequently stop working after a nixos-rebuild, to the point that even CTRL+ALT+F1 will not do anything.

Logging out and logging in again fixes the issue.

Some excerpts from the journalctl:

Jul 01 17:34:07 desktop-home systemd[1]: Stopping Corsair Keyboards and Mice Daemon...
Jul 01 17:34:07 desktop-home ckb-next-daemon[13013]: [I] Caught signal 15
[...]
Jul 01 17:34:07 desktop-home ckb-next-daemon[13013]: [W] usbunclaim (usb_linux.c:424): Your Corsair Gaming K70 RGB RAPIDFIRE Keyboard is being uncleanly removed to speed up shutdown times.
Jul 01 17:34:07 desktop-home ckb-next-daemon[13013]: [W] usbunclaim (usb_linux.c:425): If you still need the device, you will have to restart ckb-next-daemon.
Jul 01 17:34:07 desktop-home kernel: usb 3-1.1: usbfs: process 13149 (ckb-next-daemon) did not claim interface 0 before use
Jul 01 17:34:07 desktop-home ckb-next-daemon[13013]: [I] Removed device path /dev/input/ckb1
Jul 01 17:34:07 desktop-home ckb-next-daemon[13013]: [I] Closing root controller
Jul 01 17:34:07 desktop-home ckb-next-daemon[13013]: [I] Removed device path /dev/input/ckb0
Jul 01 17:34:07 desktop-home systemd[1]: Stopped Corsair Keyboards and Mice Daemon.
Jul 01 17:34:07 desktop-home systemd[1]: ckb-next.service: Consumed 15min 58.238s CPU time
[...]
Jul 01 17:34:14 desktop-home systemd[1]: Started Corsair Keyboards and Mice Daemon.
[...]
Jul 01 17:34:14 desktop-home ckb-next-daemon[14014]:     ckb-next: Corsair RGB driver 0.3.2
Jul 01 17:34:14 desktop-home ckb-next-daemon[14014]: [I] Root controller ready at /dev/input/ckb0
[...]
Jul 01 17:34:14 desktop-home ckb-next-daemon[14014]: [I] Connecting Corsair Gaming K70 RGB RAPIDFIRE Keyboard at /dev/input/ckb1
Jul 01 17:34:14 desktop-home kernel: input: ckb1: Corsair Gaming K70 RGB RAPIDFIRE Keyboard vKB as /devices/virtual/input/input52
Jul 01 17:34:14 desktop-home kernel: input: ckb1: Corsair Gaming K70 RGB RAPIDFIRE Keyboard vM as /devices/virtual/input/input53
Jul 01 17:34:14 desktop-home ckb-next-daemon[14014]: [I] Starting input thread for /dev/input/ckb1
[...]
Jul 01 17:34:14 desktop-home ckb-next-daemon[14014]: [I] Received identification packet: 0e 01 00 00 01 01 00 01 08 03 14 00 1c 1b 38 1b 01 01 01 06 c0 ff 40 00 03 00 00 00 02 04 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >
[...]
Jul 01 17:34:15 desktop-home kernel: synth uevent: /devices/virtual/input/input52: failed to send uevent
Jul 01 17:34:15 desktop-home kernel: input input52: uevent: failed to send synthetic uevent
Jul 01 17:34:15 desktop-home kernel: synth uevent: /devices/virtual/input/input53: failed to send uevent
Jul 01 17:34:15 desktop-home kernel: input input53: uevent: failed to send synthetic uevent
[...]
Jul 01 17:34:15 desktop-home org.kde.kiod5[25837]: kf5.kiod.kmtpd: New device attached with udi= "/org/kde/solid/udev/sys/devices/virtual/input/input52/event14" . Checking if PortableMediaPlayer...
[...]
Jul 01 17:34:15 desktop-home systemd-logind[874]: Watching system buttons on /dev/input/event14 (ckb1: Corsair Gaming K70 RGB RAPIDFIRE Keyboard vKB)
[...]
Jul 01 17:34:15 desktop-home org.kde.kiod5[25837]: kf5.kiod.kmtpd: New device attached with udi= "/org/kde/solid/udev/sys/devices/virtual/input/input53/mouse2" . Checking if PortableMediaPlayer...
[...]
Jul 01 17:34:15 desktop-home org.kde.kiod5[25837]: kf5.kiod.kmtpd: New device attached with udi= "/org/kde/solid/udev/sys/devices/virtual/input/input53/event15" . Checking if PortableMediaPlayer...
[...]
Jul 01 17:34:15 desktop-home systemd-logind[874]: Watching system buttons on /dev/input/event15 (ckb1: Corsair Gaming K70 RGB RAPIDFIRE Keyboard vM)
[...]
Jul 01 17:34:16 desktop-home systemd-logind[874]: Watching system buttons on /dev/input/event14 (ckb1: Corsair Gaming K70 RGB RAPIDFIRE Keyboard vKB)
[...]
Jul 01 17:34:16 desktop-home systemd-logind[874]: Watching system buttons on /dev/input/event15 (ckb1: Corsair Gaming K70 RGB RAPIDFIRE Keyboard vM)
[...]
Jul 01 17:34:16 desktop-home org.kde.kiod5[25837]: kf5.kiod.kmtpd: New device attached with udi= "/org/kde/solid/udev/sys/devices/virtual/input/input52/event14" . Checking if PortableMediaPlayer...
Jul 01 17:34:16 desktop-home org.kde.kiod5[25837]: kf5.kiod.kmtpd: New device attached with udi= "/org/kde/solid/udev/sys/devices/virtual/input/input53/mouse2" . Checking if PortableMediaPlayer...
Jul 01 17:34:16 desktop-home org.kde.kiod5[25837]: kf5.kiod.kmtpd: New device attached with udi= "/org/kde/solid/udev/sys/devices/virtual/input/input53/event15" . Checking if PortableMediaPlayer...
[...]
Jul 01 17:34:16 desktop-home ckb-next-daemon[14014]: [I] Setup finished for /dev/input/ckb1

Steps to reproduce

  1. Set hardware.ckb-next.enable = true;
  2. nixos-rebuild (does not always work, maybe only when the ckb-next package gets updated and/or restarted?)
  3. Try to press keys

Technical details

Keyboard: Corsair K70 RGB RAPIDFIRE

gloaming commented 5 years ago

You might want to try https://github.com/ckb-next/ckb-next/commit/5194fd6d1cc69271e30ddc4d5f43b0cdeae67510

kierdavis commented 5 years ago

I experience this too, I think, although I rarely observe it since I only ever nixos-rebuild boot my machine that has Corsair hardware (for other reasons than this). I'm try to investigate this more in the next month or so.

stale[bot] commented 4 years ago

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.