You are not logged in.

#1 2015-05-12 09:38:11

Nektarios
Member
Registered: 2013-02-19
Posts: 90

[FOUND WORKAROUND] Mouse input microstuttering at 1000hz

My arch system with Xorg has microstuttering in the mouse movement, which should not happen.

What is micro-stuttering: http://www.blurbusters.com/mouse-125hz- … vs-1000hz/

My tests where done on a 120hz screen, running KDE at 120fps with hardware cursor enabled.
kernel: 4.0.1-1 stock.
gfx card: nvidia gtx 760
drivers: nvidia 349.16-2 proprietary

I have followed the WIKI to configure usbhid to poll at 1ms (1000hz), but in reality when I move my mouse pointer left and right across my screen there evident microstuttering (the same kind of microstuttering I get at 500hz polling rate in windows). In comparison, when I boot up windows 7 (also with 1000hz), there is no microstuttering when moving the mouse pointer. So I guess that despite what usbhid reports, or what the /dev/input does, the mouse input with Xorg does not run at 1000hz.

Anyone have any solutions? Or anything that can point me to the right direction of what is going wrong?

Last edited by Nektarios (2015-05-14 22:26:45)

Offline

#2 2015-05-12 17:05:50

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 268

Re: [FOUND WORKAROUND] Mouse input microstuttering at 1000hz

I don't have an answer for you unfortunately but you did answer why I'm having a similar issue. I thought it was my desk surface, I was having these stutters as well.

I own a Zowie mouse that can switch sentitivity with a button at the bottom of the mouse. When I changed that to a lower setting but increased the acceleration from the KDE system settings the stutters disappeared.

For me this is a perfectly fine workaround as I don't need such a high polling rate anyways. I don't game on my PC anymore and my pointer just needs to go around the screen at a comfortable speed wink.

Offline

#3 2015-05-12 17:55:39

Nektarios
Member
Registered: 2013-02-19
Posts: 90

Re: [FOUND WORKAROUND] Mouse input microstuttering at 1000hz

I found out the problem. It's a bug in the kernel drivers.

when I connect a 1000hz capable mouse in some USB ports that use the uhci_hcd they don't support 1000hz and they have erratic, stuttering movement.

When I connected the mouses to a different USB port that goes through a different USB HUB that uses the ehci-pci driver, they correctly worked at 1000hz polling rate and they have smooth movement.

Therefor there must be a bug in those newer USB drivers that needs to be fixed.

Offline

#4 2015-05-12 18:13:59

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,240

Re: [FOUND WORKAROUND] Mouse input microstuttering at 1000hz

Don't forget to mark as solved, but not sure why it works in Windows and not in Linux.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#5 2015-05-12 18:15:37

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 268

Re: [FOUND WORKAROUND] Mouse input microstuttering at 1000hz

Well that bug you linked is old and I'm pretty sure my mouse started acting up "recently". I don't think its something that's been here for years.

Offline

#6 2015-05-12 18:24:00

Nektarios
Member
Registered: 2013-02-19
Posts: 90

Re: [FOUND WORKAROUND] Mouse input microstuttering at 1000hz

mouseman: well I tested it thoroughly.

I did a journalctl -f while plugging in the mouse to a port of the problematic USB HUB:

Μάι 12 20:41:33 nekhomeworkstation kernel: usb 7-2: new full-speed USB device number 7 using uhci_hcd
Μάι 12 20:41:33 nekhomeworkstation kernel: hid-generic 0003:1038:1369.0028: hiddev0,hidraw1: USB HID v1.11 Device [SteelSeries Sensei Raw Gaming Mouse] on usb-0000:00:1d.1-2/input0

(notice the uhci_hcd)

and then I ran evhz:

Kingsis Peripherals ZOWIE Gaming mouse: Latest  500Hz, Average  500Hz
Kingsis Peripherals ZOWIE Gaming mouse: Latest  500Hz, Average  500Hz
Kingsis Peripherals ZOWIE Gaming mouse: Latest  500Hz, Average  500Hz
Kingsis Peripherals ZOWIE Gaming mouse: Latest  500Hz, Average  500Hz
Kingsis Peripherals ZOWIE Gaming mouse: Latest  500Hz, Average  500Hz
Kingsis Peripherals ZOWIE Gaming mouse: Latest  500Hz, Average  500Hz
Kingsis Peripherals ZOWIE Gaming mouse: Latest  500Hz, Average  500Hz
Kingsis Peripherals ZOWIE Gaming mouse: Latest  500Hz, Average  500Hz
.....

and the movement was stuttering.

But when I plug it in the USB port of another USB HUB:

