viper110110
Posts: 2
Joined: Sat Jun 30, 2012 5:04 am

Trouble typing

Sat Jun 30, 2012 5:10 am

I was just getting started with my rpi and everything was going well. I had a keyboard and a mouse, I was trying to set up a new user account and ssh. At one point, I tried restarting the pi through the command line which did not work so I unplugged it, waited a little, and plugged it back in. When it booted back up, I tried logging into the default login (pi, raspberry) and it told me invalid password. Upon trying again the keyboard malfunctioned while typing the username. Some buttons would be hit, some wouldn't, and some would infinitely repeat. I thought this might be a power supply issue so I unplugged the mouse and disabled the backlight on the keyboard, but the issue remained. I rebooted a couple times which did not resolve the issue. The keyboard is also not the issue because I am using it now on my other computer and I typed this whole post without issue. Any ideas?

User avatar
nick.mccloud
Posts: 804
Joined: Sat Feb 04, 2012 4:18 pm

Re: Trouble typing

Sat Jun 30, 2012 8:58 am

The keyboard may work with other computers but the Pi is smaller and more picky.

Anything with a backlight probably has other bells and whistles - try a more basic keyboard and check your power supply is up to the job.

viper110110
Posts: 2
Joined: Sat Jun 30, 2012 5:04 am

Re: Trouble typing

Sat Jun 30, 2012 7:31 pm

Would a ps2 keyboard on a ps2-usb converter be more basic? My keyboard isn't too complicated, it just has the backlight (which I think is completely controlled by the keyboard) and volume controls.

I also think it isn't the keyboard because it worked fine the first time.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12124
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Trouble typing

Sat Jun 30, 2012 8:08 pm

A PS/2 keyboard (with USB adapter) almost certainly will be problematic, when not used behind a powered hub, in contrast to real USB keyboards, it needs exactly 5V, while any real USB keyboard is satisfied with 4.4 Volt. Due to "nearly tripped polyfuses", the USB port will receive even less voltage than normal, and certainly not 5.0 Volt, maybe not even 4.4 Volt.

Also any keyboard that use backlighting of the keys will be problematic, because the lights draw an excessive amount of power, again when not used behind a powered hub.

While "it worked fine during first attempt", it might have in fact overloaded the USB polyfuses, so that now they "have gone bad", their condition will improve if you let them have some rest for a couple of days, but don't use the keyboard with backlighting again.

Its also possible the problem is partly caused by your PSU which also might not have been able to keep up 5 Volt when getting extra load.

Bad Wolf
Posts: 66
Joined: Wed Jan 25, 2012 11:18 pm

Re: Trouble typing

Sat Jun 30, 2012 10:10 pm

Just to put the cat amongst the pigeons I have no problems using an old Logitech PS/2 keyboard with an equally old non-descript PS/2 to USB adapter.
What will affect the performance is the amperage drawn by the keyboard the one I’m using is rated at .75mA., so again it seems the results depend on the stability of the power supply used.
To a person with a hammer, everything looks like a nail.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12124
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Trouble typing

Sun Jul 01, 2012 12:27 am

