You are not logged in.

#1 2020-01-03 05:21:44

chnpn
Member
Registered: 2020-01-03
Posts: 4

[SOLVED] USB keyboard not working after boot but works on bios

I'm trying to connect a usb keyboard to my labtop but it's not working after boot (working fine on bios and windows 10 on other pc).
It's detected in `lsusb`,

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 04f2:b649 Chicony Electronics Co., Ltd Chicony USB2.0 Camera
Bus 001 Device 004: ID 8087:0aaa Intel Corp.
Bus 001 Device 005: ID 0853:0132 Topre Corporation TYPE HEAVEN
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Here's what I found after pluging-in the keyboard in `dmesg | tail`

[ 1198.605513] usb 1-1: New USB device found, idVendor=0853, idProduct=0132, bcdDevice= 0.01
[ 1198.605518] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1198.605521] usb 1-1: Product: TYPE HEAVEN
[ 1198.605524] usb 1-1: Manufacturer: Topre Corporation
[ 1198.605792] usb 1-1: no configuration chosen from 0 choices

Is the problem there? my laptop has only usb3.0 slots fyi.   


Any solution, I cannot find any workaround. 
Thanks,

Last edited by chnpn (2020-01-04 04:17:43)

Offline

#2 2020-01-03 08:42:31

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [SOLVED] USB keyboard not working after boot but works on bios

The tail is too short, the lines above would indicate which kernel module (xhci, ehci, uhci) is used which should be pretty relevant here.

Offline

#3 2020-01-03 16:18:51

chnpn
Member
Registered: 2020-01-03
Posts: 4

Re: [SOLVED] USB keyboard not working after boot but works on bios

Here,

[  162.111982] usb 1-1: new full-speed USB device number 4 using xhci_hcd
[  162.293029] usb 1-1: unable to read config index 0 descriptor/start: -32
[  162.293038] usb 1-1: chopping to 0 config(s)
[  162.293952] usb 1-1: New USB device found, idVendor=0853, idProduct=0132, bcdDevice= 0.01
[  162.293956] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  162.293959] usb 1-1: Product: TYPE HEAVEN
[  162.293962] usb 1-1: Manufacturer: Topre Corporation
[  162.294167] usb 1-1: no configuration chosen from 0 choices

Offline

#4 2020-01-03 16:36:10

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED] USB keyboard not working after boot but works on bios

I think I found someone that has the same bug, also with a Topre keyboard but not exactly the same one you have (your product ID is different):

https://qiita.com/la_float/items/fed43d540c8e2201b543

This seems to be a pretty annoying issue as it requires you to patch and build your own kernel to get the keyboard working. You should look into how reporting this problem upstream works so that you don't end up having to build your own kernel forever.

That person with the Realforce keyboard linked to a Ubuntu bug report about a Corsair keyboard that had a similar problem:

https://bugs.launchpad.net/ubuntu/+sour … ug/1678477

Last edited by Ropid (2020-01-03 16:36:35)

Offline

#5 2020-01-03 19:27:11

chnpn
Member
Registered: 2020-01-03
Posts: 4

Re: [SOLVED] USB keyboard not working after boot but works on bios

Ropid wrote:

I think I found someone that has the same bug, also with a Topre keyboard but not exactly the same one you have (your product ID is different):

https://qiita.com/la_float/items/fed43d540c8e2201b543

This seems to be a pretty annoying issue as it requires you to patch and build your own kernel to get the keyboard working. You should look into how reporting this problem upstream works so that you don't end up having to build your own kernel forever.

That person with the Realforce keyboard linked to a Ubuntu bug report about a Corsair keyboard that had a similar problem:

https://bugs.launchpad.net/ubuntu/+sour … ug/1678477

Thanks for replying,

Seems there's no other way to fix this besides custom my own kernel.
I'm quite new to linux, this looks troublesome sad

Last edited by chnpn (2020-01-03 19:27:26)

Offline

#6 2020-01-03 20:02:50

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [SOLVED] USB keyboard not working after boot but works on bios

You can pass usbcore quirks as kernel parameters, see
https://raw.githubusercontent.com/torva … meters.txt

documentation wrote:

