USB and ghost keys from keyboard.

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
CorruptedByCPU
Member
Member
Posts: 78
Joined: Tue Feb 11, 2014 4:59 pm

USB and ghost keys from keyboard.

Post by CorruptedByCPU »

Hi everyone!

A little problem with the USB UHCI driver for the keyboard (Bochs).

When I pressed the keys from 1 to 0 really fast, the result was predictable.
The second time, the 0 didn't appear, and the number 9 was duplicated.

Then I tried to press only the ENTER key a few times, but the keyboard still reported the number 9, even though I didn't hold it down at all.

Should the keyboard be somehow informed "hey, I already have it!" or I don't know :/

I have no problem with ghost movement on the mouse.

Attached current ISO https://blackdev.org/shot/foton.iso

Image

Code: Select all

00281728000d[USBHID] HID: SET_IDLE:
00324800000d[USBHID]   key: 0x0000002F, code: 0x1E, modkey = -1
00325440000d[USBHID]   key: 0x8000002F, code: 0x1E, modkey = -1
00327040000d[USBHID]   key: 0x00000030, code: 0x1F, modkey = -1
00327680000d[USBHID]   key: 0x80000030, code: 0x1F, modkey = -1
00329216000d[USBHID]   key: 0x00000031, code: 0x20, modkey = -1
00329792000d[USBHID]   key: 0x80000031, code: 0x20, modkey = -1
00331264000d[USBHID]   key: 0x00000032, code: 0x21, modkey = -1
00331904000d[USBHID]   key: 0x80000032, code: 0x21, modkey = -1
00333440000d[USBHID]   key: 0x00000033, code: 0x22, modkey = -1
00334080000d[USBHID]   key: 0x80000033, code: 0x22, modkey = -1
00335616000d[USBHID]   key: 0x00000034, code: 0x23, modkey = -1
00336192000d[USBHID]   key: 0x80000034, code: 0x23, modkey = -1
00337728000d[USBHID]   key: 0x00000035, code: 0x24, modkey = -1
00338432000d[USBHID]   key: 0x80000035, code: 0x24, modkey = -1
00339968000d[USBHID]   key: 0x00000036, code: 0x25, modkey = -1
00340544000d[USBHID]   key: 0x80000036, code: 0x25, modkey = -1
00341312000d[USBHID]   key: 0x8000002F, code: 0x1E, modkey = -1
00341312000d[USBHID] packet hexdump (8 bytes)
00341312000d[USBHID] 00 00 1E 00 00 00 00 00 
00341376000d[USBHID]   key: 0x00000030, code: 0x1F, modkey = -1
00341376000d[USBHID] packet hexdump (8 bytes)
00341376000d[USBHID] 00 00 00 00 00 00 00 00 
00341440000d[USBHID]   key: 0x80000030, code: 0x1F, modkey = -1
00341440000d[USBHID] packet hexdump (8 bytes)
00341440000d[USBHID] 00 00 1F 00 00 00 00 00 
00341504000d[USBHID]   key: 0x00000031, code: 0x20, modkey = -1
00341504000d[USBHID] packet hexdump (8 bytes)
00341504000d[USBHID] 00 00 00 00 00 00 00 00 
00341568000d[USBHID]   key: 0x80000031, code: 0x20, modkey = -1
00341568000d[USBHID] packet hexdump (8 bytes)
00341568000d[USBHID] 00 00 20 00 00 00 00 00 
00341632000d[USBHID]   key: 0x00000032, code: 0x21, modkey = -1
00341632000d[USBHID] packet hexdump (8 bytes)
00341632000d[USBHID] 00 00 00 00 00 00 00 00 
00341696000d[USBHID]   key: 0x80000032, code: 0x21, modkey = -1
00341696000d[USBHID] packet hexdump (8 bytes)
00341696000d[USBHID] 00 00 21 00 00 00 00 00 
00341760000d[USBHID]   key: 0x00000033, code: 0x22, modkey = -1
00341760000d[USBHID] packet hexdump (8 bytes)
00341760000d[USBHID] 00 00 00 00 00 00 00 00 
00341824000d[USBHID]   key: 0x80000033, code: 0x22, modkey = -1
00341824000d[USBHID] packet hexdump (8 bytes)
00341824000d[USBHID] 00 00 22 00 00 00 00 00 
00341888000d[USBHID]   key: 0x00000034, code: 0x23, modkey = -1
00341888000d[USBHID] packet hexdump (8 bytes)
00341888000d[USBHID] 00 00 00 00 00 00 00 00 
00341952000d[USBHID]   key: 0x80000034, code: 0x23, modkey = -1
00341952000d[USBHID] packet hexdump (8 bytes)
00341952000d[USBHID] 00 00 23 00 00 00 00 00 
00342016000d[USBHID]   key: 0x00000035, code: 0x24, modkey = -1
00342016000d[USBHID] packet hexdump (8 bytes)
00342016000d[USBHID] 00 00 00 00 00 00 00 00 
00342080000d[USBHID]   key: 0x80000035, code: 0x24, modkey = -1
00342080000d[USBHID] packet hexdump (8 bytes)
00342080000d[USBHID] 00 00 24 00 00 00 00 00 
00342144000d[USBHID]   key: 0x00000036, code: 0x25, modkey = -1
00342144000d[USBHID] packet hexdump (8 bytes)
00342144000d[USBHID] 00 00 00 00 00 00 00 00 
00342208000d[USBHID]   key: 0x80000036, code: 0x25, modkey = -1
00342208000d[USBHID] packet hexdump (8 bytes)
00342208000d[USBHID] 00 00 25 00 00 00 00 00 
00342272000d[USBHID] packet hexdump (8 bytes)
00342272000d[USBHID] 00 00 00 00 00 00 00 00 
00342336000d[USBHID]   key: 0x00000037, code: 0x26, modkey = -1
00342336000d[USBHID] packet hexdump (8 bytes)
00342336000d[USBHID] 00 00 26 00 00 00 00 00 
00343488000d[USBHID]   key: 0x80000037, code: 0x26, modkey = -1
00343488000d[USBHID] packet hexdump (8 bytes)
00343488000d[USBHID] 00 00 00 00 00 00 00 00 
00345664000d[USBHID]   key: 0x0000002E, code: 0x27, modkey = -1
00345664000d[USBHID] packet hexdump (8 bytes)
00345664000d[USBHID] 00 00 27 00 00 00 00 00 
00346624000d[USBHID]   key: 0x8000002E, code: 0x27, modkey = -1
00346624000d[USBHID] packet hexdump (8 bytes)
00346624000d[USBHID] 00 00 00 00 00 00 00 00 
00386048000d[USBHID]   key: 0x00000046, code: 0x28, modkey = -1
00386304000d[USBHID]   key: 0x80000046, code: 0x28, modkey = -1
00406848000d[USBHID]   key: 0x80000046, code: 0x28, modkey = -1
00406848000d[USBHID] packet hexdump (8 bytes)
00406848000d[USBHID] 00 00 28 00 00 00 00 00 
00406912000d[USBHID] packet hexdump (8 bytes)
00406912000d[USBHID] 00 00 00 00 00 00 00 00 
00446016000d[USBHID]   key: 0x0000002F, code: 0x1E, modkey = -1
00446656000d[USBHID]   key: 0x8000002F, code: 0x1E, modkey = -1
00447936000d[USBHID]   key: 0x00000030, code: 0x1F, modkey = -1
00448640000d[USBHID]   key: 0x80000030, code: 0x1F, modkey = -1
00450112000d[USBHID]   key: 0x00000031, code: 0x20, modkey = -1
00450880000d[USBHID]   key: 0x80000031, code: 0x20, modkey = -1
00452160000d[USBHID]   key: 0x00000032, code: 0x21, modkey = -1
00452800000d[USBHID]   key: 0x80000032, code: 0x21, modkey = -1
00454272000d[USBHID]   key: 0x00000033, code: 0x22, modkey = -1
00454848000d[USBHID]   key: 0x80000033, code: 0x22, modkey = -1
00456448000d[USBHID]   key: 0x00000034, code: 0x23, modkey = -1
00457024000d[USBHID]   key: 0x80000034, code: 0x23, modkey = -1
00458496000d[USBHID]   key: 0x00000035, code: 0x24, modkey = -1
00459008000d[USBHID]   key: 0x80000035, code: 0x24, modkey = -1
00460608000d[USBHID]   key: 0x00000036, code: 0x25, modkey = -1
00461184000d[USBHID]   key: 0x80000036, code: 0x25, modkey = -1
00462528000d[USBHID]   key: 0x00000037, code: 0x26, modkey = -1
00463168000d[USBHID]   key: 0x80000037, code: 0x26, modkey = -1
00464640000d[USBHID]   key: 0x0000002E, code: 0x27, modkey = -1
00465216000d[USBHID]   key: 0x8000002E, code: 0x27, modkey = -1
00472384000d[USBHID]   key: 0x8000002F, code: 0x1E, modkey = -1
00472384000d[USBHID] packet hexdump (8 bytes)
00472384000d[USBHID] 00 00 1E 00 00 00 00 00 
00472448000d[USBHID]   key: 0x00000030, code: 0x1F, modkey = -1
00472448000d[USBHID] packet hexdump (8 bytes)
00472448000d[USBHID] 00 00 00 00 00 00 00 00 
00472512000d[USBHID]   key: 0x80000030, code: 0x1F, modkey = -1
00472512000d[USBHID] packet hexdump (8 bytes)
00472512000d[USBHID] 00 00 1F 00 00 00 00 00 
00472576000d[USBHID]   key: 0x00000031, code: 0x20, modkey = -1
00472576000d[USBHID] packet hexdump (8 bytes)
00472576000d[USBHID] 00 00 00 00 00 00 00 00 
00472640000d[USBHID]   key: 0x80000031, code: 0x20, modkey = -1
00472640000d[USBHID] packet hexdump (8 bytes)
00472640000d[USBHID] 00 00 20 00 00 00 00 00 
00472704000d[USBHID]   key: 0x00000032, code: 0x21, modkey = -1
00472704000d[USBHID] packet hexdump (8 bytes)
00472704000d[USBHID] 00 00 00 00 00 00 00 00 
00472768000d[USBHID]   key: 0x80000032, code: 0x21, modkey = -1
00472768000d[USBHID] packet hexdump (8 bytes)
00472768000d[USBHID] 00 00 21 00 00 00 00 00 
00472832000d[USBHID]   key: 0x00000033, code: 0x22, modkey = -1
00472832000d[USBHID] packet hexdump (8 bytes)
00472832000d[USBHID] 00 00 00 00 00 00 00 00 
00472896000d[USBHID]   key: 0x80000033, code: 0x22, modkey = -1
00472896000d[USBHID] packet hexdump (8 bytes)
00472896000d[USBHID] 00 00 22 00 00 00 00 00 
00472960000d[USBHID]   key: 0x00000034, code: 0x23, modkey = -1
00472960000d[USBHID] packet hexdump (8 bytes)
00472960000d[USBHID] 00 00 00 00 00 00 00 00 
00473024000d[USBHID]   key: 0x80000034, code: 0x23, modkey = -1
00473024000d[USBHID] packet hexdump (8 bytes)
00473024000d[USBHID] 00 00 23 00 00 00 00 00 
00473088000d[USBHID]   key: 0x00000035, code: 0x24, modkey = -1
00473088000d[USBHID] packet hexdump (8 bytes)
00473088000d[USBHID] 00 00 00 00 00 00 00 00 
00473152000d[USBHID]   key: 0x80000035, code: 0x24, modkey = -1
00473152000d[USBHID] packet hexdump (8 bytes)
00473152000d[USBHID] 00 00 24 00 00 00 00 00 
00473216000d[USBHID]   key: 0x00000036, code: 0x25, modkey = -1
00473216000d[USBHID] packet hexdump (8 bytes)
00473216000d[USBHID] 00 00 00 00 00 00 00 00 
00473280000d[USBHID]   key: 0x80000036, code: 0x25, modkey = -1
00473280000d[USBHID] packet hexdump (8 bytes)
00473280000d[USBHID] 00 00 25 00 00 00 00 00 
00473344000d[USBHID]   key: 0x00000037, code: 0x26, modkey = -1
00473344000d[USBHID] packet hexdump (8 bytes)
00473344000d[USBHID] 00 00 00 00 00 00 00 00 
00473408000d[USBHID] packet hexdump (8 bytes)
00473408000d[USBHID] 00 00 26 00 00 00 00 00 
00515200000d[USBHID]   key: 0x00000046, code: 0x28, modkey = -1
00515712000d[USBHID]   key: 0x80000046, code: 0x28, modkey = -1
00537920000d[USBHID]   key: 0x80000046, code: 0x28, modkey = -1
00537920000d[USBHID] packet hexdump (8 bytes)
00537920000d[USBHID] 00 00 26 28 00 00 00 00 
00537984000d[USBHID] packet hexdump (8 bytes)
00537984000d[USBHID] 00 00 26 00 00 00 00 00 
00607936000d[USBHID]   key: 0x00000046, code: 0x28, modkey = -1
00607936000d[USBHID] packet hexdump (8 bytes)
00607936000d[USBHID] 00 00 26 28 00 00 00 00 
00608640000d[USBHID]   key: 0x80000046, code: 0x28, modkey = -1
00608640000d[USBHID] packet hexdump (8 bytes)
00608640000d[USBHID] 00 00 26 00 00 00 00 00 
00625024000d[USBHID]   key: 0x00000046, code: 0x28, modkey = -1
00625344000d[USBHID]   key: 0x80000046, code: 0x28, modkey = -1
00668992000d[USBHID]   key: 0x80000046, code: 0x28, modkey = -1
00668992000d[USBHID] packet hexdump (8 bytes)
00668992000d[USBHID] 00 00 26 28 00 00 00 00 
00669056000d[USBHID] packet hexdump (8 bytes)
00669056000d[USBHID] 00 00 26 00 00 00 00 00 
00682240000d[USBHID]   key: 0x00000046, code: 0x28, modkey = -1
00682432000d[USBHID]   key: 0x80000046, code: 0x28, modkey = -1
00734528000d[USBHID]   key: 0x80000046, code: 0x28, modkey = -1
00734528000d[USBHID] packet hexdump (8 bytes)
00734528000d[USBHID] 00 00 26 28 00 00 00 00 
00734592000d[USBHID] packet hexdump (8 bytes)
00734592000d[USBHID] 00 00 26 00 00 00 00 00 
00898432000d[USBHID]   key: 0x00000046, code: 0x28, modkey = -1
00899072000d[USBHID]   key: 0x80000046, code: 0x28, modkey = -1
00931136000d[USBHID]   key: 0x80000046, code: 0x28, modkey = -1
00931136000d[USBHID] packet hexdump (8 bytes)
00931136000d[USBHID] 00 00 26 28 00 00 00 00 
00931200000d[USBHID] packet hexdump (8 bytes)
00931200000d[USBHID] 00 00 26 00 00 00 00 00
https://blackdev.org/ - system programming, my own 64 bit kernel and software.
User avatar
BenLunt
Member
Member
Posts: 941
Joined: Sat Nov 22, 2014 6:33 pm
Location: USA
Contact:

Re: USB and ghost keys from keyboard.

Post by BenLunt »

Hi,

I haven't had a chance to look at the issue you are having, whether it is Bochs related or not. However, I am curious if you found anything out.

Ben
- https://www.fysnet.net/osdesign_book_series.htm
rdos
Member
Member
Posts: 3264
Joined: Wed Oct 01, 2008 1:55 pm

Re: USB and ghost keys from keyboard.

Post by rdos »

I have this issue on real hardware. Sometimes, keys get repeated, and it seems a bit random. I haven't looked closer at the problem with a USB analyzer, but it only happens with USB, not PS/2.
User avatar
CorruptedByCPU
Member
Member
Posts: 78
Joined: Tue Feb 11, 2014 4:59 pm

Re: USB and ghost keys from keyboard.

Post by CorruptedByCPU »

@BenLunt, disabled USB Legacy Support in BIOS, and now its working properly.
https://blackdev.org/ - system programming, my own 64 bit kernel and software.
Post Reply