BrewApprentice
Posts: 13
Joined: Tue May 03, 2016 2:21 pm

USB lag (mouse, keyboard, controllers)

Tue May 03, 2016 2:33 pm

Dear folks,

I bought my first raspberry pi a week ago (raspi 3), and am looking forward to playing around with it. I am however having problems with USB lag.

1) retrieve raspberry pi from store, bring home.
2) install retropie, smile. Here the problems start. Its like everything I do happens half a second later. SMB3 is impossible to play, and any other game I throw at it. I reckon: "Well, this project is awesome, but I guess the Pi cant handle it, and it will be usefull in a few generations of the RasPi.
3) Install NOOBS, and Raspbian.
4) Buy wireless bluetooth keyboard with trackpad. A pain, because I have to enable bluetooth every time. This also when I try OSMC. The trackpad is impossible to use, and seems broken. Generally everything a bit slow.
5) Go to store, give back BT keyboard, choose keyboard with USB receiver.
6) Same problems. Major input lag with mouse, keyboard, and some functions are really just a tad slow.

Been trying to google "Raspberry Pi Input Lag", and a few similar phrases. I can't seem to find anyone with the exact same problems. Could this be caused by a faulty pi? Does anyone have any ideas?

Hugs and kisses, from someone who need a bit of raspberry love.

Thanks!

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: USB lag (mouse, keyboard, controllers)

Tue May 03, 2016 3:43 pm

BrewApprentice wrote: Been trying to google "Raspberry Pi Input Lag", and a few similar phrases. I can't seem to find anyone with the exact same problems.
The phrase you might try is "Raspberry PI interactive latency"...
BrewApprentice wrote:Could this be caused by a faulty pi?
I would rather doubt it... more likely something got honked up on your SD card...
BrewApprentice wrote: Does anyone have any ideas?
Is your PI correctly on the network. Sometimes if the network is not connected there will be interactive latency issues while the system is trying trying to get connected...

... more likely you need to start over. Get a fresh Noobs or Raspbian load (make sure the filesystem uses the entire SD card if Raspbian) and try try again.