usbcore.quirks=
            [USB] A list of quirk entries to augment the built-in usb core quirk list. List entries are separated by commas.
            Each entry has the form VendorID:ProductID:Flags. The IDs are 4-digit hex numbers and Flags is a set of letters. Each letter will change the built-in quirk; setting it if it is clear and clearing it if it is set.
            The letters have the following meanings:
                a = USB_QUIRK_STRING_FETCH_255 (string descriptors must not be fetched using a 255-byte read);
                b = USB_QUIRK_RESET_RESUME (device can't resume correctly so reset it instead);
                c = USB_QUIRK_NO_SET_INTF (device can't handle Set-Interface requests);
                d = USB_QUIRK_CONFIG_INTF_STRINGS (device can't handle its Configuration or Interface strings);
                e = USB_QUIRK_RESET (device can't be reset (e.g morph devices), don't use reset);
                f = USB_QUIRK_HONOR_BNUMINTERFACES (device has more interface descriptions than the bNumInterfaces count, and can't handle talking to these interfaces);
                g = USB_QUIRK_DELAY_INIT (device needs a pause during initialization, after we read the device descriptor);
                h = USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL (For high speed and super speed interrupt endpoints, the USB 2.0 and USB 3.0 spec require the interval in microframes (1 microframe = 125 microseconds) to be calculated as interval = 2 ^ (bInterval-1).
                    Devices with this quirk report their bInterval as the result of this calculation instead of the exponent variable used in the calculation);
                i = USB_QUIRK_DEVICE_QUALIFIER (device can't handle device_qualifier descriptor requests);
                j = USB_QUIRK_IGNORE_REMOTE_WAKEUP (device generates spurious wakeup, ignore remote wakeup capability);
                k = USB_QUIRK_NO_LPM (device can't handle Link Power Management);
                l = USB_QUIRK_LINEAR_FRAME_INTR_BINTERVAL (Device reports its bInterval as linear frames instead of the USB 2.0 calculation);
                m = USB_QUIRK_DISCONNECT_SUSPEND (Device needs to be disconnected before suspend to prevent spurious wakeup);
                n = USB_QUIRK_DELAY_CTRL_MSG (Device needs a pause after every control message);
                o = USB_QUIRK_HUB_SLOW_RESET (Hub needs extra delay after resetting its port);
            Example: quirks=0781:5580:bk,0a5c:5834:gij

Should be

usbcore.quirks=0853:0132:gki

Edit: wrong product ID.
Edit2: quote formatting

Last edited by seth (2020-01-03 20:05:54)

Offline

#7 2020-01-04 04:16:14

chnpn
Member
Registered: 2020-01-03
Posts: 4

Re: [SOLVED] USB keyboard not working after boot but works on bios

seth wrote:

You can pass usbcore quirks as kernel parameters, see
https://raw.githubusercontent.com/torva … meters.txt

documentation wrote:

usbcore.quirks=
            [USB] A list of quirk entries to augment the built-in usb core quirk list. List entries are separated by commas.
            Each entry has the form VendorID:ProductID:Flags. The IDs are 4-digit hex numbers and Flags is a set of letters. Each letter will change the built-in quirk; setting it if it is clear and clearing it if it is set.
            The letters have the following meanings:
                a = USB_QUIRK_STRING_FETCH_255 (string descriptors must not be fetched using a 255-byte read);
                b = USB_QUIRK_RESET_RESUME (device can't resume correctly so reset it instead);
                c = USB_QUIRK_NO_SET_INTF (device can't handle Set-Interface requests);
                d = USB_QUIRK_CONFIG_INTF_STRINGS (device can't handle its Configuration or Interface strings);
                e = USB_QUIRK_RESET (device can't be reset (e.g morph devices), don't use reset);
                f = USB_QUIRK_HONOR_BNUMINTERFACES (device has more interface descriptions than the bNumInterfaces count, and can't handle talking to these interfaces);
                g = USB_QUIRK_DELAY_INIT (device needs a pause during initialization, after we read the device descriptor);
                h = USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL (For high speed and super speed interrupt endpoints, the USB 2.0 and USB 3.0 spec require the interval in microframes (1 microframe = 125 microseconds) to be calculated as interval = 2 ^ (bInterval-1).
                    Devices with this quirk report their bInterval as the result of this calculation instead of the exponent variable used in the calculation);
                i = USB_QUIRK_DEVICE_QUALIFIER (device can't handle device_qualifier descriptor requests);
                j = USB_QUIRK_IGNORE_REMOTE_WAKEUP (device generates spurious wakeup, ignore remote wakeup capability);
                k = USB_QUIRK_NO_LPM (device can't handle Link Power Management);
                l = USB_QUIRK_LINEAR_FRAME_INTR_BINTERVAL (Device reports its bInterval as linear frames instead of the USB 2.0 calculation);
                m = USB_QUIRK_DISCONNECT_SUSPEND (Device needs to be disconnected before suspend to prevent spurious wakeup);
                n = USB_QUIRK_DELAY_CTRL_MSG (Device needs a pause after every control message);
                o = USB_QUIRK_HUB_SLOW_RESET (Hub needs extra delay after resetting its port);
            Example: quirks=0781:5580:bk,0a5c:5834:gij

Should be

usbcore.quirks=0853:0132:gki

Edit: wrong product ID.
Edit2: quote formatting

I added the parameter to my loader config file and it works!
ref. where to put the parameter for anyone who has the same problem.
https://wiki.archlinux.org/index.php/Kernel_parameters

Have a great day big_smile

Offline

Board footer

Powered by FluxBB