Closed tristanpemble closed 4 years ago
changing the libvirt input from "mouse" to "tablet" fixes the mouse movement (but breaks mouse clicks etc being in absolute movement mode)
Thank you for the report. If I understand correctly the device is able to work with different DPI settings. Several questions:
there's been a new development. I can set the mouse to different polling rates. as you lower the polling rate, the problem becomes more easily reproducible, and I can reproduce at the lowest DPI. at the highest polling rate, it becomes more difficult to reproduce, and is only reproducible at higher mouse speed on higher DPIs.
here's a totally subjective table of the speed of mouse movement required for reproducibility. n/r
means not reproducible, i.e. I couldn't move my arm fast enough to do it.
125hz | 500hz | 1000hz | |
---|---|---|---|
400 dpi | high | n/r | n/r |
800 dpi | medium | high | n/r |
1600 dpi | low | medium | high |
3200 dpi | lowest | low | medium |
-device virtio-mouse-pci,id=input2,bus=pci.0,addr=0xb \
-object input-linux,id=mouse1,evdev=/dev/input/by-id/usb-Kingsis_Peripherals_ZOWIE_Gaming_mouse-event-mouse \
and I noticed that movement when defining it as a tablet does not reproduce in any case:
-device virtio-tablet-pci,id=input2,bus=pci.0,addr=0xb \
-object input-linux,id=mouse1,evdev=/dev/input/by-id/usb-Kingsis_Peripherals_ZOWIE_Gaming_mouse-event-mouse \
I also tried adding an entry to local HWDB as described here and saw no change in behavior.
~ λ udevadm info /dev/input/event3 | grep MOUSE_DPI
E: MOUSE_DPI=400@500 800@500 1600@500 3200@500
I know basically nothing about mouse drivers, libinput or evdev. however, given the large differences in event values in the output I am seeing, the sort of "oscillating" behavior of the mouse when it is happening, and the fact that this happens at higher polling and DPIs -- this feels like some kind of overflow error.
@tristanpemble Can you please provide the output of 'evtest /dev/input/event3'?
yes, I believe the values are overflowing at this typecast to UCHAR
edit: maybe not exactly there, but I see value represented as UCHAR throughout the file
Hey I just want to jump in on this thread and comment I ran into the same issue, and @tristanpemble DPI to polling rate table seemed to line up with my results as well
win8-64-fixed.zip Finally getting to it (better than never) Please confirm the attached driver solves the problem (test mode required to install it, i.e. "bcdedit /set testsigning on" + reboot) The driver is good for x64 win8+
the fix was released in build 175, please reopen if needed
I would like to ask for a re-open. The current fix is simply clamping the input, but the correct solution would not lose the relative input information. The implementation should probably generate multiple HID events (with some sane upper limit) for such an overflow case. Since UCHAR is windows-specific (HID) limitation, I think doing it on hypervisor/libinput level would not be quite right.
I find this issue hard to describe so I made a video to demonstrate.
Essentially, with my mouse set to 1600 DPI, when I move it quickly enough, the mouse will "rubber band" left and right, instead of moving only rightward.
I've tried several configurations, and this only happens when I am using the virtio device with evdev, so I believe it is related to this driver.