Μάι 12 20:41:10 nekhomeworkstation kernel: usb 2-3.1: new full-speed USB device number 11 using ehci-pci
Μάι 12 20:41:10 nekhomeworkstation kernel: hid-generic 0003:1038:1369.0024: hiddev0,hidraw1: USB HID v1.11 Device [SteelSeries Sensei Raw Gaming Mouse] on usb-0000:00:1d.7-3.1/input0

(notice the ehci-pci)

Kingsis Peripherals ZOWIE Gaming mouse: Latest  1000Hz, Average  1000Hz
Kingsis Peripherals ZOWIE Gaming mouse: Latest  1000Hz, Average  1000Hz
Kingsis Peripherals ZOWIE Gaming mouse: Latest  1000Hz, Average  1000Hz
Kingsis Peripherals ZOWIE Gaming mouse: Latest  1000Hz, Average  1000Hz
Kingsis Peripherals ZOWIE Gaming mouse: Latest  1000Hz, Average  1000Hz
Kingsis Peripherals ZOWIE Gaming mouse: Latest  1000Hz, Average  1000Hz
Kingsis Peripherals ZOWIE Gaming mouse: Latest  1000Hz, Average  1000Hz

And the movement of the mouse pointer was smooth as butter.

the only thing changed is the usb port and because the mouses work with windows at 1000hz on all my usb ports, it's therefore clear that the problem lies with the specific kernel driver. Especially when there's a bug reported years ago exactly about that.

edit: keep in mind that I tested it with 3 different mouses (zowie fk2, razer deathadder 3.5g and steelseries sensei raw) and had the exact same results.

Last edited by Nektarios (2015-05-12 18:28:33)

Offline

#7 2015-05-12 18:25:11

Nektarios
Member
Registered: 2013-02-19
Posts: 90

Re: [FOUND WORKAROUND] Mouse input microstuttering at 1000hz

nomorewindows wrote:

Don't forget to mark as solved, but not sure why it works in Windows and not in Linux.

How can I mark it as solved?

Offline

#8 2015-05-12 18:27:18

mouseman
Member
From: Outta nowhere
Registered: 2014-04-04
Posts: 268

Re: [FOUND WORKAROUND] Mouse input microstuttering at 1000hz

Nektarios wrote:

How can I mark it as solved?

You can edit the first post and add [Solved] to the subject line.

I'll check your tests myself too see if I see the same behavior with my mouse.

Offline

#9 2015-05-12 18:29:28

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,240

Re: [FOUND WORKAROUND] Mouse input microstuttering at 1000hz

Nektarios wrote:
nomorewindows wrote:

Don't forget to mark as solved, but not sure why it works in Windows and not in Linux.

How can I mark it as solved?

Go to original post and change title.

Nektarios wrote:

the only thing changed is the usb port and because the mouses work with windows at 1000hz on all my usb ports, it's therefore clear that the problem lies with the specific kernel driver. Especially when there's a bug reported years ago exactly about that.

Some usb ports run at different speeds.  Some are 1.0, 1.1, 2.0.  Just a look at lsusb generally gives an idea how many you have of each one.  And lsusb -v I think expands on whether the device is plugged into one port or another.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#10 2015-05-12 18:35:04

Nektarios
Member
Registered: 2013-02-19
Posts: 90

Re: [FOUND WORKAROUND] Mouse input microstuttering at 1000hz

nomorewindows wrote:

Go to original post and change title.

thanks.

Some usb ports run at different speeds.  Some are 1.0, 1.1, 2.0.  Just a look at lsusb generally gives an idea how many you have of each one.  And lsusb -v I think expands on whether the device is plugged into one port or another.

All my USB ports work at 1000hz on Windows 7 64bit so it's not a hardware problem.

I tried lsusb but it's a lot of info, and I can't seem to get make it of some use. It doesn't say which device is plugged to which hub. I'll have to find another way to find out that.

Offline

#11 2015-05-14 22:25:36

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [FOUND WORKAROUND] Mouse input microstuttering at 1000hz

Can you please *remove* the solved label? There is no patch to fix the bug.

Offline

#12 2015-05-14 22:26:28

Nektarios
Member
Registered: 2013-02-19
Posts: 90

Re: [FOUND WORKAROUND] Mouse input microstuttering at 1000hz

brebs wrote:

Can you please *remove* the solved label? There is no patch to fix the bug.

OK, you're right.

Offline

#13 2015-05-14 23:04:03

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [FOUND WORKAROUND] Mouse input microstuttering at 1000hz

I suppose the closest patch we have is mouse polling at only half rate on ohci_hcd.

Edit: Found better URL, showing full patch.

Last edited by brebs (2015-05-15 17:10:29)

Offline

Board footer

Powered by FluxBB