User avatar
maribu
Posts: 143
Joined: Mon Feb 13, 2012 9:56 pm

Raspberry Pi is missing keyboard events

Sat Jul 28, 2012 8:37 pm

Hello to everybody!

I'm using a keyboard (no wifi, no bluetooth, just a simple usb-keyboard) which works perfectly under Arch Linux on severel PCs and Laptops, but I have a lot of trouble to use it with my Raspberry Pi.

It looks like the Pi is missing keyboard events. Sometimes the Pi does not register keypresses, sometimes it misses that I do no longer press a key. In the second case the screen is just filling with one letter, just like you are holding down one key.

I connected the keyboard to a powered hub, because I first thought this could be due to too much power consumption of my keyboard. The powered hub can provide up to 2500 mA, enough to power at least 20 keyboards. But this does not help. I'm pretty sure the hub is working fine, because connecting the keyboard trough the hub to other systems works just fine.

I noticed that if there is a lot of traffic on the sub bus, my keyboard becomes pretty much unsusuable. But if there is no traffic no network traffic (the network chip is connected via integrated hub to usb, isn't it?) and i plug off every other usb device I don't experiecne anymore keyboard problems.

I posted this before in the Arch Linux section of this forum because I thought this could be a driver problem. But pepedog, who had a alpha board (because he was/is porting Arch Linux ARM to the Raspberry Pi), is having the same problem with his new production Raspberry Pi, but the same keyboard worked fine with his alpha board.

Because of this I think this could be a more general problem of the Raspberry Pi. Is there anyone who had similar problems and solved it?

Thank you for your help!

User avatar
oztrailrider
Posts: 55
Joined: Sat Jan 14, 2012 3:21 am

Re: Raspberry Pi is missing keyboard events

Sun Jul 29, 2012 12:24 am

Have you done a firmware update?. Also if you look at the underside of your keyboard can you tell me what the power draw is rated at?. Anything over 100ma is likely going to give problems on the Pi USB ports.

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Raspberry Pi is missing keyboard events

Sun Jul 29, 2012 5:12 am

Generally that indicates your PSU is not putting out 5v. If you have a multimeter you can test at points TP1 and TP2. You need to be seeing at least 4.75v there.
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1697
Joined: Sat Sep 10, 2011 11:43 am

Re: Raspberry Pi is missing keyboard events

Sun Jul 29, 2012 6:23 am

No this is nothing to do with the power supply. The missing key events is a generic problem in the USB hub handling split transactions, the problem is likely (although not proven) to do with problems scheduling USB traffic which is made harder because of the USB host block

I'm working on it and should have a fix in the next week...

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

User avatar
maribu
Posts: 143
Joined: Mon Feb 13, 2012 9:56 pm

Re: Raspberry Pi is missing keyboard events

Sun Jul 29, 2012 8:14 am

@ostrailrider and @Lob0426: This is definetly not a power problem. As I using a powered hub which provides up to 2500 mA @ 5V I could easyly power 20 keyboard with it. Also the firmware is up to date. But thanks you for you help.

@Gordon: If you post the fix I propably send you a box of chocolate. Thank you very much!

User avatar
Jim JKla
Posts: 2218
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK

Re: Raspberry Pi is missing keyboard events

Sun Jul 29, 2012 8:19 am

Just don't get any chocolate on the keyboard. It might cause sticky keys :D
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick

Lucretia
Posts: 47
Joined: Sun Aug 28, 2011 10:49 pm
Contact: Website

Re: Raspberry Pi is missing keyboard events

Tue Jul 31, 2012 12:14 pm

Hi,

Glad I found this, as my Apple keyboard is doing the same thing, very annoying. Has a rating of 200mA max.

Luke.

itimpi
Posts: 1090
Joined: Sun Sep 25, 2011 11:44 am
Location: Potters Bar, United Kingdom
Contact: Website

Re: Raspberry Pi is missing keyboard events

Tue Jul 31, 2012 12:17 pm

Lucretia wrote:Hi,

Glad I found this, as my Apple keyboard is doing the same thing, very annoying. Has a rating of 200mA max.

Luke.
This would put it over the maximum of 140mA that the Pi can provide via its USB sockets.

johnlwarence
Posts: 4
Joined: Mon Jul 30, 2012 8:47 pm

Re: Raspberry Pi is missing keyboard events

Tue Jul 31, 2012 4:59 pm

Afternoon,

I'm having the same issue with my apple keyboard (A1048) but i have it plugged into a powered usb hub (with a supply of 2amps @ 5v) that is only powering the keyboard (the pi is on a seperate psu) and it still misses the odd event, very annoying when trying to type in a password

regards

John

User avatar
maribu
Posts: 143
Joined: Mon Feb 13, 2012 9:56 pm

Re: Raspberry Pi is missing keyboard events

Tue Aug 07, 2012 2:15 pm

@Gordon: Anything new on this front?

thexman
Posts: 259
Joined: Sat Apr 07, 2012 2:18 pm

Re: Raspberry Pi is missing keyboard events

Tue Aug 07, 2012 3:19 pm

as gordon isnt a part of the paid work force the last email from him regarding the USB issues was he was too busy at work and the community should or might do a fix for the Problem and no one has done anything on the problem as it only really effects v1.0 and v1.1 USB devices as shown on other threads.

get a USB 2 .0 Keyboard and all your problems disapear is the only cure unless anyone is having issues with USB 2.0 also no one is reporting they are but you never know

this Problem with the stack split transactions etc is effecting v1.1 Hid USB devices so much i dropped using the Pi for my project as i didnt want to have to re write all my hardware to be compatable with the Pi when its already compatable with the Standard USB v 1.0 v1.1 v2.0 linux drivers on every other makers boards so i switched embbeded boards

hopefully one day they will fix it but dont hold your breath. :D
one armed controls engineer, my grammar is bad but lets face it most keyboards don't suit a one armed man

User avatar
Ed Raket
Posts: 164
Joined: Mon Apr 30, 2012 4:28 pm

Re: Raspberry Pi is missing keyboard events

Wed Aug 08, 2012 9:16 am

thexman wrote:as gordon isnt a part of the paid work force the last email from him regarding the USB issues was he was too busy at work and the community should or might do a fix for the Problem and no one has done anything on the problem as it only really effects v1.0 and v1.1 USB devices as shown on other threads.

get a USB 2 .0 Keyboard and all your problems disapear is the only cure unless anyone is having issues with USB 2.0 also no one is reporting they are but you never know

this Problem with the stack split transactions etc is effecting v1.1 Hid USB devices so much i dropped using the Pi for my project as i didnt want to have to re write all my hardware to be compatable with the Pi when its already compatable with the Standard USB v 1.0 v1.1 v2.0 linux drivers on every other makers boards so i switched embbeded boards

hopefully one day they will fix it but dont hold your breath. :D
Well... actually i do hope that @Gordon or anyone with the skill's to adress this problem, wil be able to fix this sooner or later. I for one have a Logitech K400 keyboard witch uses a "Logitech® Unifying receiver", this is a verry common "nano" reciever witch is a USB2.x device as far as i know...

Whom ever fixes this problem is a lifesaver, couse the "sticky key's" are really nerve wracking :!:

User avatar
maribu
Posts: 143
Joined: Mon Feb 13, 2012 9:56 pm

Re: Raspberry Pi is missing keyboard events

Wed Aug 08, 2012 9:44 am

Thanks for your reply!

I'm not sure if I have an USB 2.0 keyboard or not. But two out of two keyboards I have tested with the Pi won't work. (Both work fine with Linux with a different device).

In my opinion this is the biggest and most annoying problem with the PI. Until this is solved I won't encourage someone to buy a Pi.

Imagine a school is accidentally buying a whole set of keyboard which won't work.

pholy
Posts: 46
Joined: Sun Jun 24, 2012 11:29 pm

Re: Raspberry Pi is missing keyboard events

Thu Aug 09, 2012 11:31 pm

To find out if a device is USB 1.1 or 2.0 you can (with the device plugged in) enter 'lsusb' and then find the device in the list and note the vendor and product id - EX:
Bus 001 Device 004: ID 046d:c018 Logitech, Inc. Optical Wheel Mouse
Then enter 'sudo lsusb -v -d 046d:c018' and look for the lines
Bus 001 Device 004: ID 046d:c018 Logitech, Inc. Optical Wheel Mouse
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
and there you have it; this mouse is usb 2.0. I don't have any 2.0 keyboards :( Apparently Logitech does, and they cost about $80 :( :( Any other possibilities gratefully acknowledged.

User avatar
Ed Raket
Posts: 164
Joined: Mon Apr 30, 2012 4:28 pm

Re: Raspberry Pi is missing keyboard events

Fri Aug 10, 2012 8:44 am

@pholy: i used your info to find out witch usb version it runs, it states=

Code: Select all

bcdUSB           2.00
Thus.... so much for the "USB 2.00 keyboards works fine" statements.... it must be something else :(

I will have to start looking for a replacement for my Logitech K400, this is a really troublesome bug.

User avatar
hojnikb
Posts: 128
Joined: Mon Jun 04, 2012 3:59 pm
Location: @Home

Re: Raspberry Pi is missing keyboard events

Fri Aug 10, 2012 8:53 am

I'm having the same problems, but im using ps/2 to usb converter, so at first i thought it something wrong with that.But apperently its a common issue..
Hopefully it gets fixed someday..
+°´°+,¸¸,+°´°~ Everyone should have a taste of UK Raspberry Pie =D ~°´°+,¸¸,+°´°+
Rasberry Pi, SoC @ 1225Mhz :o, 256MB Ram @ 550Mhz, 16GB SD-Card, Raspbian

User avatar
Burngate
Posts: 6452
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Raspberry Pi is missing keyboard events

Fri Aug 10, 2012 10:01 am

My limited understanding of usb is that usb 1.1 runs at either low speed (1.5Mb/s) or full speed (12Mb/s), while a usb 2.0 can run at high speed (480Mb/s) instead - but doesn't have to. Indeed it can be labelled usb 2.0 even if it doesn't support high speed. And the problem appears to be associated with devices that are actually running at the lower speeds

User avatar
Burngate
Posts: 6452
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Raspberry Pi is missing keyboard events

Fri Aug 10, 2012 10:03 am

hojnikb wrote:I'm having the same problems, but im using ps/2 to usb converter, so at first i thought it something wrong with that.But apperently its a common issue..
Hopefully it gets fixed someday..
ps/2 to usb converters are generally passive, and rely on the keyboard / mouse actually being usb-capable

User avatar
hojnikb
Posts: 128
Joined: Mon Jun 04, 2012 3:59 pm
Location: @Home

Re: Raspberry Pi is missing keyboard events

Fri Aug 10, 2012 11:29 am

^^ Could you further explain what a passive controller means ?

Although this converter works perfectly fine with keyboard and mouse when connected to a normal PC.
Never had issues with it.
+°´°+,¸¸,+°´°~ Everyone should have a taste of UK Raspberry Pie =D ~°´°+,¸¸,+°´°+
Rasberry Pi, SoC @ 1225Mhz :o, 256MB Ram @ 550Mhz, 16GB SD-Card, Raspbian

xlq
Posts: 2
Joined: Sun Aug 12, 2012 3:08 pm

Re: Raspberry Pi is missing keyboard events

Sun Aug 12, 2012 3:22 pm

Same problem here.

Keyboard: Microsoft Natural Ergonomic Keyboard 4000 v1.0 (I haven't tried a different one).
Power supply: Belkin F5U706uk powered USB hub; 12A bench power supply; USB ports of Asus M2N motherboard (same problem using each of the three, so I'm pretty sure now that it's not a power supply problem!)
I've tried plugging keyboard directly into pi and also into USB hub.
OS: Latest Arch Linux ARM image; also tried 2012-07-15-wheezy-raspbian - same problem.

The problem is not too bad when the pi is completely idle (it drops a few keys here and there, sometimes a key gets stuck) but with a lot of SD card access it becomes much worse, and the keyboard seems to reboot several times: the lights go out for a moment, and the keyboard disconnects and reconnects. I'm surprised the SD card access affects it. Is the SD card on the USB?

Here are the rather uninformative lines in dmesg when the keyboard reboots:

Code: Select all

[  234.082785] usb 1-1.3.4.2: USB disconnect, device number 9
[  235.005879] usb 1-1.3.4.2: new low speed USB device number 10 using dwc_otg
[  235.127226] usb 1-1.3.4.2: New USB device found, idVendor=045e, idProduct=00db
[  235.127261] usb 1-1.3.4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  235.127282] usb 1-1.3.4.2: Product: Natural® Ergonomic Keyboard 4000
[  235.127299] usb 1-1.3.4.2: Manufacturer: Microsoft
[  235.151638] input: Microsoft Natural® Ergonomic Keyboard 4000 as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3.4/1-1.3.4.2/1-1.3.4.2:1.0/input/input8
[  235.157278] microsoft 0003:045E:00DB.0009: input: USB HID v1.11 Keyboard [Microsoft Natural® Ergonomic Keyboard 4000] on usb-bcm2708_usb-1.3.4.2/input0
[  235.176829] input: Microsoft Natural® Ergonomic Keyboard 4000 as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3.4/1-1.3.4.2/1-1.3.4.2:1.1/input/input9
[  235.177434] microsoft 0003:045E:00DB.000A: input: USB HID v1.11 Device [Microsoft Natural® Ergonomic Keyboard 4000] on usb-bcm2708_usb-1.3.4.2/input1

Distorted Vision
Posts: 15
Joined: Thu May 03, 2012 12:28 pm

Re: Raspberry Pi is missing keyboard events

Mon Aug 13, 2012 2:09 am

I was disappointed to find that I have this issue with a Microsoft Arc keyboard and Arc Touch mouse. My Raspberry Pi works fine with my Microsoft Wireless 7000 Desktop set. I bought the Arc set especially for the Raspberry Pi and it wasn't cheap.

I was wondering if there is a fix or a fix being worked on in progress? There seems to be alot of keyboards affected.

Mehuge
Posts: 2
Joined: Wed Sep 12, 2012 12:06 pm

Re: Raspberry Pi is missing keyboard events

Wed Sep 12, 2012 12:11 pm

I am seeing this or at least a very similar problem. I have an Apple, Inc. MP110Z/B bcdUSB 2.0 keyboard. The Pi stop responding to keystrokes often for many many seconds at a time, and on occasion I press a key once and see multiple keys presses on screen.

Is there a fix for this yet?

User avatar
Licaon_Kter
Posts: 240
Joined: Wed Sep 05, 2012 10:12 am
Location: Between the keyboard and the chair.

Re: Raspberry Pi is missing keyboard events

Wed Sep 12, 2012 3:35 pm

Mehuge wrote:I am seeing this or at least a very similar problem. I have an Apple, Inc. MP110Z/B bcdUSB 2.0 keyboard. The Pi stop responding to keystrokes often for many many seconds at a time, and on occasion I press a key once and see multiple keys presses on screen.

Is there a fix for this yet?
up to date kernel ( 3.2.37+ #138 or better ) & firmware?
if so, adding dwc_otg.fiq_fix_enable=1 to your line in /boot/cmdline.txt helps? ( you need the latest kernel for this )
BFQ+BFS or RT on a RPi? 4'real: https://github.com/licaon-kter/ (source and compiled!)

tniemi
Posts: 5
Joined: Fri Aug 03, 2012 7:38 pm
Location: Finland
Contact: Website

Re: Raspberry Pi is missing keyboard events

Wed Sep 12, 2012 3:38 pm

The problem is probably in the Broadcom BCM2835 USB controller driver, please see the related Slashdot story.

In short, the driver expect real-time response from the system. Sometimes RPi simply cannot answer quicky enough, and USB packet is lost. This can be a webcam frame, or a keyboard event.

Work-around is to lower the processor load.

Real fix is to re-write the proprietary USB drivers.

User avatar
RaTTuS
Posts: 10779
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Raspberry Pi is missing keyboard events

Wed Sep 12, 2012 3:49 pm

see this thread :- http://www.raspberrypi.org/phpBB3/viewt ... &start=150
no need to read /.
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

Return to “General discussion”