Keyboard repeating characters


67 posts   Page 2 of 3   1, 2, 3
by toxibunny » Tue Oct 16, 2012 5:47 am
My wired keyboard's started repeating after about a week of working perfectly. I have a rev.1 Pi, with the usb polyfuses bypassed. I'm wondering - is it possible for the *main* polyfuse to have a kindof 'slow blow' if you're pushing it to it's limits, thereby causing a gradual voltage drop which is only just becoming apparent?
note: I may or may not know what I'm talking about...
Posts: 1130
Joined: Thu Aug 18, 2011 9:21 pm
by thetabug » Fri Oct 19, 2012 10:51 pm
Just got the same repeating keys problem after a month of working fine.

Using 'vanilla' setup -
1A phone charger as PSU, unpowered hub, basic Xenta KB/mouse
Raspbian wheezy on 4GB card
HDMI display
Network on Tp-link 3G router

Disconnecting/reconnecting the keyboard seems to cure the problem so far.
Posts: 1
Joined: Fri Oct 19, 2012 10:22 pm
by kayaker » Fri Oct 26, 2012 12:17 am
CaptainMark wrote:I have a Logitech K260 (wireless keyboard/mouse combo) which until recently worked flawlessly with Raspian until the mid September update. Now I have repeating keys issues. I have a 1A HTC charger powering the pi and a 2.5A powered usb hub, both give the same issue and the dongle itself requires only .55mA so it's not a power issue, it worked fine for ages so it's probably a software degression