It depends on a lot of factors, no name just a few (in order of the "power chain":

The output voltage of the PSU under load
The quality of the power cable
The condition of the main polyfuse F3
How much current the R-PI (Broadcom SoC) itself requires at that moment, depending on what it is doing.
How much current the LAN9512 is consuming, (depending on wether ethernet is turned on, and how much communication bothe Ethernet and USB is going on) and whether the voltage its getting is enough for normal operation.
The condition of the USB polyfuse (either F1 or F2 depending on the port used)
The quality of the USB to PS/2 adapter
The current consumption of the USB to PS/2 adapter
The current consumption of the PS/2 keyboard (may depend on for example capslock and other LED's)
The minimum voltage the PS/2 keyboard will keep working with, which normally would be 4.75V, but if you are lucky it could be less.

Any problem in this chain could lead to failure somewhere.

For example lets assume the PSU is of excellent quality and is actually outputting exactly 4.95 V, and the cable is of reasonable quality and drops only 0.05 Volt, the polyfuse is also normal, and is just 0.2 Ohm. The PI is running normally and is busy with a mondane task like running a browser, it means the LAN chips is on, and Ethernet is enabled, the LAN 9512 chip is drawing its normal 230 or so mA from 3V3 (which means its drawing that same 230mA from 5V also) The rest of the board draws 270 mA or so from the board for a total of 500mA. No problem for the polyfuse, its drop is normal at (0.2 x 0.5 = 0.1 Volt), if no other current is drawn we have a perfectly healthy 4.95 - 0.05 - 0.1 = 4.8 Volt, perfectly OK for the system (for example the LAN9512 chip runs on 3V3, from a drop down regulator (NCP1117-3V3) that works fine with input voltages just 1.2 Volt above their output voltage, so 3.3+1.2 = 4.5 V is enough.

So far so good, lets see what happens next.
The raspberry PI's USB polyfuses are rated 140mA, unfortunately that means they can have a resistance between 3 and 6 Ohm, when they are in fine condition, once tripped, (and recovered) they can be higher, people have reported values up to 8 Ohm. Lets say they are average and 5 Ohm, lets also say that the keyboard is drawing say 50 mA, and the USB adapter an additional 20mA, that means they draw a current of 70mA through the USB polyfuse, first that means that now the PI is drawing not 500 but 580 mA, and so the calculation will be slightly lower, because the PSU is loaded heavier, and the USB cable and input polyfuse drops increase, but lets ignore that, and the fact that a mouse is actually also drawing another 50mA or so.

What happens with the output voltage, well the drop over the 5 Ohm polyfuse will be 0.07 x 5 = 0.35 Volt, so the USB to PS/2 adapter and hence the PS/2 keyboard will receive 4.8 Volt minus the polyfuse drop is 4.8 - 0.35 Volt = 4.45 Volt.
Note that if all goes well, assuming no bad PSU, no bad powercable, no unusual input polyfuse resistance, no unusual current draw (I forgot, the HDMI cable could also draw 50mA, maybe much more when you are using an active HDMI to VGA converter) and an average USB polyfuse leaves us with just 4.45 Volt, just 0.05 volt over the absolute minimum a regular real to spec USB keyboard is happy with. But a PS/2 keyboard was designed long before USB appeared on the market, and was designed according to normal rules for 5V logic, which means only a minimum of 4.75 was required, with just 4.45 Volt all bets are of, and that is if all other potential problems do not apply!

phew, that was a long one.... I hope this clears up what the situation with the R-PI is.

User avatar
Grumpy Mike
Posts: 914
Joined: Sat Sep 10, 2011 7:49 pm
Location: Manchester (England England)
Contact: Website

Re: Trouble typing

Sun Jul 01, 2012 8:58 am

The problem with mahjongg is that he sees all keyboard problems as a power issue. I assume that is because he has never had one.
While there is nothing technically wrong with what he said it is not what is wrong.

nick.mccloud had the right idea when he said:-
The keyboard may work with other computers but the Pi is smaller and more picky.
The fact is that the USB drivers at the moment are simply crap. They work with some complaint keyboards but not all. They drop packets which explains your symptoms of not recognising keys and repeat keys (not getting the key up event). At the moment the only cure is to match the crap software with a crap keyboard, that worked for me. The other thing is you can change distro. Changing from Debian to Arch made my none working, power supply affected keyboard ( according to mahjongg ) magically work. However you just swap for a different set of problems.

Hodapp87
Posts: 11
Joined: Tue Jul 31, 2012 12:51 pm

Re: Trouble typing

Tue Aug 07, 2012 10:44 pm

I have had issues typing as well on my Raspberry Pi with one particular keyboard. It takes the form of keys 'sticking' though I'm not touching anything or of a keystroke not registering until I hit other keys afterward. Quoth lsusb:

Code: Select all

Bus 001 Device 006: ID 413c:1002 Dell Computer Corp. Keyboard Hub
Bus 001 Device 011: ID 413c:2002 Dell Computer Corp. SK-8125 Keyboard

rcksl
Posts: 1
Joined: Mon Jul 23, 2012 2:42 am

Re: Trouble typing

Fri Aug 10, 2012 10:44 pm

I can confirm that the dell sk-8125 does not work, i have gone through a powered hub (shouldn't make a difference though as it only draws 100mA. I have two of the same model and both of them have problems with sticking keys and both work with my current computer.

Return to “Troubleshooting”