User avatar
Rive
Posts: 586
Joined: Sat Mar 26, 2016 5:21 pm
Location: USA

USBHID Mouse performance bug?

Wed May 11, 2016 1:35 pm

I dunno what is up with this, but I went from a USB wired mouse to a USB wireless (Microsoft 3500), and of course it was very sluggish, so I added the following to cmdline:

Code: Select all

usbhid.mousepoll=0
which fixed the issue.

But what I noticed Is that the mouse for some reason, severely impacted and degraded overall system performance (measured with linpack bench and validated sysbench) in both the current raspbian Jessie 4.1 and the newer 4.4.9.

I switched the mouse out again for the wired, and system performance improved.

So, is this a known issue? (or is it just me?)
DNPNWO

User avatar
Paeryn
Posts: 2636
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: USBHID Mouse performance bug?

Wed May 11, 2016 1:57 pm

Setting mousepoll to zero means it will use whatever polling interval the device requests. It could be that the wireless mouse is requesting a faster polling rate than the wired mouse which is going to increase the load on the CPU to keep reading at that speed. Normally if not set to anything it defaults to a 10ms interval, but it could be requesting anything up to 1ms.
She who travels light — forgot something.

User avatar
Rive
Posts: 586
Joined: Sat Mar 26, 2016 5:21 pm
Location: USA

Re: USBHID Mouse performance bug?

Wed May 11, 2016 10:45 pm

Paeryn wrote:Setting mousepoll to zero means it will use whatever polling interval the device requests. It could be that the wireless mouse is requesting a faster polling rate than the wired mouse which is going to increase the load on the CPU to keep reading at that speed. Normally if not set to anything it defaults to a 10ms interval, but it could be requesting anything up to 1ms.
It doesn't seem to use much of the CPU/resources as far as I can tell, but it degrades performance, so I am thinking something isn't as it should be.
DNPNWO

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5318
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: USBHID Mouse performance bug?

Wed May 11, 2016 10:57 pm

With mousepoll=0 you get the default Linux behaviour, which with badly behaved devices can affect performance.
That's why we have changed it to avoid the performance impact by default, but that may cause sluggish mouse.

The options are:
sluggish mouse
Performance impact
Use a different mouse

User avatar
Rive
Posts: 586
Joined: Sat Mar 26, 2016 5:21 pm
Location: USA

Re: USBHID Mouse performance bug?

Wed May 11, 2016 10:59 pm

dom wrote:With mousepoll=0 you get the default Linux behaviour, which with badly behaved devices can affect performance.
That's why we have changed it to avoid the performance impact by default, but that may cause sluggish mouse.

The options are:
sluggish mouse
Performance impact
Use a different mouse
So... it is the hardware. I have noticed it not behaving well (sluggish) in win7, so I switched out the mouse with the pi3. What a PITA.

I just couldn't believe it could cause such a significant performance impact.

Thanks.
DNPNWO

jkohan
Posts: 1
Joined: Thu Jul 07, 2016 10:03 pm

Re: USBHID Mouse performance bug?

Thu Jul 07, 2016 10:06 pm

Are there any intermediate values that can allow balance between performance and system overloading ? What do usbhid.mousepool=N when "N" is not 0 ?
Thanks

User avatar
Paeryn
Posts: 2636
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: USBHID Mouse performance bug?

Fri Jul 08, 2016 9:54 am

Mousepoll is the polling interval in ms. 0 sets it to what the mouse itself requests. The actual interval may be less (rounded down to the nearest power of 2).
She who travels light — forgot something.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5318
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: USBHID Mouse performance bug?

Fri Jul 08, 2016 10:00 am

jkohan wrote:Are there any intermediate values that can allow balance between performance and system overloading ? What do usbhid.mousepool=N when "N" is not 0 ?
Thanks
I believe the number is the interval in milliseconds to poll the mouse at. Zero is special meaning use the number the mouse requests (i.e. the original linux default).
The new default will be the higher of 16, or what the mouse reports.

You if you want to set a compromise value, I'd suggest trying 8, or 4.

Return to “Troubleshooting”