mirror of
https://github.com/pikvm/pikvm.git
synced 2026-03-02 18:16:56 -05:00
Absolute mouse position buggy under Windows 98 #130
Labels
No labels
component:documentation
help wanted
resolution:delayed
resolution:duplicate
resolution:fixed
resolution:invalid
resolution:rejected
resolution:wontfix
success story
type:bug
type:bug
type:feature
type:question
type:question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/pikvm-pikvm#130
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mnotgninnep on GitHub (Jan 23, 2021).
Originally assigned to: @mdevaev on GitHub.
Describe the bug
Under Windows 98, absolute mouse position (tablet control) is buggy and scaled to 50% of what it should be and is therefore restricted to the top left quarter of the screen. This affects both pi and arduino control. Relative mouse works ok but absolute would be prefered. Windows 98 needs different coordicates (doubled?). This does not appear to be resolution dependent. Control of other OSs is fine.
Virtualbox have documented the same issue here and produced a workaround with a setting change: https://www.virtualbox.org/manual/ch12.html#ts_win98-guest-usb-tablet-coordinates
To Reproduce
Steps to reproduce the behavior, like:
Use absolute mouse mode from either Pi or Arduino with a Windows 98 computer.
Expected behavior
In absolute mouse mode, the host mouse should exactly follow the client mouse.
Screenshots


Desktop (please complete the following information):
Pi-KVM info:
kvmd-platform-v2-hdmi-zerow 2.13-1
kvmd-webterm 0.35-1
@mnotgninnep commented on GitHub (Jan 23, 2021):
SilentLennie posted this in discord from VirtualBox which should help. I don't know what to do with it sorry.
SilentLennieToday at 12:02
@mikeyp here is the code which handles the Windows 98 USB tablet correction: https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Devices/Input/UsbMouse.cpp#L211
just look for u8CoordShift in the file
So I guess it's these: https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Devices/Input/UsbMouse.cpp#L1377
https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Devices/Input/UsbMouse.cpp#L1491
@mdevaev commented on GitHub (Jan 23, 2021):
Funny bug. I have no chance of getting Windows 98 working right now, but I can try to fix it remotely on your Pi and then make a patch in the release. Contact me at Discord.
@mnotgninnep commented on GitHub (Jan 23, 2021):
Awesome, yeah, not worth setting up a Win98 machine. I'll get setup for you to get on. Look for a message from mikeyp. Thank you. :-)
@mdevaev commented on GitHub (Aug 14, 2021):
I'm sorry it took so long, but I did it anyway :) The fix for v2/OTG will be ready in the next release, I will build it within half an hour. Use these parameters in
/etc/kvmd/override.yaml:@mdevaev commented on GitHub (Aug 14, 2021):
Also for arduino: https://github.com/pikvm/pikvm/blob/master/pages/arduino_hid.md#fixing-the-usb-absolute-mouse-on-windows-98
@mdevaev commented on GitHub (Aug 14, 2021):
@mnotgninnep Let me know if you want dynamic switching between the regular absolute mode and fixed absolute mode in the web UI.
@mdevaev commented on GitHub (Aug 14, 2021):
I could do this for Arduino HID, but I need a good reason because the number of available flags in the protocol is limited.
@mnotgninnep commented on GitHub (Aug 14, 2021):
I've just built and flashed the image. I'll test it later tonight and get back to you. Thank you again for this. If it works, the option to change it in the GUI would be amazing please. I see no reason to add it to the arduino. Random thought but if you're short of flags, could you manipulate the coordinates before they're sent to the arduino rather than changing the arduino itself?
@mdevaev commented on GitHub (Aug 14, 2021):
Unfortunately not. The final coordinates are calculated on the arduino side, this was laid down in the protocol. On the one hand, this ensured compatibility between all firmware versions, but in the case of win98 this became a problem. I'll think about how best to deal with this/
@mnotgninnep commented on GitHub (Aug 14, 2021):
Thank you again for this. I can confirm that with the above edit to /etc/kvmd/override.yaml, this works flawlessly in OTG mode. The ability to switch it in the GUI would be greatly appreciated please but I can live with editing it via SSH for now. The only thing I will need the arduino for now will be PS2 only machines.
@jeremyherbert commented on GitHub (Jun 7, 2023):
I am having trouble enabling this feature. I have the top quarter problem on windows 98, and my
/etc/kvmd/override.yamlfile contains the following:I have tried a systemctl restart as well as a full reboot, but it doesn't appear to have fixed the problem. Am I doing something wrong here? My version is:
KVMD: 3.199
Streamer: 5.37 (ustreamer)
HAS_PDEATHSIG: Yes
WITH_GPIO: Yes
WITH_PTHREAD_NP: Yes
WITH_SETPROCTITLE: Yes
WITH_SYSTEMD: Yes
Linux kernel:
Machine: armv7l
Release: 5.15.68-3-rpi-ARCH
Version: #1 SMP Mon Oct 31 20:56:54 MSK 2022
@jeremyherbert commented on GitHub (Jun 7, 2023):
@mdevaev it seems this is a regression in master: https://github.com/pikvm/kvmd/blob/master/kvmd/plugins/hid/otg/mouse.py
If I manually add the
<< 1into themouse.pyfile on my system in__make_report, ieIt works correctly on win 98. But it seems there is no code to do this anymore in the master branch.
@mdevaev commented on GitHub (Jun 7, 2023):
@jeremyherbert this code is right here: https://github.com/pikvm/kvmd/blob/master/kvmd/plugins/hid/otg/events.py#L119
Did you try this? https://docs.pikvm.org/mouse/#fixing-the-absolute-mouse-on-windows-98
@jeremyherbert commented on GitHub (Jun 7, 2023):
Thank you, I did indeed miss that code. But yes, I did try the adjustment in the docs (my override.yaml is in the earlier post) but it did not work until I hardcoded the shift in.
@mdevaev commented on GitHub (Jun 7, 2023):
Please attach the entire override file and output of the
kvmd -mcommand.@jeremyherbert commented on GitHub (Jun 7, 2023):
Thanks for your help. My full override file is the lines pasted above - there isn't anything else. Below is the output of that command:
@mdevaev commented on GitHub (Jun 7, 2023):
Ah. I forgot about one thing. Win98 mod depends from relative mouse. Use this:
After that you will get 3 buttons in the system menu. Switch it to Abs-Win98:

@jeremyherbert commented on GitHub (Jun 8, 2023):
Thank you! That fixed it.
@mdevaev commented on GitHub (Jun 8, 2023):
👌