Bug 209674 - USB keyboard's keys become sticky
Summary: USB keyboard's keys become sticky
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: 10.2-RELEASE
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-usb (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-05-20 21:15 UTC by bourne.identity@hotmail.com
Modified: 2019-07-08 12:53 UTC (History)
4 users (show)

See Also:


Attachments
Possible fix (489 bytes, patch)
2016-07-08 16:28 UTC, Hans Petter Selasky
no flags Details | Diff
usbdump captured while keys are sticky (36.78 KB, application/octet-stream)
2019-07-07 18:47 UTC, adamskelton
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description bourne.identity@hotmail.com 2016-05-20 21:15:15 UTC
I would like to report a possible bug on my amd64 system running FreeBSD 10.2, which at least one gentleman also suffers from on his 10.3 system. While typing with the X server running, keys of my keyboard become 'sticky': pressing 'A' once results in multiple (dozens, sometimes hundreds) of 'A'. This nuisance - which happens about once in 5 minutes of typing - usually stops by itself and the key gets 'unstuck' automatically after a couple of seconds. This happens only under FreeBSD (not Linux, not Windows) and only under the X server (not when typing on the console when there is no X).
Comment 1 Hans Petter Selasky freebsd_committer freebsd_triage 2016-05-21 08:32:27 UTC
Hi,

Can you give some more information:

usbconfig

pciconf -lv

dmesg | grep ukbd

Capture USB traffic while problem occurs:

usbdump -i usbusX -f Y -s 65536 -vvv

X and Y are numbers after ugenX.Y for the keyboard device.

--HPS
Comment 2 bourne.identity@hotmail.com 2016-05-22 13:19:45 UTC
It's impossible to capture usbdump packets while the keyboard is stuck. The anomaly lasts just 1-2 secs during which I can't summon a terminal and run the command.

usbconfig <<
ugen0.1: <OHCI root HUB ATI> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen6.1: <OHCI root HUB ATI> at usbus6, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen5.1: <EHCI root HUB ATI> at usbus5, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen4.1: <OHCI root HUB ATI> at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen3.1: <OHCI root HUB ATI> at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen2.1: <EHCI root HUB ATI> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.1: <OHCI root HUB ATI> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen2.2: <USB 2.0 Hub vendor 0x1a40> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (100mA)
ugen2.3: <Back-UPS ES 700Y-IN FW895.m3.I USB FWm1 American Power Conversion> at usbus2, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (2mA)
ugen2.4: <USB Keyboard Logitech> at usbus2, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (90mA)
ugen2.5: <USB Optical Mouse Logitech> at usbus2, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA)
ugen2.6: <MG2400 series Canon> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (2mA)
<<

pciconf -lv <<
hostb0@pci0:0:0:0:    class=0x060000 card=0x83881043 chip=0x96001022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD]'
    device     = 'RS780 Host Bridge'
    class      = bridge
    subclass   = HOST-PCI
pcib1@pci0:0:1:0:    class=0x060400 card=0x83881043 chip=0x96021043 rev=0x00 hdr=0x01
    vendor     = 'ASUSTeK Computer Inc.'
    device     = 'RS880 PCI to PCI bridge (int gfx)'
    class      = bridge
    subclass   = PCI-PCI
pcib2@pci0:0:4:0:    class=0x060400 card=0x83881043 chip=0x96041022 rev=0x00 hdr=0x01
    vendor     = 'Advanced Micro Devices [AMD]'
    device     = 'RS780/RS880 PCI to PCI bridge (PCIE port 0)'
    class      = bridge
    subclass   = PCI-PCI
ahci0@pci0:0:17:0:    class=0x01018f card=0x83891043 chip=0x43901002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SB7x0/SB8x0/SB9x0 SATA Controller [IDE mode]'
    class      = mass storage
    subclass   = ATA
ohci0@pci0:0:18:0:    class=0x0c0310 card=0x83891043 chip=0x43971002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SB7x0/SB8x0/SB9x0 USB OHCI0 Controller'
    class      = serial bus
    subclass   = USB
ohci1@pci0:0:18:1:    class=0x0c0310 card=0x83891043 chip=0x43981002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SB7x0 USB OHCI1 Controller'
    class      = serial bus
    subclass   = USB
ehci0@pci0:0:18:2:    class=0x0c0320 card=0x83891043 chip=0x43961002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SB7x0/SB8x0/SB9x0 USB EHCI Controller'
    class      = serial bus
    subclass   = USB
ohci2@pci0:0:19:0:    class=0x0c0310 card=0x83891043 chip=0x43971002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SB7x0/SB8x0/SB9x0 USB OHCI0 Controller'
    class      = serial bus
    subclass   = USB