PS... you might like the Logitech combo keyboard | trackpad... uses just one receiver (works great with the 3B and the newest Raspbian.
marcus
:ugeek:

BrewApprentice
Posts: 13
Joined: Tue May 03, 2016 2:21 pm

Re: USB lag (mouse, keyboard, controllers)

Tue May 03, 2016 3:55 pm

MarkHaysHarris777 wrote:
BrewApprentice wrote: Been trying to google "Raspberry Pi Input Lag", and a few similar phrases. I can't seem to find anyone with the exact same problems.
The phrase you might try is "Raspberry PI interactive latency"...
BrewApprentice wrote:Could this be caused by a faulty pi?
I would rather doubt it... more likely something got honked up on your SD card...
BrewApprentice wrote: Does anyone have any ideas?
Is your PI correctly on the network. Sometimes if the network is not connected there will be interactive latency issues while the system is trying trying to get connected...

... more likely you need to start over. Get a fresh Noobs or Raspbian load (make sure the filesystem uses the entire SD card if Raspbian) and try try again.

PS... you might like the Logitech combo keyboard | trackpad... uses just one receiver (works great with the 3B and the newest Raspbian.
Thank you very much for taking the time to answer!

I find it strange that mouse lag could be from a faulty SD card, as I am not loading anything when it is lagging. I also had the same lag with wired xbox 360 controller and a PS3 controller in retropie. I also made sure to format the card properly before installing, and it is a class 10 card.

I believe the Pi is configured correctly on the network. I can update/upgrade fine.

Can really mouse lag like this be due to a install on a badly configured SD card?

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: USB lag (mouse, keyboard, controllers)

Tue May 03, 2016 4:02 pm

BrewApprentice wrote: Can really mouse lag like this be due to a install on a badly configured SD card?
Of course....

... the SD card is the entire system. I very seriously doubt that you have a bad PI board causing usb latency. Have you tried a fresh install of Raspbian?
marcus
:ugeek:

BrewApprentice
Posts: 13
Joined: Tue May 03, 2016 2:21 pm

Re: USB lag (mouse, keyboard, controllers)

Tue May 03, 2016 4:39 pm

MarkHaysHarris777 wrote:
BrewApprentice wrote: Can really mouse lag like this be due to a install on a badly configured SD card?
Of course....

... the SD card is the entire system. I very seriously doubt that you have a bad PI board causing usb latency. Have you tried a fresh install of Raspbian?
Forgive me if I am wrong, but I thought that shouldn't be a problem, due to the OS being loaded into memory. If I was loading something, I would agree, but I am not loading anything, I am on the desktop, just circling the mouse. This might very well be wrong, was just how I thought it worked.

I will order another SD card, and see if that works. Seeing how I had this problem with Retropie first, then OSMC, and then now Raspbian. For the last install I really made sure to format the card properly, and not in "quick" mode. I just don't see how installing it again on this card will help, so I believe buying another card is the way to go.

The card I am currently using is fairly new, and not used a lot (no rewrites prior to testing RasPi).

BrewApprentice
Posts: 13
Joined: Tue May 03, 2016 2:21 pm

Re: USB lag (mouse, keyboard, controllers)

Tue May 03, 2016 4:43 pm

The card I have is a samsung SDXC 64gb. I followed the guide for using these cards, and used the "quick format" when formatting. Does it make sense to do a full format, and not the quick one? Could this be the problem?

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5085
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: USB lag (mouse, keyboard, controllers)

Tue May 03, 2016 4:55 pm

BrewApprentice wrote:The card I have is a samsung SDXC 64gb. I followed the guide for using these cards, and used the "quick format" when formatting. Does it make sense to do a full format, and not the quick one? Could this be the problem?
Hopefully you (fully) avoided this pitfall:
viewtopic.php?f=91&t=83372&p=651745#p677748
(Personally I've never used a card >32Gb since I consider such not to be "cost effective" and prefer to keep "data" separate from the main O.S. space and so use a USB stick for that when required)
Trev.
Still running Raspbian Jessie on some older Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W) but Stretch on my 2xP3A+, P3B+, P3B, B+, A+ and a B2. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

BrewApprentice
Posts: 13
Joined: Tue May 03, 2016 2:21 pm

Re: USB lag (mouse, keyboard, controllers)

Tue May 03, 2016 5:01 pm

Trev,

Thanks for answering!

I did do it this way, but I did however not do a full format, but a quick format. I do agree that a smaller card would be better, but I used what I had available. My 16GB card was defect, so I chose to try with this one. I just placed an order for a 16GB card, as it will be enough for my application.

I will try to reformat the card again, to try it out, and see if it will help.

Thanks!

BrewApprentice
Posts: 13
Joined: Tue May 03, 2016 2:21 pm

Re: USB lag (mouse, keyboard, controllers)

Tue May 03, 2016 6:44 pm

I have now made sure to do a full format on the card, and reinstall NOOBS/Raspbian. There is still major lag from the wireless mouse.

1) When using wired mouse, there is less lag, but it is still present.
2) When connecting the wireless mouse/keyboard to my other PC, there is no lag whatsoever.

I will try with the 16GB card once it arrives, and hope that will solve it.

Is there anyone who has had the same problem I am experiencing?

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: USB lag (mouse, keyboard, controllers)

Tue May 03, 2016 7:01 pm

hi, I'm just trying to cover the bases here... what you are experiencing is NOT normal...

... are you using a 'real' display monitor, or are you using VNC ? It is normal to have a slight keyboard/mouse latency using VNC (the mouse pointers will actually separate slightly while the one follows the other).

Just for grins... what else do you have plugged into the usb slots? Also, have you tried each of the four usb slots separately? ... all four have same symptom? Do you have any code running that could be interfering with the usb hub? ... on the PI everything goes through the hub... its the RPi bottle-neck. I can't think what, but if something were intercepting at the hub there might be a keyboard/mouse latency generated.

