Bug 224592 - usb: Corsair K65 Gaming Keyboard will not function on boot
Summary: usb: Corsair K65 Gaming Keyboard will not function on boot
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: 11.1-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Hans Petter Selasky
URL:
Keywords: needs-patch
: 242531 244511 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-12-26 02:46 UTC by Colin Lord
Modified: 2020-04-02 07:43 UTC (History)
3 users (show)

See Also:


Attachments
Patch to try (21.42 KB, patch)
2020-02-13 14:55 UTC, Hans Petter Selasky
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Colin Lord 2017-12-26 02:46:58 UTC
I have a Corsair K65 keyboard which does not function without adding a USB quirk similar to that of the K70 or K60, such as bug #193279. I have resolved the problem on my system by adding this line to my loader.conf:

hw.usb.quirk.0="0x1b1c 0x1b07 0 0xffff UQ_KBD_BOOTPROTO"
Comment 1 Hans Petter Selasky freebsd_committer 2020-02-13 14:55:45 UTC
Created attachment 211615 [details]
Patch to try

cd /usr/src
cat ukbd.diff | patch
make buildkernel
make installkernel
Comment 2 commit-hook freebsd_committer 2020-02-13 16:03:18 UTC
A commit references this bug:

Author: hselasky
Date: Thu Feb 13 16:03:12 UTC 2020
New revision: 357861
URL: https://svnweb.freebsd.org/changeset/base/357861

Log:
  Improve USB gaming keyboard support.

  Add support for decoding pressed keys as a bitmap. The keys in the
  bitmap are described in the interface specific HID descriptor. Some
  keyboards even have multiple input interfaces, only using the bitmap
  method when the event array is full. That typically means when more
  than seven keys are pressed simultaneously.

  The internals of the USB keyboard driver have been slightly reworked
  to keep track of all keys in a single bitmap having 256 bits. This
  bitmap is then divided into blocks of 64-bits as an optimisation.

  Simplify automatic key repeat logic, because only the last key pressed
  can be repeated.

  PR:	224592
  PR:	233884
  Tested by:	Alex V. Petrov <alexvpetrov@gmail.com>
  MFC after:	1 week
  Sponsored by:	Mellanox Technologies

Changes:
  head/sys/dev/usb/input/ukbd.c
Comment 3 Hans Petter Selasky freebsd_committer 2020-02-13 17:08:21 UTC
*** Bug 242531 has been marked as a duplicate of this bug. ***
Comment 4 commit-hook freebsd_committer 2020-02-21 08:31:19 UTC
A commit references this bug:

Author: hselasky
Date: Fri Feb 21 08:30:34 UTC 2020
New revision: 358211
URL: https://svnweb.freebsd.org/changeset/base/358211

Log:
  MFC r357861 and r357898:
  Improve USB gaming keyboard support.

  Add support for decoding pressed keys as a bitmap. The keys in the
  bitmap are described in the interface specific HID descriptor. Some
  keyboards even have multiple input interfaces, only using the bitmap
  method when the event array is full. That typically means when more
  than seven keys are pressed simultaneously.

  The internals of the USB keyboard driver have been slightly reworked
  to keep track of all keys in a single bitmap having 256 bits. This
  bitmap is then divided into blocks of 64-bits as an optimisation.

  Simplify automatic key repeat logic, because only the last key pressed
  can be repeated.

  PR:	224592
  PR:	233884
  Tested by:	Alex V. Petrov <alexvpetrov@gmail.com>
  Sponsored by:	Mellanox Technologies

Changes:
_U  stable/12/
  stable/12/sys/dev/usb/input/ukbd.c
Comment 5 commit-hook freebsd_committer 2020-02-21 09:07:24 UTC
A commit references this bug:

Author: hselasky
Date: Fri Feb 21 09:07:01 UTC 2020
New revision: 358216
URL: https://svnweb.freebsd.org/changeset/base/358216