ohci3@pci0:0:19:1:    class=0x0c0310 card=0x83891043 chip=0x43981002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SB7x0 USB OHCI1 Controller'
    class      = serial bus
    subclass   = USB
ehci1@pci0:0:19:2:    class=0x0c0320 card=0x83891043 chip=0x43961002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SB7x0/SB8x0/SB9x0 USB EHCI Controller'
    class      = serial bus
    subclass   = USB
none0@pci0:0:20:0:    class=0x0c0500 card=0x83891043 chip=0x43851002 rev=0x3c hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SBx00 SMBus Controller'
    class      = serial bus
    subclass   = SMBus
atapci0@pci0:0:20:1:    class=0x01018a card=0x83891043 chip=0x439c1002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SB7x0/SB8x0/SB9x0 IDE Controller'
    class      = mass storage
    subclass   = ATA
hdac0@pci0:0:20:2:    class=0x040300 card=0x84451043 chip=0x43831002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SBx00 Azalia (Intel HDA)'
    class      = multimedia
    subclass   = HDA
isab0@pci0:0:20:3:    class=0x060100 card=0x83891043 chip=0x439d1002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SB7x0/SB8x0/SB9x0 LPC host controller'
    class      = bridge
    subclass   = PCI-ISA
pcib3@pci0:0:20:4:    class=0x060401 card=0x00000000 chip=0x43841002 rev=0x00 hdr=0x01
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SBx00 PCI to PCI Bridge'
    class      = bridge
    subclass   = PCI-PCI
ohci4@pci0:0:20:5:    class=0x0c0310 card=0x83891043 chip=0x43991002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'SB7x0/SB8x0/SB9x0 USB OHCI2 Controller'
    class      = serial bus
    subclass   = USB
hostb1@pci0:0:24:0:    class=0x060000 card=0x00000000 chip=0x12001022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD]'
    device     = 'Family 10h Processor HyperTransport Configuration'
    class      = bridge
    subclass   = HOST-PCI
hostb2@pci0:0:24:1:    class=0x060000 card=0x00000000 chip=0x12011022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD]'
    device     = 'Family 10h Processor Address Map'
    class      = bridge
    subclass   = HOST-PCI
hostb3@pci0:0:24:2:    class=0x060000 card=0x00000000 chip=0x12021022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD]'
    device     = 'Family 10h Processor DRAM Controller'
    class      = bridge
    subclass   = HOST-PCI
hostb4@pci0:0:24:3:    class=0x060000 card=0x00000000 chip=0x12031022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD]'
    device     = 'Family 10h Processor Miscellaneous Control'
    class      = bridge
    subclass   = HOST-PCI
hostb5@pci0:0:24:4:    class=0x060000 card=0x00000000 chip=0x12041022 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD]'
    device     = 'Family 10h Processor Link Control'
    class      = bridge
    subclass   = HOST-PCI
vgapci0@pci0:1:5:0:    class=0x030000 card=0x83881043 chip=0x96161002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices [AMD] nee ATI'
    device     = 'RS780L [Radeon HD 3000]'
    class      = display
    subclass   = VGA
re0@pci0:2:0:0:    class=0x020000 card=0x84321043 chip=0x816810ec rev=0x06 hdr=0x00
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL8111/8168B PCI Express Gigabit Ethernet controller'
    class      = network
    subclass   = ethernet
<<

dmesg | grep ukbd <<
ukbd0: <USB Keyboard> on usbus2
kbd2 at ukbd0
ukbd0: at uhub7, port 2, addr 4 (disconnected)
ukbd0: <USB Keyboard> on usbus2
kbd2 at ukbd0
<<

