VirtualBox

Ticket #17446 (new defect)

Opened 3 years ago

Last modified 3 years ago

Multiple pointing device reported when choosing USB Multi-Touch Tablet

Reported by: Cyrrus30 Owned by:
Component: other Version: VirtualBox 5.2.2
Keywords: Cc:
Guest type: other Host type: Windows

Description

I'm running Android x86 in VirtualBox (I know, it is not a supported guest), on a Windows host, running on a machine with a touch screen. I'm trying to have a proper touch behavior in the virtual machine, ideally without having to forward the USB device of the touch screen to the VM (this is causing issues where the USB driver would eventually detach itself and stop responding. But this is not the point of my post).

I've tried the differents "Pointing device" of the "System/Motherboard" settings tab. At first none of them seemed to give me the expected behavior in my host, but then I realized something:

If I enable USB Tablet, I can check from the Android command line (running the "dumpsys input" command) that this particular input device is present:

7: VirtualBox USB Tablet

Classes: 0x800000004 Path /dev/input/event3 [...]

However, it doest not behave like a proper touch screen.

If I enable USB Multi-Touch Tablet, the touch seems broken too. But if I inspect the available input devices in Android, I can see that both devices are present:

  1. VirtualBox USB Multi-Touch

Classes: 0x80000014 Path: /dev/input/event4 [...]

  1. VirtualBox USB Tablet

Classes: 0x800000004 Path /dev/input/event3 [...]

After inspecting the touch events in the Android guest, I realized that the presence of both devices is the cause of my incorrect touch behavior. When I touch the screen, the Virtual Box Multi-Touch device reports the event, but as soon as I move my finger around, the touch is "intercepted" by the VirtualBox USB Tablet device.

To confirm that, I deleted the /dev/input/event3 file (the one mapped to the VirtualBox USB Tablet device). After that everything was correct. The touch screen was working properly and only the proper device was handling the touch.

So, I think there is an issue with the actual pointing devices when choosing VirtualBox USB Multi-Touch tablet. VirtualBox USB Tablet shouldn't be reported by the guest OS in that case.

Change History

comment:1 Changed 3 years ago by socratis

comment:2 Changed 3 years ago by michael

I don't think that anyone on the team is likely to find time to look at this. If you want to do so yourself though, the code file which will need changing is most likely src/VBox/Main/src-client/MouseImpl.cpp. It is not terribly pretty, but at least finite. However we would not accept any patches unless we were confident that you or someone else had tested them well enough on various Windows and Linux guest systems to know that anything working before is still working after. Things which work better after are a bonus of course. In theory we prefer this sort of change to be made and tested against development code, but I don't think anything has changed there since 5.2.4, so working against the source of that should be good enough.

comment:3 follow-up: ↓ 4 Changed 3 years ago by Cyrrus30

Thanks for the reply.

Just to add more information (for whoever will take a look at this), I tested the same scenario, but using a Windows 10 guest (on a Windows 10 host), since Android is not officially supported, and I'm observing the exact same behavior.

Selecting "USB Multi-touch" in the VM settings shows some weird behavior in the Windows guest. In the device manager, I can see two devices: USB Multi-Touch 'and USB Tablet.

Again, deleting the "USB Tablet" device fixes the multi-touch issues in the guest.

So this problem is not specific to Android guest.

comment:4 in reply to: ↑ 3 Changed 3 years ago by socratis

Replying to Cyrrus30:

Selecting "USB Multi-touch" in the VM settings shows some weird behavior in the Windows guest.

Can you clarify that a little bit? I'm going to try and replicate what you're seeing, but I got to know what you're seeing... ;)

comment:5 Changed 3 years ago by Cyrrus30

When I select USB Multi-touch, in Windows guest I can see that there is a cursor displayed, and only on my first touch. The second touch (the second finger touching the screen) does not move the cursor. In multi touch mode, I don't think that there should be any cursor. If I compare with my host Windows, (which is the same Windows version as my guest), it does not show any cursor (the device I'm running it on is obviously a touch screen device).

If I try to open google maps and pinch to zoom, it does not work well. It either move the map or zoom in a way that does not make sense.

On the other hand, if I delete the "USB Tablet" device that's showing in the device manager (the one that I think shouldn't be present), then the behavior in the guest becomes the same as my host Windows. No cursor shown, and Google maps pinch to zoom works properly.

I hope it was clear, tell me if you need more explanations / clarifications.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use