No internet connection
  1. Home
  2. Technical Support

emulated mouse options?

By @khmann
    2022-09-21 21:06:51.648Z

    I'm using a tinyPilot Voyager 2 with an Iogear KVM switch. The KVM does not support the absolute positioning HID that tinyPilot presents; the cursor just freaks out all over the screen of whatever machine I connect to, which can be a little dangerous in some situations! The keyboard operation is literally perfect though, and since most of our use-case is outside the GUI it's not the end of the world.

    I understand that a "relative positioning" HID is not a straightforward issue, so I wonder if I could just disable the mouse interface entirely? The keyboard works fine, so we could always enable "mouse-keys" and alt-tab around if necessary.

    Any other tricks like changing mouse protocols or other workaround, suggestions appreciated too... Thanks!

    • 4 replies
    1. Diego @diego
        2022-09-22 10:54:46.291Z

        Hello @khmann - Thank you for reporting this. And I'm sorry you are having issues.

        • Would it be possible for you to upload logs for me to review? This is how you would upload them: TinyPilot web interface > System > Logs > Get Shareable URL (copy the URL it will give you and paste it in your response).

        • Can you give me more info about the KVM switch you're using? We have had users in the past, reporting issues with mouse and/or keyboard, when a KVM switch is in the middle of the target computer and the TinyPilot. It would helo a lot if you could provide more information about the KVM switch in your setup.

        1. K@khmann
            2022-09-22 13:22:03.412Z2022-09-22 17:21:55.820Z

            Dude, I'm delighted to help in any way, I'll upload logs after this message. The KVM switch in question is an Iogear GCS1808, https://www.iogear.com/product/GCS1808KITUTAA/ a VGA/USB/PS2 switch that connects directly to 8 PCs and will cascade to additional units.

            Backstory: For the last 20 years I've worked in the "PC repair" industry, where essentially you plug and unplug random PCs all day long and switch between them with a KVM. The company spent a lot of money on KVM solutions to optimize technician workflow, and the Iogear (ATEN) VGA/USB switches were consistently the best - ie: they just worked, always, though StarTech was a very close second (and is slightly easier to use). Even 10 years after HDMI started appearing in PCs though, there still weren't any good HDMI switches at a reasonable price point, but that didn't matter because most machines still had VGA, though later we used a fair number of HDMI>VGA converters as well.

            Anyway, I've got one of those KVMs hooked to a tinyPilot locked away in a datacenter, with a VGA Y-splitter cable to connect a local monitor for when we need to work in the rack. Initially we connected tinyPilot using your VGA>HDMI converter and it worked quite well with all 6 of our SuperMicro servers through the boot sequence. The FreeBSD boxes come up fine as do the Macs. The 4 Ubuntu machines look identical to that image that other guy posted in that other thread (sorry, I'm really co-mingling things here). I was able to fix one by messing with the boot parameters, but the other machines just can't be rebooted.

            Regardless, the Iogear KVM works absolutely flawless though tinyPilot. You press the hotkey on your local keyboard (control control in my case) and the OSD pops up and lets you switch machines. It seemingly never glitches - except while the HDMI is syncing - ie: everytime the resolution changes, hence why I replaced your VGA>HDMI converter with an automatic VGA>HDMI scaler so that the video feed to the tinyPilot would stay constant 1280x720p.

            The Iogear keyboard/mouse sharing acts directly as a USB (or PS/2) hub/host to whatever HID you connect. This controls the switching menu, and then it creates proxy devices for whatever machine you connect to. It definitely has some form of USB storage/whatever device passthrough, but I haven't really used it.

            The problem in this case is the KVM just doesn't understand the mouse that the tinyPilot offers; it just twitches around the KVM menu screen, and then whatever machine you connect to. If I plug a "normal" USB mouse in at the same time, it works fine (you can plug multiple multiple USB and PS/2 input devices in simultaneously and they all seem to work... I love this KVM!)

            It might be as simple as just changing the USB vendor or productID that the tinyPilot presents, in order to get the KVM to pass-thru (or ignore) that USB sub-device instead of processing it.

            The KVM does have an additional USB port that passes everything through directly to the selected host, but that port won't activate or control the switching menu. One of my fallback-ideas was to build one of those arduino-PS2-HID things from the piKVM project and use that just to control the KVM switching menu, or, ugh... 8 USB relays that "push" the front panel buttons on the KVM itself.

            thanks for your insight, i think the TLDR synopsis is "how do I tweak the mouse? ; )"

            1. David @david2022-09-23 16:35:12.288Z

              Thanks for all the detail @khmann!

              If you're happy with just disabling the mouse, you can do that by running the following command:

              sudo sed --in-place "s/MOUSE_PATH = '\/dev\/hidg1'/MOUSE_PATH = '\/dev\/null'/" /opt/tinypilot/app_settings.cfg && \
              sudo sed --in-place "/tinypilot_mouse_interface/d" /home/tinypilot/settings.yml && \
              echo "tinypilot_mouse_interface: /dev/null" | sudo tee --append /home/tinypilot/settings.yml && \
              sudo service tinypilot restart
              
              1. K@khmann
                  2022-09-26 13:14:12.943Z

                  Yeah man!

                  At least now I can shadow sessions on our Macs without accidentally clicking and dragging all over the place. I'm sure you guys already have relative-HID on your roadmap, and I'm not in any particular rush. This was perfect, thankyou!