Anyway, again, what you are experiencing is not normal.
marcus
:ugeek:

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: USB lag (mouse, keyboard, controllers)

Tue May 03, 2016 7:26 pm

This is a side-bar...

... I wonder if you picked up a viri (malware) that is intercepting your keyboard | mouse events and either recording them or transmitting them to mamma... that would definitely generate a usb keyboard|mouse latency.

(beats me)
marcus
:ugeek:

BrewApprentice
Posts: 13
Joined: Tue May 03, 2016 2:21 pm

Re: USB lag (mouse, keyboard, controllers)

Tue May 03, 2016 7:29 pm

MarkHaysHarris777 wrote:1) are you using a 'real' display monitor, or are you using VNC ?
2) what else do you have plugged into the usb slots?
3) Also, have you tried each of the four usb slots separately?
4) Do you have any code running that could be interfering with the usb hub?

Anyway, again, what you are experiencing is not normal.
Marcus,

I really appreciate you trying to help. I really do.

1) I'm using a real monitor. Tried my PC monitor, and my TV. Same problem on both.
2) Nothing else plugged into the USB. Only the keyboard/mouse USB receiver.
3) I have at least tried 2 of them, with the same problem on both ports.
4) I only have a bare install of Raspbian. Ran "sudo apt-get update" and "sudo apt-get upgrade". That's all.

I really have no clue what it could be. I do notice that a wired USB mouse has less input lag, but it is still there. It was the same with retropie, where my controller input lags, and it would be unplayable.

The next thing to try, will be the new sd card I just ordered. Other than that, I don't know what to try. What would you do in my shoes, if it isnt the card? Send it back for a replacement?

BrewApprentice
Posts: 13
Joined: Tue May 03, 2016 2:21 pm

Re: USB lag (mouse, keyboard, controllers)

Tue May 03, 2016 7:31 pm

MarkHaysHarris777 wrote:This is a side-bar...

... I wonder if you picked up a viri (malware) that is intercepting your keyboard | mouse events and either recording them or transmitting them to mamma... that would definitely generate a usb keyboard|mouse latency.

(beats me)
Hehe, I hope that is not the case. I literally picked up the keyboard today, and made a fresh install with the latest package from this site.

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: USB lag (mouse, keyboard, controllers)

Tue May 03, 2016 8:01 pm

BrewApprentice wrote: I really have no clue what it could be. I do notice that a wired USB mouse has less input lag, but it is still there. It was the same with retropie, where my controller input lags, and it would be unplayable.
That is what makes no sense... the hub doesn't know the wired mouse from the receiver mouse... just looks like a usb mouse (if the problem where in the hub you'd see the problem the same on both).

I am wondering if you have other equipment in the area that is interfering (either blue tooth or usb xmitter|receiver)? Have you tried disabling your blue tooth on the PI? Is the PI sitting in the vicinity of a micro-wave oven, baby monitor, wireless phone, &c.

You might have ESD zapped your board somehow... they are static sensitive... but I doubt it... sooner or later one of the PI engineers will chime in here with $0.02
marcus
:ugeek:

BrewApprentice
Posts: 13
Joined: Tue May 03, 2016 2:21 pm

Re: USB lag (mouse, keyboard, controllers)

Tue May 03, 2016 8:11 pm

MarkHaysHarris777 wrote:
1) That is what makes no sense... the hub doesn't know the wired mouse from the receiver mouse... just looks like a usb mouse (if the problem where in the hub you'd see the problem the same on both).

2) I am wondering if you have other equipment in the area that is interfering (either blue tooth or usb xmitter|receiver)? Have you tried disabling your blue tooth on the PI? Is the PI sitting in the vicinity of a micro-wave oven, baby monitor, wireless phone, &c.

3) You might have ESD zapped your board somehow... they are static sensitive... but I doubt it... sooner or later one of the PI engineers will chime in here with $0.02
1) I know.. It really should not matter. But the lag is definitely there with any device I use. Be it keyboard, mouse or gaming controller.