Log:
  MFC r357861 and r357898:
  Improve USB gaming keyboard support.

  Add support for decoding pressed keys as a bitmap. The keys in the
  bitmap are described in the interface specific HID descriptor. Some
  keyboards even have multiple input interfaces, only using the bitmap
  method when the event array is full. That typically means when more
  than seven keys are pressed simultaneously.

  The internals of the USB keyboard driver have been slightly reworked
  to keep track of all keys in a single bitmap having 256 bits. This
  bitmap is then divided into blocks of 64-bits as an optimisation.

  Simplify automatic key repeat logic, because only the last key pressed
  can be repeated.

  PR:	224592
  PR:	233884
  Tested by:	Alex V. Petrov <alexvpetrov@gmail.com>
  Sponsored by:	Mellanox Technologies

Changes:
_U  stable/11/
  stable/11/sys/dev/usb/input/ukbd.c
Comment 6 Hans Petter Selasky freebsd_committer 2020-02-21 09:08:26 UTC
Please re-open if not fixed in 11- and 12-stable.
Comment 7 commit-hook freebsd_committer 2020-02-25 12:57:09 UTC
A commit references this bug:

Author: hselasky
Date: Tue Feb 25 12:56:06 UTC 2020
New revision: 358310
URL: https://svnweb.freebsd.org/changeset/base/358310

Log:
  Use hid_get_data_unsigned() instead of hid_get_data() when reading the
  key-codes from the USB keyboard. Negative key-codes are currently skipped.

  While at it use the bit size value provided by the HID location structure
  instead of assuming a value of 8.

  This fixes a regression issue after r357861.

  Reported by:	Minoru TANABE <kotanabe3@gmail.com>
  PR:	224592
  PR:	233884
  MFC after:	3 days
  Sponsored by:	Mellanox Technologies

Changes:
  head/sys/dev/usb/input/ukbd.c
Comment 8 commit-hook freebsd_committer 2020-02-28 22:00:55 UTC
A commit references this bug:

Author: hselasky
Date: Fri Feb 28 22:00:01 UTC 2020
New revision: 358452
URL: https://svnweb.freebsd.org/changeset/base/358452

Log:
  MFC r358310:
  Use hid_get_data_unsigned() instead of hid_get_data() when reading the
  key-codes from the USB keyboard. Negative key-codes are currently skipped.

  While at it use the bit size value provided by the HID location structure
  instead of assuming a value of 8.

  This fixes a regression issue after r357861.

  Reported by:	Minoru TANABE <kotanabe3@gmail.com>
  PR:	224592
  PR:	233884
  Sponsored by:	Mellanox Technologies

Changes:
_U  stable/12/
  stable/12/sys/dev/usb/input/ukbd.c
Comment 9 commit-hook freebsd_committer 2020-02-28 22:00:58 UTC
A commit references this bug:

Author: hselasky
Date: Fri Feb 28 22:00:50 UTC 2020
New revision: 358453
URL: https://svnweb.freebsd.org/changeset/base/358453

Log:
  MFC r358310:
  Use hid_get_data_unsigned() instead of hid_get_data() when reading the
  key-codes from the USB keyboard. Negative key-codes are currently skipped.

  While at it use the bit size value provided by the HID location structure
  instead of assuming a value of 8.

  This fixes a regression issue after r357861.

  Reported by:	Minoru TANABE <kotanabe3@gmail.com>
  PR:	224592
  PR:	233884
  Sponsored by:	Mellanox Technologies

Changes:
_U  stable/11/
  stable/11/sys/dev/usb/input/ukbd.c
Comment 10 Hans Petter Selasky freebsd_committer 2020-02-29 09:35:35 UTC
*** Bug 244511 has been marked as a duplicate of this bug. ***
Comment 11 commit-hook freebsd_committer 2020-03-04 09:47:07 UTC
A commit references this bug:

Author: hselasky
Date: Wed Mar  4 09:46:43 UTC 2020
New revision: 358609
URL: https://svnweb.freebsd.org/changeset/base/358609