usbdump -i usbus2 -f 4 -s 65536 -vvv:
18:16:18.529952 usbus2.4 DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=8,IVAL=10,ERR=0
 frame[0] READ 8 bytes
 0000  00 00 00 00 00 00 00 00  -- -- -- -- -- -- -- -- |........        |
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xcb021 <OPEN|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
18:16:18.529962 usbus2.4 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=10
 frame[0] READ 8 bytes
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xcb023 <OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
18:16:24.768938 usbus2.4 DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=8,IVAL=10,ERR=0
 frame[0] READ 8 bytes
 0000  00 00 28 00 00 00 00 00  -- -- -- -- -- -- -- -- |..(.....        |
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xeb021 <OPEN|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
18:16:24.768952 usbus2.4 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=10
 frame[0] READ 8 bytes
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xeb023 <OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
18:16:24.856923 usbus2.4 DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=8,IVAL=10,ERR=0
 frame[0] READ 8 bytes
 0000  00 00 00 00 00 00 00 00  -- -- -- -- -- -- -- -- |........        |
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xcb021 <OPEN|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
18:16:24.856935 usbus2.4 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=10
 frame[0] READ 8 bytes
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xcb023 <OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
18:16:27.920407 usbus2.4 DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=8,IVAL=10,ERR=0
 frame[0] READ 8 bytes
 0000  01 00 00 00 00 00 00 00  -- -- -- -- -- -- -- -- |........        |
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xeb021 <OPEN|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
18:16:27.920419 usbus2.4 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=10
 frame[0] READ 8 bytes
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xeb023 <OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
18:16:29.200229 usbus2.4 DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=8,IVAL=10,ERR=0
 frame[0] READ 8 bytes
 0000  01 00 06 00 00 00 00 00  -- -- -- -- -- -- -- -- |........        |
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xcb021 <OPEN|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
18:16:29.200257 usbus2.4 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=10
 frame[0] READ 8 bytes
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xcb023 <OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
18:16:29.296175 usbus2.4 DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=8,IVAL=10,ERR=0
 frame[0] READ 8 bytes
 0000  01 00 00 00 00 00 00 00  -- -- -- -- -- -- -- -- |........        |
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xeb021 <OPEN|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
18:16:29.296187 usbus2.4 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=10
 frame[0] READ 8 bytes
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xeb023 <OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
18:16:29.368146 usbus2.4 DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=8,IVAL=10,ERR=0
 frame[0] READ 8 bytes
 0000  00 00 00 00 00 00 00 00  -- -- -- -- -- -- -- -- |........        |
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xcb021 <OPEN|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
18:16:29.368157 usbus2.4 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=10
 frame[0] READ 8 bytes
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xcb023 <OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
18:16:30.064043 usbus2.4 DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=8,IVAL=10,ERR=0
 frame[0] READ 8 bytes
 0000  00 00 2A 00 00 00 00 00  -- -- -- -- -- -- -- -- |..*.....        |
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xeb021 <OPEN|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
18:16:30.064057 usbus2.4 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=10
 frame[0] READ 8 bytes
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xeb023 <OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
18:16:30.136064 usbus2.4 DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=8,IVAL=10,ERR=0
 frame[0] READ 8 bytes
 0000  00 00 00 00 00 00 00 00  -- -- -- -- -- -- -- -- |........        |
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xcb021 <OPEN|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
18:16:30.136089 usbus2.4 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=10
 frame[0] READ 8 bytes
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xcb023 <OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0>

18 packets captured
242 packets received by filter
0 packets dropped by kernel

Regards

Manish Jain


On 05/21/2016 14:02, bugzilla-noreply@freebsd.org wrote:
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209674
>
> Hans Petter Selasky <hselasky@FreeBSD.org> changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                   CC|                            |hselasky@FreeBSD.org
>
> --- Comment #1 from Hans Petter Selasky <hselasky@FreeBSD.org> ---
> Hi,
>
> Can you give some more information:
>
> usbconfig
>
> pciconf -lv
>
> dmesg | grep ukbd
>
> Capture USB traffic while problem occurs:
>
> usbdump -i usbusX -f Y -s 65536 -vvv
>
> X and Y are numbers after ugenX.Y for the keyboard device.
>
> --HPS
>
Comment 3 bourne.identity@hotmail.com 2016-06-04 20:36:48 UTC
I just discovered that this bug is not restricted to X sessions - it happens on the console too when there is no X. So the bug is within FreeBSD kernel, I guess.
Comment 4 bourne.identity@hotmail.com 2016-07-07 12:40:19 UTC
It so happened that I recently had to purchase a new keyboard (Cooler Master CMStorm) for a feature I needed - LED backlights. The new keyboard is fairly expensive, and unfortunately, the stickiness problem persists with the new keyboard too. It will be nice if I could get an update via email whether a future version of FreeBSD (hopefully 11.0) will address this bug. I would surely like to upgrade to the newer release if this problem can be settled for good. Thanks.
Comment 5 Anthony Jenkins 2016-07-07 19:35:53 UTC
(In reply to bourne.identity@hotmail.com from comment #2)
I think Hans was suggesting you run usbdump /continuously/, piping the output to a file, while waiting for the anomaly to occur.  You can redact the file to remove any USB events up to just before the anomaly occurs, before attaching to this bug.

usbdump -i usbus2 -f 4 -s 65536 -vvv | gzip -c > usbdump.gz

Anthony
Comment 6 bourne.identity@hotmail.com 2016-07-08 15:36:11 UTC
The output (generated by { usbdump -i usbus2 -f 4 -s 65536 -vvv; } >> usbdump.txt) below has an anomaly event that happened around 20:58:25 by my local time. Please let me know by email if this is sufficient for debugging, or you need more information :

20:57:11.141777 usbus2.4 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=10
 frame[0] READ 8 bytes
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xcb023 <OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
20:58:25.657186 usbus2.4 DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=8,IVAL=10,ERR=0
 frame[0] READ 8 bytes
 0000  00 00 26 00 00 00 00 00  -- -- -- -- -- -- -- --  |..&.....        |
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xeb021 <OPEN|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
20:58:25.657198 usbus2.4 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=10
 frame[0] READ 8 bytes
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xeb023 <OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
20:58:25.729162 usbus2.4 DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=8,IVAL=10,ERR=0
 frame[0] READ 8 bytes
 0000  00 00 00 00 00 00 00 00  -- -- -- -- -- -- -- --  |........        |
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xcb021 <OPEN|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
20:58:25.729180 usbus2.4 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=10
 frame[0] READ 8 bytes
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xcb023 <OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
20:58:26.097118 usbus2.4 DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=8,IVAL=10,ERR=0
 frame[0] READ 8 bytes
 0000  00 00 37 00 00 00 00 00  -- -- -- -- -- -- -- --  |..7.....        |
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xeb021 <OPEN|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
20:58:26.097132 usbus2.4 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=10
 frame[0] READ 8 bytes
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xeb023 <OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
20:58:26.187521 usbus2.4 DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=8,IVAL=10,ERR=STALLED
 frame[0] READ 6 bytes
 0000  00 00 00 00 00 00 -- --  -- -- -- -- -- -- -- --  |......          |
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0x8b025 <OPEN|DID_DMA_DELAY|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|DOING_CALLBACK|0>
20:58:26.237624 usbus2.4 SUBM-CTRL-EP=00000000,SPD=LOW,NFR=1,SLEN=8,IVAL=50
 frame[0] WRITE 8 bytes
 0000  02 01 00 00 81 00 00 00  -- -- -- -- -- -- -- --  |........        |
 flags 0 <0>
 status 0x4a1a3 <OPEN|TRANSFERRING|STARTED|CONTROL_XFR|CONTROL_HDR|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|0>
20:58:26.238083 usbus2.4 DONE-CTRL-EP=00000000,SPD=LOW,NFR=1,SLEN=0,IVAL=50,ERR=0
 frame[0] WRITE 8 bytes
 flags 0 <0>
 status 0xea1a1 <OPEN|STARTED|CONTROL_XFR|CONTROL_HDR|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
20:58:26.238086 usbus2.4 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=10
 frame[0] READ 8 bytes
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0x4b023 <OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|0>
20:58:28.096777 usbus2.4 DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=8,IVAL=10,ERR=0
 frame[0] READ 8 bytes
 0000  00 00 2A 00 00 00 00 00  -- -- -- -- -- -- -- --  |..*.....        |
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xeb021 <OPEN|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
20:58:28.096790 usbus2.4 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=10
 frame[0] READ 8 bytes
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xeb023 <OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
20:58:28.256757 usbus2.4 DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=8,IVAL=10,ERR=0
 frame[0] READ 8 bytes
 0000  00 00 00 00 00 00 00 00  -- -- -- -- -- -- -- --  |........        |
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xcb021 <OPEN|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
20:58:28.256769 usbus2.4 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=10
 frame[0] READ 8 bytes
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xcb023 <OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
20:58:35.279562 usbus2.4 DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=8,IVAL=10,ERR=0
 frame[0] READ 8 bytes
 0000  01 00 00 00 00 00 00 00  -- -- -- -- -- -- -- --  |........        |
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xeb021 <OPEN|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
20:58:35.279574 usbus2.4 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=10
 frame[0] READ 8 bytes
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xeb023 <OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
20:58:35.879463 usbus2.4 DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=8,IVAL=10,ERR=0
 frame[0] READ 8 bytes
 0000  01 00 06 00 00 00 00 00  -- -- -- -- -- -- -- --  |........        |
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xcb021 <OPEN|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
20:58:35.879477 usbus2.4 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=10
 frame[0] READ 8 bytes
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xcb023 <OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
20:58:36.015439 usbus2.4 DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=8,IVAL=10,ERR=0
 frame[0] READ 8 bytes
 0000  01 00 00 00 00 00 00 00  -- -- -- -- -- -- -- --  |........        |
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xeb021 <OPEN|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
20:58:36.015453 usbus2.4 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=10
 frame[0] READ 8 bytes
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xeb023 <OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
20:58:36.143417 usbus2.4 DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=8,IVAL=10,ERR=0
 frame[0] READ 8 bytes
 0000  00 00 00 00 00 00 00 00  -- -- -- -- -- -- -- --  |........        |
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xcb021 <OPEN|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
20:58:36.143431 usbus2.4 SUBM-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=0,IVAL=10
 frame[0] READ 8 bytes
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xcb023 <OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CAN_CANCEL_IMMED|DOING_CALLBACK|0>

1832 packets captured
22013 packets received by filter
0 packets dropped by kernel
Comment 7 Hans Petter Selasky freebsd_committer freebsd_triage 2016-07-08 16:24:33 UTC
Hi,

The ERR=STALLED indicates a USB error. We expect 8-bytes, while the device only send 6, and in addition STALLED. Is the device connected directly to the USB port or through some kind of USB HUB? Can you try both ways and see if it helps?

--HPS

<OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|BDMA_ENABLE|BDMA_SETUP|CURR_DMA_SET|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
20:58:26.187521 usbus2.4 DONE-INTR-EP=00000081,SPD=LOW,NFR=1,SLEN=8,IVAL=10,ERR=STALLED
 frame[0] READ 6 bytes
 0000  00 00 00 00 00 00 -- --  -- -- -- -- -- -- -- --  |......          |
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0x8b025
Comment 8 Hans Petter Selasky freebsd_committer freebsd_triage 2016-07-08 16:28:41 UTC
Created attachment 172246 [details]
Possible fix
Comment 9 adamskelton 2019-07-07 18:47:13 UTC
Created attachment 205569 [details]
usbdump captured while keys are sticky
Comment 10 adamskelton 2019-07-07 18:48:01 UTC
I think I may have the same bug, but this is on a Raspberry Pi 3 running arm64, with a default install of 12.0-RELEASE. It happens with two different USB wireless keyboards. It happens on the console and vt's, I'm not running X. I have been able to capture a usbdump while it's happening (attached). Running tshark (or usbdump) on the capture file shows that there is an I/O error happening. I'm not a USB guru, so that's as far as I can analyze it, but if someone who really understands the USB stack can contact me, I'd be happy to run a dtrace script while it's happening or offer SSH access to the machine for testing.
Comment 11 Hans Petter Selasky freebsd_committer freebsd_triage 2019-07-07 19:09:21 UTC
There are many USB transfers marked with IOERROR, which means something went wrong!

Have you tried connecting the USB keyboard via an external and self-powered USB HUB?

--HPS


22:27:11.513235 usbus0.4 SUBM-INTR-EP=00000081,SPD=FULL,NFR=1,SLEN=0,IVAL=8
 frame[0] READ 8 bytes
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0x41023 <OPEN|TRANSFERRING|STARTED|SHORT_XFER_OK|CAN_CANCEL_IMMED|0>
22:27:13.204992 usbus0.4 DONE-INTR-EP=00000081,SPD=FULL,NFR=1,SLEN=0,IVAL=8,ERR=IOERROR
 frame[0] READ 0 bytes
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xc1021 <OPEN|STARTED|SHORT_XFER_OK|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
22:27:13.205015 usbus0.4 DONE-INTR-EP=00000082,SPD=FULL,NFR=1,SLEN=0,IVAL=2,ERR=IOERROR
 frame[0] READ 0 bytes
 flags 0xa <SHORT_XFER_OK|PIPE_BOF|0>
 status 0xc1021 <OPEN|STARTED|SHORT_XFER_OK|CAN_CANCEL_IMMED|DOING_CALLBACK|0>
Comment 12 adamskelton 2019-07-08 12:37:30 UTC
(In reply to Hans Petter Selasky from comment #11)
Yes, problem persists even with the keyboard plugged into a powered usb hub. If I use the exact same hardware but run Linux (which is easy to do with the Raspberry Pi just by swapping out the SD card), the keyboard works fine, no issue. This leads me to believe that the problem is in the FreeBSD kernel. Also, if there is a problem with the hardware causing I/O errors, shouldn't the driver be kicking messages out? Nothing shows up on dmesg.
Comment 13 Hans Petter Selasky freebsd_committer freebsd_triage 2019-07-08 12:53:38 UTC
The problem likely resides in the split transactions support in the dwcotg in sys/dev/usb/controller .

Which exact version of RPI have you got?

The driver outputs a lot of debug messages but you can try to enable the dwcotg sysctl and set it to 17 and then reproduce the issue while capturing the dmesg.

--HPS