2) This might be, but there is still significant lag with the wired controller/mouse as well.

3) I really hope this isn't the case!

Thanks for the replies so far. I appreciate everyone trying to help :)

BrewApprentice
Posts: 13
Joined: Tue May 03, 2016 2:21 pm

Re: USB lag (mouse, keyboard, controllers)

Fri May 06, 2016 11:14 am

I have received another SD card. The same problem is still there, so it is not the SD card.

Hasn't anyone else had this problem? Do I send the Pi back?

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: USB lag (mouse, keyboard, controllers)

Fri May 06, 2016 11:27 am

hi, even if you have a usb hub latency due to some hardware weakness (and I still doubt that) the PI is still very useful--- control it via ssh, serial console, VNC (my personal favorite), telnet &c.

I've been thinking about you and your misbehaving PI and have been wondering what you might have configured ON in raspi-config... some folks thinking that they will be doing all sorts of things just turn everything on (camera, spi, i2c, serial, bt, wifi... ). Its actually better to turn everything OFF and then only turn on what you need right now (some of the overlays conflict seriously especially on the 3B). I don't know for sure yet, but I'm wondering if there is some combination of ON that causes a usb hub latency.
I have set my core_freq=250 so that I can get the serial console to work at 115200 baud, while leaving the BT and uart1 alone for the moment; I'm having mixed positive results for now--- but my console is finally working. I'm wondering if there might be a clock setting (one way or the other) that could be affecting the latency of the usb hub (or some other configuration overlay ?) Anyway, it doesn't look like anyone else (within lurking distance) has had this problem.

:? puzzling
marcus
:ugeek:

BrewApprentice
Posts: 13
Joined: Tue May 03, 2016 2:21 pm

Re: USB lag (mouse, keyboard, controllers)

Sat May 07, 2016 11:09 am

MarkHaysHarris777 wrote:hi, even if you have a usb hub latency due to some hardware weakness (and I still doubt that) the PI is still very useful--- control it via ssh, serial console, VNC (my personal favorite), telnet &c.

I've been thinking about you and your misbehaving PI and have been wondering what you might have configured ON in raspi-config... some folks thinking that they will be doing all sorts of things just turn everything on (camera, spi, i2c, serial, bt, wifi... ). Its actually better to turn everything OFF and then only turn on what you need right now (some of the overlays conflict seriously especially on the 3B). I don't know for sure yet, but I'm wondering if there is some combination of ON that causes a usb hub latency.
I have set my core_freq=250 so that I can get the serial console to work at 115200 baud, while leaving the BT and uart1 alone for the moment; I'm having mixed positive results for now--- but my console is finally working. I'm wondering if there might be a clock setting (one way or the other) that could be affecting the latency of the usb hub (or some other configuration overlay ?) Anyway, it doesn't look like anyone else (within lurking distance) has had this problem.

:? puzzling
Hey Marcus. Thanks a lot for caring.

I am using it with VNC atm, and playing around with it. I am sure it won't really be a problem, but it is a bit annoying. I would like to try out retropie, and stuff like that, so it is somewhat annoying. If it is a physical problem with the pi, I would like to send it back for a replacement.. I just don't know how I will be able to test it out.

I have not turned anything on, and using a bare install, and I do think BT is off by default. I do use wifi, so I could try an ethernet cable, disable wifi, and see if that helps. I was hoping this was some coding error, because the 3B is new, but I don't find any other similar reports.

Tried using the rpi-update command as well, to see if that would do anything, but it didnt..

On a side note: With VNC its less lag than with USB.

SypsG
Posts: 1
Joined: Tue Aug 02, 2016 1:36 pm

Re: USB lag (mouse, keyboard, controllers)

Tue Aug 02, 2016 1:41 pm

I had a problem with half a second to full second of latency when moving my mouse in emulationstation and any game that uses a mouse. The problem was the image I installed had the arm_freq set to 700mhz by default. I changed it to 1200, to match the processor on my pi3, and the problem with lag was completely eliminated.

Return to “Troubleshooting”