Log:
  Restart the USB keyboard repeat timer at every valid key-press.

  This fixes a regression issue after r357861.

  Reported by:	James Wright <james.wright@jigsawdezign.com>
  PR:	224592
  PR:	233884
  MFC after:	3 days
  Sponsored by:	Mellanox Technologies

Changes:
  head/sys/dev/usb/input/ukbd.c
Comment 12 commit-hook freebsd_committer 2020-03-06 12:02:58 UTC
A commit references this bug:

Author: hselasky
Date: Fri Mar  6 12:01:58 UTC 2020
New revision: 358696
URL: https://svnweb.freebsd.org/changeset/base/358696

Log:
  MFC r358609:
  Restart the USB keyboard repeat timer at every valid key-press.

  This fixes a regression issue after r357861.

  Reported by:	James Wright <james.wright@jigsawdezign.com>
  PR:	224592
  PR:	233884
  Sponsored by:	Mellanox Technologies

Changes:
_U  stable/12/
  stable/12/sys/dev/usb/input/ukbd.c
Comment 13 commit-hook freebsd_committer 2020-03-06 12:03:02 UTC
A commit references this bug:

Author: hselasky
Date: Fri Mar  6 12:02:43 UTC 2020
New revision: 358697
URL: https://svnweb.freebsd.org/changeset/base/358697

Log:
  MFC r358609:
  Restart the USB keyboard repeat timer at every valid key-press.

  This fixes a regression issue after r357861.

  Reported by:	James Wright <james.wright@jigsawdezign.com>
  PR:	224592
  PR:	233884
  Sponsored by:	Mellanox Technologies

Changes:
_U  stable/11/
  stable/11/sys/dev/usb/input/ukbd.c
Comment 14 commit-hook freebsd_committer 2020-03-30 15:30:46 UTC
A commit references this bug:

Author: hselasky
Date: Mon Mar 30 15:29:39 UTC 2020
New revision: 359439
URL: https://svnweb.freebsd.org/changeset/base/359439

Log:
  Evaluate modifier keys before the regular keys, so that if a modifier
  key is pressed at the same time as a regular key, that means key with
  modifier is output. Some automated USB keyboards like Yubikeys need this.

  This fixes a regression issue after r357861.

  Reported by:	Adam McDougall <mcdouga9@egr.msu.edu>
  PR:		224592
  PR:		233884
  MFC after:	3 days
  Sponsored by:	Mellanox Technologies

Changes:
  head/sys/dev/usb/input/ukbd.c
Comment 15 commit-hook freebsd_committer 2020-04-02 07:41:48 UTC
A commit references this bug:

Author: hselasky
Date: Thu Apr  2 07:40:57 UTC 2020
New revision: 359558
URL: https://svnweb.freebsd.org/changeset/base/359558

Log:
  MFC r359439:
  Evaluate modifier keys before the regular keys, so that if a modifier
  key is pressed at the same time as a regular key, that means key with
  modifier is output. Some automated USB keyboards like Yubikeys need this.

  This fixes a regression issue after r357861.

  Reported by:	Adam McDougall <mcdouga9@egr.msu.edu>
  PR:		224592
  PR:		233884
  Sponsored by:	Mellanox Technologies

Changes:
_U  stable/12/
  stable/12/sys/dev/usb/input/ukbd.c
Comment 16 commit-hook freebsd_committer 2020-04-02 07:43:53 UTC
A commit references this bug:

Author: hselasky
Date: Thu Apr  2 07:42:29 UTC 2020
New revision: 359559
URL: https://svnweb.freebsd.org/changeset/base/359559

Log:
  MFC r359439:
  Evaluate modifier keys before the regular keys, so that if a modifier
  key is pressed at the same time as a regular key, that means key with
  modifier is output. Some automated USB keyboards like Yubikeys need this.

  This fixes a regression issue after r357861.

  Reported by:	Adam McDougall <mcdouga9@egr.msu.edu>
  PR:		224592
  PR:		233884
  Sponsored by:	Mellanox Technologies

Changes:
_U  stable/11/
  stable/11/sys/dev/usb/input/ukbd.c