Same keyboard/mouse combo here, and same problem! This ONLY started after updating to to the Raspbian 2012-09-18 image. I get the same problem with a Belkin powered hub (can't find the "official" USB output current rating but the wall wart is marked 5VDC, 3.5-3.8A) and with a 1.2A phone charger - both of which worked fine with the older images.

Any solution in sight?
Posts: 28
Joined: Sat Mar 10, 2012 1:41 pm
by charliedurrant » Thu Nov 15, 2012 9:34 pm
kayaker wrote:Same keyboard/mouse combo here, and same problem! This ONLY started after updating to to the Raspbian 2012-09-18 image. I get the same problem with a Belkin powered hub (can't find the "official" USB output current rating but the wall wart is marked 5VDC, 3.5-3.8A) and with a 1.2A phone charger - both of which worked fine with the older images.

Any solution in sight?


Kayaker,

I have the same as you:

http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=18892&p=215699#p215699

I'm using the latest wheezy image and my keyboard has got much worse since adding a wifi usb dongle and after performing an:

Code: Select all
apt-get update


Charlie
Posts: 35
Joined: Sun Mar 18, 2012 12:06 am
by svetlev » Tue Jan 29, 2013 2:15 am
I just read that you need to edit the cmdline.txt file, and add "dwc_otg.speed=1" to increase the USB bus speed. It's certainly worth a shot.
Posts: 6
Joined: Sun Jul 01, 2012 10:46 pm
by thradtke » Tue Jan 29, 2013 7:23 am
svetlev wrote:[...] add "dwc_otg.speed=1" to increase the USB bus speed.

Should be "decrease", and you end up in the wonderful USB1.1 world.
Full-time noob forever.
Posts: 431
Joined: Wed May 16, 2012 5:16 am
Location: Germany / EL
by obcd » Tue Jan 29, 2013 7:58 am
Yes, it's USB 1.1 and it's not a solution, but it's worth trying to see if it fixes the issues.
It would prove that the supply voltage isn't the cause of the issues, what some would like us to believe.
Posts: 890
Joined: Sun Jul 29, 2012 9:06 pm
by pluggy » Tue Jan 29, 2013 1:54 pm
obcd wrote:Yes, it's USB 1.1 and it's not a solution, but it's worth trying to see if it fixes the issues.
It would prove that the supply voltage isn't the cause of the issues, what some would like us to believe.


Agreed, power is a big issue on the Pi, but it can't be blamed for everything. I have a keyboard that repeats characters, on any of my 3 Pis with any of my 5 or 6 power supplies. My other 5 keyboards work OK on any of them.
Don't judge Linux by the Pi.......
User avatar
Posts: 2514
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
by drgeoff » Tue Jan 29, 2013 2:41 pm
pluggy wrote:I have a keyboard that repeats characters, on any of my 3 Pis with any of my 5 or 6 power supplies.

I think even the most ardent RPi supporters have acknowledged that it isn't the keyboards which are repeating (and dropping) characters. It is the RPi's USB susbsytem which, under some circumstances, loses key-up and key-down messages.
Posts: 2878
Joined: Wed Jan 25, 2012 6:39 pm
by feverish » Tue Jan 29, 2013 2:52 pm
I've tried several wireless usb keyboards, via direct or powered hubs. Most gave this sort of trouble, but now I use a direct-wired el cheapo usb keyboard and usb mouse via a 7-port powered hub and it works fine.
Posts: 300
Joined: Wed Jun 27, 2012 2:29 pm
by svetlev » Tue Jan 29, 2013 3:12 pm
Code: Select all
dwc_otg.speed=1
did not work for me. It couldn't even boot correctly.
Posts: 6
Joined: Sun Jul 01, 2012 10:46 pm
by drgeoff » Tue Jan 29, 2013 3:15 pm
svetlev wrote:
Code: Select all
dwc_otg.speed=1
did not work for me. It couldn't even boot correctly.

Yes, I have also found that every time I tried it.
Posts: 2878
Joined: Wed Jan 25, 2012 6:39 pm
by obcd » Tue Jan 29, 2013 3:35 pm
It fixes the problems with ftdi usb2serial adapters.
It suprises me that it doesn't boot correctly with that setting.
I was under the impression that the keyboard split transactions only occured on an usb 2.0 speed bus.
In that case, adding dwc_otg.speed =1 should fix it as it switches the usb bus to usb 1.1 speed. Obvious, devices that need the usb 2.0 speed won't work anymore.
Posts: 890
Joined: Sun Jul 29, 2012 9:06 pm
by lolpaca » Tue Jan 29, 2013 7:55 pm
Hi all,

I just started using my RPi tonight and I think I'm having the same problem. The keyboard is a Microsoft Wireless 800 and it occasionally doesn't respond, repeats keystrokes etc. While I can just about type 'pi', there's no way I'm going to manage 'raspberry' so I haven't actually managed to log in yet!

One thing I noticed is on the Argos reviews page for the keyboard there's one guy who says the following:

"Wanted to use this on my Raspberry PI. Was very worried when it did not appear to work, sometimes repeating the key-press at random. However a small change to the config of the system to upgrade the USB bus and it worked. Now the mouse and keyboard only take a single USB slot and I can sit back and program without having wires running over the place."

Unfortunately that doesn't mean much to me, but maybe someone could explain how he got his to work?
Posts: 3
Joined: Tue Jan 29, 2013 7:47 pm
by pluggy » Tue Jan 29, 2013 8:31 pm
drgeoff wrote:
pluggy wrote:I have a keyboard that repeats characters, on any of my 3 Pis with any of my 5 or 6 power supplies.

I think even the most ardent RPi supporters have acknowledged that it isn't the keyboards which are repeating (and dropping) characters. It is the RPi's USB susbsytem which, under some circumstances, loses key-up and key-down messages.


I'll rephrase :

I have a keyboard that when plugged into the Pi's iffy USB system appears to repeat characters.

I'm typing on said keyboard on a Linux box now (A PC running Ubuntu). It certainly doesn't repeat characters.......

Can't make my Pis misbehave by adding dwc_otg.speed=1 to cmdline.txt. Even going to the extent of editing it with windoze notepad, putting it on another line and adding some extra blank lines didn't stop it booting. Latest raspdian image with the 'normal' updates. I don't risk the rpi-update stuff.
Don't judge Linux by the Pi.......
User avatar
Posts: 2514
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
by abishur » Tue Jan 29, 2013 8:59 pm
lolpaca wrote:
"Wanted to use this on my Raspberry PI. Was very worried when it did not appear to work, sometimes repeating the key-press at random. However a small change to the config of the system to upgrade the USB bus and it worked. Now the mouse and keyboard only take a single USB slot and I can sit back and program without having wires running over the place."

Unfortunately that doesn't mean much to me, but maybe someone could explain how he got his to work?


He's probably referring to adding "dwc_otg.speed=1" to cmdline.txt located on /boot (the FAT partition of the SD card) It's not an upgrade, if anything I'd call it a bit of a downgrade, but it can help in situations where you have a usb 2.0 device and a usb 1.1 device plugged into the pi, or in some cases when you have a usb 1.1 device all by itself.
Dear forum: Play nice ;-)
User avatar
Forum Moderator
Forum Moderator
Posts: 4280
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
by lolpaca » Tue Jan 29, 2013 9:13 pm
abishur wrote:
lolpaca wrote:He's probably referring to adding "dwc_otg.speed=1" to cmdline.txt located on /boot (the FAT partition of the SD card) It's not an upgrade, if anything I'd call it a bit of a downgrade, but it can help in situations where you have a usb 2.0 device and a usb 1.1 device plugged into the pi, or in some cases when you have a usb 1.1 device all by itself.


Thanks! So... I should just open that .txt file and add that line to it?
Posts: 3
Joined: Tue Jan 29, 2013 7:47 pm
by pluggy » Tue Jan 29, 2013 9:38 pm
You insert dwc_otg.speed=1 into the one line in cmdline.txt. Not important where in the line you put it though.

It doesn't hurt some USB 2.0 peripherals to run at 1.1 speeds. I have wifi adapaters that are V2.0 and work better for it on something other than the Pi. They seems to run slightly faster on the Pi with the 1.1 slowdown in place.
Don't judge Linux by the Pi.......
User avatar
Posts: 2514
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
by lolpaca » Tue Jan 29, 2013 10:20 pm
I put it at the start of the cmd line and everything now seems to be working well. Thanks!
Posts: 3
Joined: Tue Jan 29, 2013 7:47 pm
by brnrubbr » Sun Feb 03, 2013 8:42 am
Solution

This is my first post, so please feel free to tell me I am out of line, but the problem you likely are all having are HEAT issues.

Due to my previous microprocessor experience, I immediately saw a potential heat problem on IC2, IC3 and RG2. I put tiny heatsinks (from Microcenter) on these items ASAP. I got the basics up and running on the Pi and life is good.

Tonight, I have been running my lil' RasPi hard getting upgrades and updates done but my wireless keyboard is hit or miss for functionality (no keystrokes or lotsa repeating keystrokes). I did a little research and I read about this exact problem many times for the Pi. First cause was low power, then drivers, the timing, then reseating the USB when hot, etc, etc.

Then I put it all together........ hot crystals. Your X1 and X2 are getting hot (after running the processor hard and hot for a while) and messing with frequencies of the crystals. I put heatsinks on the two crystals and everything is running much, MUCH better. No lagging, wireless keyboard works great, all is well.
I will be installing a fan to circulate air over the 5 heatsinks and I expect to have even better, more robust results tomorrow. Who knows, maybe I will even be able to use that overclock feature.

I hope this helps everyone. Cheers!!!
Posts: 1
Joined: Sun Feb 03, 2013 8:03 am
by swordfish » Mon Feb 04, 2013 1:18 am
My pi is connected to a 4 port powered hub. This powers a WiFi dongle and the USB keyboard/mouse KVM cable. I have no problems with keyboard repeat errors in raspbmc but I have them in raspbian until I unplug and replug the USB KVM cable. I experience the errors in raspbian from a cold boot as well as a warm boot.

Just my two cents. It has to be something specific to raspbian. I have run rpi-update and did a apt-get dist-upgrade just this evening. I just checked both distributions and nothing has changed.
User avatar
Posts: 1
Joined: Mon Feb 04, 2013 12:41 am
by obcd » Mon Feb 04, 2013 8:17 am
@brnrubbr

yes, you are out of line.

you are basically telling that the foundation employee working on improving the Pi usb system is wasting his time...
The keyboard problems are known to become worse when the cpu is loaded, not because it heats up, but because it's interrupt latency becomes worse. This gives problems with usb split transactions.
Jamesh recently posted they doubt the issue can't be fixed with software....
It would be the first design I see with heatsinks mounted on an xtal.
I know they used to put them in temperature controlled ovens when extreme stability was requested.
A heatsink improves the conducted heat from a component to the ambient air by reducing the thermal resistance between the 2. It's not like the xtal's are producing heat....If they are not hotter than the ambient temperature, a heatsink is useless. It might create some RMI shielding that makes a difference, but that's a whole different ballgame.
Posts: 890
Joined: Sun Jul 29, 2012 9:06 pm
by pluggy » Mon Feb 04, 2013 1:20 pm
Its well established that the Pi's USB system causes some keyboards to repeat characters. Changing the keyboard for a cheap simple wired unit usually cures it. If you're using an old image (pre October) more keyboards exhibit the problem.
Don't judge Linux by the Pi.......
User avatar
Posts: 2514
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
by sonofusion82 » Mon Feb 04, 2013 1:53 pm
FYI, I have submitted a pull request to raspberry pi Linux kernel for a workaround patch to usbhid driver that can make the keyboards much more usable. While it does not solve the loss packet issue, it causes the keyboard to resend the reports, so no more sticky keys. https://github.com/raspberrypi/linux/pull/192
Posts: 4
Joined: Sun Jan 06, 2013 7:25 am
by thradtke » Mon Feb 04, 2013 2:45 pm
sonofusion82 wrote:While it does not solve the loss packet issue, it causes the keyboard to resend the reports, so no more sticky keys.

What if a key up signal is lost (the root cause of repeating keys), but a subsequent key down signal (of a different key) arrives within the timeout? This wouldn't be an uncommon situation.
Full-time noob forever.
Posts: 431
Joined: Wed May 16, 2012 5:16 am
Location: Germany / EL