VirtualBox

Ticket #14632 (closed defect: fixed)

Opened 2 years ago

Last modified 4 weeks ago

Double click not working with precision touchpad -> believed fixed in releases greater than 5.1.24

Reported by: matias-uy Owned by:
Priority: major Component: guest control
Version: VirtualBox 5.0.4 Keywords: touchpad precision double click
Cc: martingonchi Guest type: all
Host type: Windows

Description

Hi! Im using an Acer Aspire Nitro v17 (VN7-791G-76Z8) which has Precision Touchpad (the new touchpad standard which enables to use all Windows 10 gestures). Im using VirtualBox 5.0.4 with 5.0.4 extensions and Windows 10 x64 Home as Host and Windows 7 x86 as guest (the same error happens in Windows x64 as guest). The problem is that when using the touchpad, I cannot use double click in the guest but I have to do 3 clicks instead to get the double click effect (trust me, that extra click annoys me a lot). If I use a standard mouse, there is not problem.

Attachments

xev.log Download (10.1 KB) - added by martingonchi 6 months ago.
Log of the triple tap event over a folder in ubuntu
main.e.l3.log Download (173.4 KB) - added by bored 6 weeks ago.
e.l2.f.log Download (130.7 KB) - added by bored 6 weeks ago.
main.e.l3.usb.log Download (180.0 KB) - added by bored 6 weeks ago.
dev_kbd.e.l3.f.usb.log Download (125.0 KB) - added by bored 6 weeks ago.
e.l2.f.usb.log Download (124.5 KB) - added by bored 6 weeks ago.
evtest.png Download (32.5 KB) - added by bored 6 weeks ago.
dev_kbd.e.l3.f.log Download (98.8 KB) - added by bored 6 weeks ago.

Change History

comment:1 Changed 23 months ago by frankb

The same problem on a Surface Pro 3 with type cover:

double clicking (effectively clicking the touchpad) works, double tap on the touchpad however does not result in a double click on the guest vm, 3 taps do result in a double click on the guest vm.

A slow double tap does result in a double click as well on the guest vm.

Expected behavior would be that a double tap translates into a double click on the guest vm.

I'm using vbox 5.06 on a W10 Pro host (surface Pro 3)

Last edited 23 months ago by frankb (previous) (diff)

comment:2 Changed 23 months ago by matias-uy

I wanted to say double tap, no double click! Thanks Frank! Double click with the touchpad works properly but double tap does not.

comment:3 follow-up: ↓ 6 Changed 21 months ago by LoveMyLabs

Same issue on Dell Inspiron 17 5000 with precision touchpad. using VirtualBox 5.0.10 with 5.0.10 extensions and Windows 10 x64 Home as Host and Windows 7 x86 as guest.

comment:4 Changed 21 months ago by michael

Are you sure this is not a guest issue? I spent months after upgrading Ubuntu on my physical system with (single) click half broken before I realised that it was to do with the length of time I held down the button. Might this be similar?

comment:5 Changed 21 months ago by frankb

It is definitely a host issue and continues to exist with VB 5.0.10

comment:6 in reply to: ↑ 3 Changed 20 months ago by mulpac

Also experiencing problem with double tap using VirtualBox 5.0.12 with 5.0.12 extensions and Windows 10 x64 Home as Host and Linux x64 as guest. However, in my case, both double and triple tapping just yields a single click. However it is possible to send a double click by double tapping on two different spots of the touch pad. It works as expected in the host system, and it was working in VirtualBox 4.x, but that version unfortunately was broken by a Windows update.

Last edited 20 months ago by mulpac (previous) (diff)

comment:7 Changed 19 months ago by attila77

+1

The same problem:
Dell Inspiron 5558
VirtualBox 5.0.14
Windows 10 host
Linux Mint 17.3 guest

Pretty annoying, would be very happy to see a solution.

comment:8 Changed 19 months ago by vm_newbie

Mine has the same problem
Surface Pro 4
Virtualbox version: VirtualBox 5.0.14
Host: Windows 10 x64
Guest: Windows 7 x32 / x64 or ubuntu-14.04.2-desktop-i386

Also, the scale factor feature has problem too.

After setting "Pointing system" to use "Multi-touch Tablet" mode and sacle the vm window to 200%, if I use the touchscreen as input, the coordinate distance of VM mouse cursor seems doubled from the top left corner. Should I raise an extra flag for reporting this?

comment:9 Changed 16 months ago by boarder2

Having a problem with this on all guests with a Win 10 host and Surface Pro 4 with keyboard.

Incredibly frustrating.

VirtualBox 5.0.20

Last edited 16 months ago by boarder2 (previous) (diff)

comment:10 follow-ups: ↓ 11 ↓ 12 Changed 16 months ago by frank

I don't expect a fix in the near future as we don't have such a Surface tablet available for testing.

comment:11 in reply to: ↑ 10 Changed 15 months ago by boarder2

Replying to frank:

I don't expect a fix in the near future as we don't have such a Surface tablet available for testing.

Is there any logging we can enable to try to help diagnose the issue? This is a breaking bug of fundamental functionality.

comment:12 in reply to: ↑ 10 Changed 15 months ago by vm_newbie

Replying to frank:

I don't expect a fix in the near future as we don't have such a Surface tablet available for testing.

According to mulpac, I tried this:
However it is possible to send a double click by double tapping on two different spots of the touch pad.
and it works. Could it be a hint?

PS: using version 5.0.14

Last edited 15 months ago by vm_newbie (previous) (diff)

comment:13 Changed 15 months ago by frankb

a triple tap acts as a double tap ; note that there is a difference between tapping & clicking. clicking effectively makes te touchpad click , tapping does not. Double clicking does work, double tapping does not; very annoying...

comment:14 Changed 14 months ago by matias-uy

Double tap still not working in any laptop with precision touchpad I've tested

comment:15 Changed 13 months ago by WildByDesign

I am experiencing this precision trackpad issue as well. In my case, on an Acer Aspire E 11 (ES1-111-C1MX).

I have found a temporary workaround for the time being. Spacing the double-tap out just slightly works well. Tap once - split second pause - Tap second time to complete double-tap. Think of your typical double-tap which is quite fast, and simply add a small pause in between. It takes a bit to get used to it but it does work everytime. The only problem is that you have to get used to double-tapping quick again once back in the host machine.

Hopefully this is something that can be resolved since these precision trackpads are quite widespread. I assume this is firmware related. I wonder if somehow VirtualBox can either emulate this firmware functionality or potentially even disable the precision trackpad functionality within the guest OS.

Disabling the Advanced trackpad functionality in the UEFI/BIOS allows VirtualBox guest OS trackpad to function correctly. However, that downgrades host OS trackpad functionality as a side effect.

comment:16 follow-up: ↓ 17 Changed 13 months ago by michael

Just a wild guess: does stopping the process VBoxTray in the guest make a difference?

comment:17 in reply to: ↑ 16 Changed 13 months ago by WildByDesign

Replying to michael:

Just a wild guess: does stopping the process VBoxTray in the guest make a difference?

Unfortunately not, no. I followed your suggestion by killing the VBoxTray process and it made no difference. I also tried experimenting between the USB Tablet option and the USB Multi-touch option and the problem persists regardless.

comment:18 Changed 7 months ago by matias-uy

The only thing I could find out is that the problem is caused by the Extension Pack. Before installing the guest addition extension pack, it works fine, but after installing it, the double tap stops working and have to triple tap to get double tap.

comment:19 Changed 7 months ago by matias-uy

I also found out that this problem also happens in Ubuntu as a guest. In summary, it seems that this problem happens in any computer with precision touchpad with guest additions extension pack installed. Please, can you fix this as soon as possible? it forces me to use an USB mouse, which bothers me a lot

comment:20 Changed 6 months ago by matias-uy

In the last 2 comments I made a mistake in the explanation: it has nothing to do with the Extension Pack but Guest Additions. It is after installing Guest Additions in the guest OS that this problem appears.

comment:21 Changed 6 months ago by michael

I have an idea what might be causing this, though sadly not about a good way to solve it. Can someone who can reproduce this with a Linux guest please do an xev trace of the pointer event (position, button clicks) sequences which occur in the guest when a double tap is successfully and when it is not? If you feel able to filter out non-useful information from the traces please do, but please be clear about what you remove.

comment:22 Changed 6 months ago by michael

  • Cc martingonchi added
  • Guest type changed from Windows to all

Changed 6 months ago by martingonchi

Log of the triple tap event over a folder in ubuntu

comment:23 Changed 6 months ago by martingonchi

I've attached the xev.log on ubuntu 16.04. The same problem happens but in Ubuntu it happens even without guest additions installed (I did a fresh ubuntu installation and then just ran xev > xev.log on the terminal). Thanks Michael!

comment:24 Changed 6 months ago by michael

I assume that you took that log when the problem occurred. It shows what I suspected: the machine sees two mouse clicks, but with no movement in-between.

comment:25 Changed 6 months ago by michael

In comment:6, mulpac said that this did not happen with 4.x releases. Could other people please compare? And I would be interested if people could compare xev traces in cases where the double click is passed through and in cases where it is not.

comment:26 Changed 6 months ago by martingonchi

In my case, triple tap worked fine in Win10x64 host and ubuntu 16.04 x64 guest (without guest additions), but double tap did not.

Last edited 6 months ago by martingonchi (previous) (diff)

comment:27 Changed 6 months ago by michael

I can generate a very similar trace (both movement and timing) with my standard mouse, an Ubuntu 16.10 host and a Fedora 25 guest. But the guest recognises the double click. So someone will need to work out what the critical factor is. The wiki page on mouse input debugging<1> might help. But I think it is rather unlikely that anyone on the development team will be able to spend more time on this unless affected users can analyse it thoroughly.

  1. https://www.virtualbox.org/wiki/MouseInput

comment:28 Changed 7 weeks ago by bored

Hi,

So I also have this problem (triple tap works, double doesn't) on an Elantech touchpad on a Lenovo as well, on every guest (5.1.22) on a Windows 8.1 host. I even tried removing Guest Additions on the Ubuntu guest and as others have noted, nothing changed.

This is in contrast with the double-*click* on the touchpad, which works fine. The weird thing is, using Spy++ on Windows, I don't see any difference in the clicks, so I'm not sure how these could be getting processed differently.

Running xev shows that the second tap is simply not detected by the guest at all, UNLESS the delay between them is long enough that the host sees them as two individual clicks, but the guest sees them as double clicks. Otherwise, it simply doesn't see the second tap of the double-tap.

I ran Spy++ on this and the only difference I could see in the mouse messages was that a true double-*click* results in a WM_MOUSEMOVE in between the WM_LBUTTONUP and subsequent WM_MOUSEACTIVATE messages, whereas a double-*tap* seems to skip that: https://i.imgur.com/Fvq2Xxj.png I have no idea if this is triggering different behavior in VirtualBox, but I can't see how else it would be able to tell the difference, unless it's reading mouse inputs differently (e.g. using raw input) -- is it?

Otherwise, is there some better way I can help diagnose this? Thanks.

(Note that I cannot run later copies of version 4 because of the hardening bug https://www.virtualbox.org/ticket/13187 but 4.3.12 doesn't exhibit this bug, and xev detects two keypresses there.)

Last edited 7 weeks ago by bored (previous) (diff)

comment:29 follow-ups: ↓ 30 ↓ 31 Changed 6 weeks ago by michael

bored, did you try to get logging as described in the comment above yours?

comment:30 in reply to: ↑ 29 Changed 6 weeks ago by bored

Replying to michael:

bored, did you try to get logging as described in the comment above yours?

Hi michael,

If you mean running xev to test a correctly-working double-click -- yes, I tried it with a simple double-click on my touchpad, and it is registered as a pair of ButtonPress-ButtonRelease pairs. And as mentioned earlier, a double-tap on my touchpad only registers the first pair, not the second one.

I think an xev test would be far less helpful than a Spy++ log on the host, however. The problem is not with the guest; it is with the host, and it occurs on all guest OSes. It really does seem to be the lack of WM_MOUSEMOVE on the host, which VirtualBox is processing differently on v5 compared to v4. Do you know of any difference in the mouse processing on Windows? If you know of any set of particular commits you could point me to, it is very likely I would be able to narrow down the lines for you.

Thanks!

comment:31 in reply to: ↑ 29 Changed 6 weeks ago by bored

Replying to michael:

bored, did you try to get logging as described in the comment above yours?

Also, if you'd like to see what the log generates, it is completely uninteresting, which is why I have merely described it instead of including a copy, but I'll include it here anyway. A double-tap simply generates these:

ButtonPress event, serial 49, synthetic NO, window 0x3400001,

root 0x26b, subw 0x0, time 558112, (106,111), root:(1261,132), state 0x0, button 1, same_screen YES

ButtonRelease event, serial 49, synthetic NO, window 0x3400001,

root 0x26b, subw 0x0, time 558252, (106,111), root:(1261,132), state 0x100, button 1, same_screen YES

And a double-click generates these:

ButtonPress event, serial 49, synthetic NO, window 0x3400001,

root 0x26b, subw 0x0, time 645702, (98,108), root:(1253,129), state 0x0, button 1, same_screen YES

ButtonRelease event, serial 49, synthetic NO, window 0x3400001,

root 0x26b, subw 0x0, time 645763, (98,108), root:(1253,129), state 0x100, button 1, same_screen YES

ButtonPress event, serial 49, synthetic NO, window 0x3400001,

root 0x26b, subw 0x0, time 645834, (98,108), root:(1253,129), state 0x0, button 1, same_screen YES

ButtonRelease event, serial 49, synthetic NO, window 0x3400001,

root 0x26b, subw 0x0, time 645925, (98,108), root:(1253,129), state 0x100, button 1, same_screen YES

As you can see, there is nothing interesting. It's just the same kind of click, produced either once or twice.

comment:32 follow-ups: ↓ 33 ↓ 35 Changed 6 weeks ago by michael

I meant particularly the host logging described in the "Main" and Virtual Devices sections.

comment:33 in reply to: ↑ 32 Changed 6 weeks ago by bored

Replying to michael:

I meant particularly the host logging described in the "Main" and Virtual Devices sections.

Oh, do you mean you'd specifically like me to install VB on an Ubuntu host and try again? If I understand what you need correctly, the screenshot in my initial email was the equivalent of the log you're requesting, but on a Windows host. I can try to get this on an Ubuntu host via xev, but I didn't expect that might make a difference.

comment:34 follow-up: ↓ 36 Changed 6 weeks ago by michael

No, you can get the logging on any host. You just need to be able to run VirtualBox with the environment variables set. The screenshot you posted was not quite equivalent - it was from further up the chain. You saw that the host logging and xev logging inside the guest differed. The Main and Device logging are both stages in-between in the message processing.

comment:35 in reply to: ↑ 32 Changed 6 weeks ago by bored

Replying to michael:

I meant particularly the host logging described in the "Main" and Virtual Devices sections.

Never mind my last email, sorry for the confusion -- I think I understand what you're looking for, I'll report it back here as soon as I can.

Changed 6 weeks ago by bored

Changed 6 weeks ago by bored

comment:36 in reply to: ↑ 34 Changed 6 weeks ago by bored

Replying to michael:

No, you can get the logging on any host. You just need to be able to run VirtualBox with the environment variables set. The screenshot you posted was not quite equivalent - it was from further up the chain. You saw that the host logging and xev logging inside the guest differed. The Main and Device logging are both stages in-between in the message processing.

Hi Michael,

I added all the logs that I think you were asking for. Things I redacted included the profile paths, and some of the system information dumps (CPUID and the stuff that came before it, OpenGL information, MAC addresses in my VMs, DMI information, etc.) that didn't seem relevant.

The sequence of actions I took were to boot the Ubuntu 16.04 x64 ISO on a Windows 8.1 x64 host, and after it boots, move the mouse around, double-tap the folder shortcut on the desktop, observe that nothing happens, double-click the same icon, observe that the window opens, close it, double-tap it again, observe that nothing happens, and then shut down the VM.

Do these contain the information you were looking for?

Thanks!

comment:37 follow-up: ↓ 38 Changed 6 weeks ago by michael

I see that with the double tap, the interval between the first button release and the second press is just over four milliseconds. I wonder what would happen if you re-installed the Additions and switched the pointing device configuration in the machine settings to "PS/2 mouse".

comment:38 in reply to: ↑ 37 Changed 6 weeks ago by bored

Replying to michael:

I see that with the double tap, the interval between the first button release and the second press is just over four milliseconds. I wonder what would happen if you re-installed the Additions and switched the pointing device configuration in the machine settings to "PS/2 mouse".

I believe the logs I sent were already for PS/2 mouse. The Ubuntu I booted was straight off the DVD image, and it seemed to have some variant of guest additions already installed, since it had mouse pointer integration as well as being the correct resolution of the window.

Could you let me know what you'd like me to do exactly? Are you saying I should install a fresh Ubuntu and install guest additions from the bundled CD image? The installation of Ubuntu I currently have is not really something whose guest additions I'd like to mess around with so let me know if you'd like me to make another installation and reinstall its guest additions. Also, do you mean you'd like another set of logs for those, or just a qualitative description of what happens? I believe every time I've installed or removed any variant of guest additions nothing has changed regarding the user-observable behavior, so it wouldn't fix the behavior or anything... but let me know if you specifically need those logs.

comment:39 follow-ups: ↓ 40 ↓ 41 Changed 6 weeks ago by michael

No need to install a fresh guest. I asked you to re-install the Additions because switching to the PS/2 mouse device without Additions installed will make you lose mouse integration. Not fatal, but annoying. From the log it looks to me as if you are using the USB tablet device. If I am wrong there though, could you try switching to that? And otherwise, as I asked, to the PS/2 mouse device. What I am trying to see is if this is a problem with the device implementation.

And installing or removing Additions is unlikely to make the problem go away, as the Additions only handle pointer position; button events are still sent through the PS/2 or USB mouse or tablet devices (if you understand what I mean).

comment:40 in reply to: ↑ 39 Changed 6 weeks ago by bored

Replying to michael:

No need to install a fresh guest. I asked you to re-install the Additions because switching to the PS/2 mouse device without Additions installed will make you lose mouse integration. Not fatal, but annoying. From the log it looks to me as if you are using the USB tablet device. If I am wrong there though, could you try switching to that? And otherwise, as I asked, to the PS/2 mouse device. What I am trying to see is if this is a problem with the device implementation.

And installing or removing Additions is unlikely to make the problem go away, as the Additions only handle pointer position; button events are still sent through the PS/2 or USB mouse or tablet devices (if you understand what I mean).

No, that was PS/2. Enabling the actual USB mouse adds "/USB/HidMouse" to the list of devices, which was absent there. I'll get you logs with USB input though I would be surprised if they help.

Changed 6 weeks ago by bored

Changed 6 weeks ago by bored

Changed 6 weeks ago by bored

comment:41 in reply to: ↑ 39 Changed 6 weeks ago by bored

Replying to michael:

No need to install a fresh guest. I asked you to re-install the Additions because switching to the PS/2 mouse device without Additions installed will make you lose mouse integration. Not fatal, but annoying. From the log it looks to me as if you are using the USB tablet device. If I am wrong there though, could you try switching to that? And otherwise, as I asked, to the PS/2 mouse device. What I am trying to see is if this is a problem with the device implementation.

And installing or removing Additions is unlikely to make the problem go away, as the Additions only handle pointer position; button events are still sent through the PS/2 or USB mouse or tablet devices (if you understand what I mean).

See new files attached.

comment:42 Changed 6 weeks ago by michael

Thank you. This time the interval between the first button release during the double tap is even shorter - 2.4ms - and I also less that the second button press is held for less than a millisecond. I assume that you see the issue with the USB device emulation too?

comment:43 Changed 6 weeks ago by michael

The short second button press was the case in the first log too.

comment:44 follow-up: ↓ 46 Changed 6 weeks ago by michael

And could you switch back to PS/2 and do a test inside the Linux guest using evtest on a virtual terminal?

comment:45 Changed 6 weeks ago by michael

And checking the output of /proc/interrupts (again, PS/2 device) before and after a double tap would be interesting too. You might want to do it a few times to be sure that you don't get any mouse movements in there by accident. "cat /proc/interrupts | grep 12.*i8042"

Changed 6 weeks ago by bored

comment:46 in reply to: ↑ 44 Changed 6 weeks ago by bored

Replying to michael:

And could you switch back to PS/2 and do a test inside the Linux guest using evtest on a virtual terminal?

Yeah, see the new attachment. I did a double-tap and then a double-click.

Replying to michael:

And checking the output of /proc/interrupts (again, PS/2 device) before and after a double tap would be interesting too.

I don't see any interrupts occurring when I tap or click. Are you sure I'm supposed to? (I/O APIC is enabled in case that is relevant)

comment:47 follow-ups: ↓ 48 ↓ 49 ↓ 50 Changed 6 weeks ago by michael

I'm afraid that I will not be able to update the instructions for a few days. You could try to adapt them for I/O-APIC yourself: leave off the "grep" and try to work out the right grep line by looking at the full /proc/interrupts output. The evtest output suggests that the event merging is happening either in the virtual device on the host side, or in the guest kernel, because it has already happened by the time it reaches the guest user-space event device.

comment:48 in reply to: ↑ 47 Changed 6 weeks ago by bored

(edit: sorry for the confusion, see below)

Last edited 6 weeks ago by bored (previous) (diff)

comment:49 in reply to: ↑ 47 Changed 6 weeks ago by bored

Replying to michael:

I'm afraid that I will not be able to update the instructions for a few days. You could try to adapt them for I/O-APIC yourself: leave off the "grep" and try to work out the right grep line by looking at the full /proc/interrupts output. The evtest output suggests that the event merging is happening either in the virtual device on the host side, or in the guest kernel, because it has already happened by the time it reaches the guest user-space event device.

Oh, sorry, I think I was confused about what that file is supposed to show. I thought it was supposed to list interrupts, but now I'm realizing it's just giving a count of the interrupts. Let me try it again then.

comment:50 in reply to: ↑ 47 Changed 6 weeks ago by bored

Replying to michael:

I'm afraid that I will not be able to update the instructions for a few days. You could try to adapt them for I/O-APIC yourself: leave off the "grep" and try to work out the right grep line by looking at the full /proc/interrupts output. The evtest output suggests that the event merging is happening either in the virtual device on the host side, or in the guest kernel, because it has already happened by the time it reaches the guest user-space event device.

Hi Michael,

Okay, so now that I realize what I'm looking at :-) I just tried this (I/O APIC is disabled at the moment) and I see the following for 12: i8042:

  • It does NOT change when I merely move the mouse
  • It does NOT change when I merely tap once (e.g. after typing) <--- I think this is critical
  • It increases by +8 when I move and *then* tap
  • It increases by +8 when I double-tap
  • It increases by +8 when I move and *then* double-tap
  • It increases by +16 when I move and *then* double-tap _slowly_ (so that it's recognized as a double-click by the guest, but likely as two single clicks by the host)
  • It increases by +16 when I double-click (with or without moving first)
Last edited 6 weeks ago by bored (previous) (diff)

comment:51 Changed 6 weeks ago by bored

Oh, on a second thought, the thing I just said might be critical is probably not critical -- it's normal behavior even outside of VirtualBox in Windows, so it can't explain the difference between older and newer VirtualBox versions' behaviors.

comment:52 follow-ups: ↓ 53 ↓ 54 Changed 6 weeks ago by michael

It would be interesting if you could look at the Main logs while the machine is running and compare the changes there to the changes in the number of interrupts, as you did a number of additional tests above. Movement is not sent over the PS/2 device when the Additions are installed, only button events.

comment:53 in reply to: ↑ 52 Changed 6 weeks ago by bored

Replying to michael:

It would be interesting if you could look at the Main logs while the machine is running and compare the changes there to the changes in the number of interrupts, as you did a number of additional tests above. Movement is not sent over the PS/2 device when the Additions are installed, only button events.

Main doesn't seem to show anything mouse-related on tap/click (or even typing or anything else). I only see unrelated events appended when I e.g. resize the window and the guest matches the resolution. Did you mean a different log?

comment:54 in reply to: ↑ 52 Changed 6 weeks ago by bored

Replying to michael:

It would be interesting if you could look at the Main logs while the machine is running and compare the changes there to the changes in the number of interrupts, as you did a number of additional tests above. Movement is not sent over the PS/2 device when the Additions are installed, only button events.

Or, do you mean checking the counts of "/PDM/Queue/Mouse" that are shown after the VM is shut down, rather than while the machine is running?

comment:55 follow-ups: ↓ 56 ↓ 57 Changed 6 weeks ago by michael

See the lines like this:

00:00:04.280568 long __cdecl Mouse::putMouseEventAbsolute(long,long,long,long,long): x=1016, y=415, dz=0, dw=0, fButtons=0x0

This was taken from one of your main log files. Every pointer event handled on the host should cause a line like this to be added to the log file when the environment variables are set.

comment:56 in reply to: ↑ 55 Changed 6 weeks ago by bored

Replying to michael:

See the lines like this:

00:00:04.280568 long __cdecl Mouse::putMouseEventAbsolute(long,long,long,long,long): x=1016, y=415, dz=0, dw=0, fButtons=0x0

This was taken from one of your main log files. Every pointer event handled on the host should cause a line like this to be added to the log file when the environment variables are set.

Yeah that's what I thought was supposed to appear too, but it's not appearing for some reason. Let me try again, not sure if I set the environmental variable incorrectly somehow or something else...

comment:57 in reply to: ↑ 55 ; follow-up: ↓ 58 Changed 6 weeks ago by bored

Replying to michael:

See the lines like this:

00:00:04.280568 long __cdecl Mouse::putMouseEventAbsolute(long,long,long,long,long): x=1016, y=415, dz=0, dw=0, fButtons=0x0

This was taken from one of your main log files. Every pointer event handled on the host should cause a line like this to be added to the log file when the environment variables are set.

Okay yeah sorry, I think my environmental variables were stale because I was launching from a launching program that had stale variables. (Hopefully I launched VirtualBox directly for my previous logs... I'm not sure!)

I observe 4 events for double-taps, which I guess shows the guest *is* receiving the taps?

00:04:40.256267 long __cdecl Mouse::putMouseEventAbsolute(long,long,long,long,long): x=145, y=82, dz=0, dw=0, fButtons=0x1
00:04:40.386079 long __cdecl Mouse::putMouseEventAbsolute(long,long,long,long,long): x=145, y=82, dz=0, dw=0, fButtons=0x0
00:04:40.386559 long __cdecl Mouse::putMouseEventAbsolute(long,long,long,long,long): x=145, y=82, dz=0, dw=0, fButtons=0x1
00:04:40.386677 long __cdecl Mouse::putMouseEventAbsolute(long,long,long,long,long): x=145, y=82, dz=0, dw=0, fButtons=0x0

comment:58 in reply to: ↑ 57 ; follow-up: ↓ 59 Changed 6 weeks ago by frankb

Really glad to see this is now being worked on! If I can help testing on my Surface Pro 3 let me know! Appreciate all your efforts!

Replying to bored:

Replying to michael:

See the lines like this:

00:00:04.280568 long __cdecl Mouse::putMouseEventAbsolute(long,long,long,long,long): x=1016, y=415, dz=0, dw=0, fButtons=0x0

This was taken from one of your main log files. Every pointer event handled on the host should cause a line like this to be added to the log file when the environment variables are set.

Okay yeah sorry, I think my environmental variables were stale because I was launching from a launching program that had stale variables. (Hopefully I launched VirtualBox directly for my previous logs... I'm not sure!)

I observe 4 events for double-taps, which I guess shows the guest *is* receiving the taps?

00:04:40.256267 long __cdecl Mouse::putMouseEventAbsolute(long,long,long,long,long): x=145, y=82, dz=0, dw=0, fButtons=0x1
00:04:40.386079 long __cdecl Mouse::putMouseEventAbsolute(long,long,long,long,long): x=145, y=82, dz=0, dw=0, fButtons=0x0
00:04:40.386559 long __cdecl Mouse::putMouseEventAbsolute(long,long,long,long,long): x=145, y=82, dz=0, dw=0, fButtons=0x1
00:04:40.386677 long __cdecl Mouse::putMouseEventAbsolute(long,long,long,long,long): x=145, y=82, dz=0, dw=0, fButtons=0x0

comment:59 in reply to: ↑ 58 Changed 6 weeks ago by bored

Replying to frankb:

Really glad to see this is now being worked on! If I can help testing on my Surface Pro 3 let me know! Appreciate all your efforts!

Same ;) you can probably guess how annoyed I am by the bug that I made an account here just to get this fixed!

comment:60 follow-up: ↓ 62 Changed 6 weeks ago by michael

Something I did not follow up: the dev_kbd log did not show any device event entries, which was why I assumed you were using the USB device. Could you check that again? There should be events containing the word "ps2mPutEvent" there.

comment:61 follow-up: ↓ 63 Changed 6 weeks ago by michael

I won't be able to provide a test build for a few days, but I would be interested if someone could rebuild 5.1.22 (or current svn) with the following patch applied:

Index: src/VBox/Devices/Input/PS2M.cpp
===================================================================
--- src/VBox/Devices/Input/PS2M.cpp	(revision 116677)
+++ src/VBox/Devices/Input/PS2M.cpp	(working copy)
@@ -847,7 +847,7 @@
     /* If the input queue is not empty, restart the timer. */
 #else
     /* If more movement is accumulated, report it and restart the timer. */
-    uHaveEvents = pThis->iAccumX | pThis->iAccumY | pThis->iAccumZ | (pThis->fCurrB != pThis->fReportedB);
+    uHaveEvents = pThis->iAccumX | pThis->iAccumY | pThis->iAccumZ | (pThis->fAccumB != pThis->fReportedB);
     LogFlowFunc(("Have%s events\n", uHaveEvents ? "" : " no"));
 
     if (uHaveEvents)

Changed 6 weeks ago by bored

comment:62 in reply to: ↑ 60 Changed 6 weeks ago by bored

Replying to michael:

Something I did not follow up: the dev_kbd log did not show any device event entries, which was why I assumed you were using the USB device. Could you check that again? There should be events containing the word "ps2mPutEvent" there.

Just re-uploaded a log. This was probably because of launching the VM poorly (stale env variables -- the issue I mentioned earlier). The new log contains the entries you mentioned.

comment:63 in reply to: ↑ 61 Changed 6 weeks ago by bored

Replying to michael:

I won't be able to provide a test build for a few days, but I would be interested if someone could rebuild 5.1.22 (or current svn) with the following patch applied:

Index: src/VBox/Devices/Input/PS2M.cpp
===================================================================
--- src/VBox/Devices/Input/PS2M.cpp	(revision 116677)
+++ src/VBox/Devices/Input/PS2M.cpp	(working copy)
@@ -847,7 +847,7 @@
     /* If the input queue is not empty, restart the timer. */
 #else
     /* If more movement is accumulated, report it and restart the timer. */
-    uHaveEvents = pThis->iAccumX | pThis->iAccumY | pThis->iAccumZ | (pThis->fCurrB != pThis->fReportedB);
+    uHaveEvents = pThis->iAccumX | pThis->iAccumY | pThis->iAccumZ | (pThis->fAccumB != pThis->fReportedB);
     LogFlowFunc(("Have%s events\n", uHaveEvents ? "" : " no"));
 
     if (uHaveEvents)

Ah, if I had a build environment working I would've just tracked this down with git bisect :-) thanks though! Hopefully someone else can run this?

comment:64 follow-up: ↓ 65 Changed 6 weeks ago by michael

Unfortunately git bisect is not a cure-all. We completely rewrote the PS/2 mouse implementation - the old one was a left-over from Qemu which was rather hard to maintain - and enabled the new one in 5.0. So this is presumably a bug in the new code - my guess is what I changed in the patch above - which is not really a bisectable regression.

comment:65 in reply to: ↑ 64 Changed 6 weeks ago by bored

Replying to michael:

Unfortunately git bisect is not a cure-all. We completely rewrote the PS/2 mouse implementation - the old one was a left-over from Qemu which was rather hard to maintain - and enabled the new one in 5.0. So this is presumably a bug in the new code - my guess is what I changed in the patch above - which is not really a bisectable regression.

Why would rewriting the PS/2 mouse implementation affect the behavior with USB mice? Was there shared code that was changed too?

comment:66 follow-ups: ↓ 67 ↓ 68 Changed 6 weeks ago by michael

Did you test that this worked with USB mice in 4.x at all? I suspect that this is a co-incidental separate problem. The USB specification (if I understand correctly; I didn't implement the device) can indirectly cause events which happen too fast to be lost, and I think this may be a result of how we handle that.

comment:67 in reply to: ↑ 66 Changed 6 weeks ago by bored

Replying to michael:

Did you test that this worked with USB mice in 4.x at all? I suspect that this is a co-incidental separate problem. The USB specification (if I understand correctly; I didn't implement the device) can indirectly cause events which happen too fast to be lost, and I think this may be a result of how we handle that.

Yup, in fact I just verified this right *now* by uninstalling v5 and installing v4.3.40 r110317 (it installed this time, weirdly enough). Double-tap works just fine under USB Tablet as well as PS/2 Mouse. It's a version 5 problem and I don't see how it can be specific to PS/2 mice (though I obviously can't rule out two simultaneous bugs or something). That's why I'd feel if I had a git bisect I could narrow it down. :-)

Last edited 6 weeks ago by bored (previous) (diff)

comment:68 in reply to: ↑ 66 Changed 6 weeks ago by bored

Replying to michael:

Did you test that this worked with USB mice in 4.x at all? I suspect that this is a co-incidental separate problem. The USB specification (if I understand correctly; I didn't implement the device) can indirectly cause events which happen too fast to be lost, and I think this may be a result of how we handle that.

Hm, it seems that even with USB Tablet enabled on v5, I get PS/2 events in the log (ps2mPutEvent), even though the presence of /USB/HidMouse in the log confirms that it should be using a USB mouse. Is that supposed to happen? Why am I seeing a PS/2 method putting USB mouse events?

comment:69 follow-ups: ↓ 70 ↓ 71 Changed 6 weeks ago by michael

I suspect I have not looked at that code for too long (it is my code, but what I mainly remember is that in retrospect it is far too complicated); it could be that when the Additions are installed it uses the PS/2 mouse to send button events unless it is completely disabled. In that case, uninstalling the Additions should make it use the USB tablet.

And one of your previous comments made me realise that I should clearly encourage bug reporters to set up build environments if they are capable of it: they will be much more likely to actively look for the solution in the code themselves, and as a nice side effect it will show who really cares about their bug and who doesn't. (Don't misunderstand that: you clearly do care.)

comment:70 in reply to: ↑ 69 Changed 6 weeks ago by bored

Replying to michael:

I suspect I have not looked at that code for too long (it is my code, but what I mainly remember is that in retrospect it is far too complicated); it could be that when the Additions are installed it uses the PS/2 mouse to send button events unless it is completely disabled. In that case, uninstalling the Additions should make it use the USB tablet.

And one of your previous comments made me realise that I should clearly encourage bug reporters to set up build environments if they are capable of it: they will be much more likely to actively look for the solution in the code themselves, and as a nice side effect it will show who really cares about their bug and who doesn't. (Don't misunderstand that: you clearly do care.)

Ah. I can try a version without guest additions and see if that changes anything.

Regarding build environments: That would be a good idea if it weren't for the fact that what I (and I suspect many others like me) are lacking is probably not mere encouragement ;) it's the massive time investment required to set up the build environment, as well as the additional potential to completely screw over my own system which I use for my own actual work. (e.g. Installing VS2010 or another Windows SDK is too risky when I already have VS2008 and VS2015 and a bunch of SDKs installed; I've already wasted so much time fixing up broken SDK and compiler registrations to be confident installing more wouldn't cause more problems.) If there was a way for you to distribute a simple VHD that contained a pre-working build environment, that would be very helpful, but sadly I don't believe Windows's license really allows that...

comment:71 in reply to: ↑ 69 ; follow-up: ↓ 72 Changed 6 weeks ago by bored

Replying to michael:

I suspect I have not looked at that code for too long (it is my code, but what I mainly remember is that in retrospect it is far too complicated); it could be that when the Additions are installed it uses the PS/2 mouse to send button events unless it is completely disabled. In that case, uninstalling the Additions should make it use the USB tablet.

Hm, okay so I just uninstalled Guest Additions and it's still calling ps2mPutEvent/ps2kInsertQueue...

comment:72 in reply to: ↑ 71 Changed 6 weeks ago by bored

Replying to bored:

Replying to michael:

I suspect I have not looked at that code for too long (it is my code, but what I mainly remember is that in retrospect it is far too complicated); it could be that when the Additions are installed it uses the PS/2 mouse to send button events unless it is completely disabled. In that case, uninstalling the Additions should make it use the USB tablet.

Hm, okay so I just uninstalled Guest Additions and it's still calling ps2mPutEvent/ps2kInsertQueue...

Also note that the USB activity light *does* blink when I tap, so it *is* using the USB Tablet. It just seems that those methods are called for the USB case too, not just PS/2.

comment:73 follow-up: ↓ 74 Changed 6 weeks ago by michael

Interesting, perhaps I should look at it if I find time.

Regarding build environments, yes, I know that Windows is quite a bit harder to do than Linux, and I understand as well that it may be more practicable for some people than others to do. Regarding the time investment though, that is something that you have to be ready for when you use open source software. If I were to invest as much time into all bugs that I could which are as valid as this one, I would need many time machines to find enough hours every day, even without doing any other development; that can be extended to the entire team. Therefore we have to rely on people either buying licences to hopefully pay for more developer time, or to contribute time. Fixing any bug is a high time investment, particularly if you are not familiar with the code. Hopefully someone who fixes one bug will amortise that by fixing further bugs with less time investment. And if you intend to rely on VirtualBox without buying a licence (which I know too is a bit complicated for individuals) it might not be a bad investment anyway.

comment:74 in reply to: ↑ 73 Changed 6 weeks ago by bored

Replying to michael:

Interesting, perhaps I should look at it if I find time.

Regarding build environments, yes, I know that Windows is quite a bit harder to do than Linux, and I understand as well that it may be more practicable for some people than others to do. Regarding the time investment though, that is something that you have to be ready for when you use open source software. If I were to invest as much time into all bugs that I could which are as valid as this one, I would need many time machines to find enough hours every day, even without doing any other development; that can be extended to the entire team. Therefore we have to rely on people either buying licences to hopefully pay for more developer time, or to contribute time. Fixing any bug is a high time investment, particularly if you are not familiar with the code. Hopefully someone who fixes one bug will amortise that by fixing further bugs with less time investment. And if you intend to rely on VirtualBox without buying a licence (which I know too is a bit complicated for individuals) it might not be a bad investment anyway.

Regarding being prepared when I use OSS, to be honest this is precisely why I'm not the biggest fan of OSS that you might see out there in the first place (e.g. why I'm on Windows instead of Linux, for example)... I don't want to have to become a developer of every software I ever touch just so I can use it. ;) Most people in my shoes would have just been using VMware at this point, which I could also do right now too (I just don't like it). I'm really just here because I'm just extremely annoyed at the bug and want to help the community avoid the same annoyance. But rationally speaking in terms of the time investment... I'm /not/ even relying on VirtualBox in any way. I'm merely using it to boot volumes that I can already dual-boot anyway; it's just to save me the hassle of rebooting. That only saves me maybe 1-2 minutes per boot (which I do maybe once every few days at most) which you can imagine does not exactly pay off in terms of the time I've already sunk into this bug, let alone the time required to set up a build environment and everything. I'd say more about my situation but I'd rather stay anonymous here :-) however I can promise you this is neither a case of me being too cheap to pay for a license nor a case of VirtualBox even remotely saving me a similar amount of time as I've spent on this already.

However, I would suggest that if you think it's necessary for your users to set up a build environment in order for bugs to get fixed, you (plural -- someone at VB, not necessarily yourself) should consider writing a Bash/batch or Python script or something that can set up a working build environment on a clean system from scratch. (Yes, Bash on Windows is fine, Windows users can use MSYS2 and git-bash.) I'd happily leave it running overnight and just click/type "Build" in the morning if that's all it would take!

comment:75 follow-up: ↓ 77 Changed 6 weeks ago by michael

Thanks for the suggestion. When I said, "if you intend to..." I wasn't implying that you were being cheap, and as I said, it can be a bit of hassle to buy a licence as an individual at the moment. You have certainly invested quite a bit of time for someone who is not relying on the software (and even if you do intend to I was meaning more that it would be sensible from your point of view than that we expect it of you: in the end it is for you to decide what makes sense for you. But of course, we only fix bugs for non-paying users when we decide that it makes sense for us. In theory at least.)

Regarding OSS generally, I use Linux in my daily work and rarely have to do development work on the things I use. Usually finding work-arounds for problems does the trick, and most of the few times I did dive in were when I wanted to fix some bug which looked to users like it was a problem with VirtualBox though it was not.

comment:76 Changed 6 weeks ago by michael

And if no one does their own build I hope to post a test build next week some time.

comment:77 in reply to: ↑ 75 Changed 6 weeks ago by bored

Yeah, sounds good. I'm actually surprised none of the corporate/paying customers are facing this issue. It would seem most people with a touchpad on Windows should be realizing double-taps aren't working... it shouldn't be a rare configuration.

comment:78 follow-up: ↓ 79 Changed 5 weeks ago by michael

I created a test build for Windows<1>. Please give it a try and let me know if it makes any difference.

  1. https://www.virtualbox.org/download/testcase/VirtualBox-5.1.25-117041-Win.exe

comment:79 in reply to: ↑ 78 Changed 5 weeks ago by bored

Replying to michael:

I created a test build for Windows<1>. Please give it a try and let me know if it makes any difference.

  1. https://www.virtualbox.org/download/testcase/VirtualBox-5.1.25-117041-Win.exe

Thanks a ton!

Good news: I can now double-tap and it works! :)

Bad news: I can't click-drag anymore :) whether via tapping, or via clicking my touchpad, or via just a plain mouse. Doesn't matter how many times I try to tap before dragging. Interestingly I can at least see on my mouse that there is a very brief period in which the drag works, but it quickly stops (after a few pixels).

The behaviors here seem to be consistent across USB and PS/2, and across OSes, though I'm not sure I tested every single possible combination.

comment:80 Changed 5 weeks ago by FrankB

Just tested on my Surface Pro 3; it works!

Awesome! Many thanks!!!

comment:81 Changed 5 weeks ago by FrankB

Hmmm... I did not read bored's comment about click-drag...

I cannot click-drag anymore either...

comment:82 follow-up: ↓ 84 Changed 5 weeks ago by michael

Please try the latest Windows test build:

https://www.virtualbox.org/wiki/Testbuilds

comment:83 Changed 5 weeks ago by FrankB

Upgraded including tools on guest & rebooted guest. Now drag & drop works but double / triple clicking does not work at all so for example impossible to open a folder on the guest machine. tested on SP3 with Surface Pro 4 type cover

comment:84 in reply to: ↑ 82 Changed 5 weeks ago by bored

Replying to michael:

Please try the latest Windows test build:

https://www.virtualbox.org/wiki/Testbuilds

Okay so now dragging works again, and double-tap is broken, and double-click is fine. Specifically, double-tap instead results in a drag lock, and I have to click again to release! Haven't seen this behavior before.

comment:85 Changed 5 weeks ago by FrankB

I confirm bored's findings; I have not been accurate enough as I did not differentiate between double tapping & double clicking, in fact the whole ticket started around double clicking but that always worked for me; the whole issue is about double tapping.

comment:86 follow-up: ↓ 88 Changed 4 weeks ago by michael

Please try the latest Windows test build<1>. I have made another attempt at fixing, including a test case for both problems seen.

<1> https://www.virtualbox.org/wiki/Testbuilds

comment:87 Changed 4 weeks ago by FrankB

I think you have a winner now! double click & double tap work, right click & right tap work, click & drag work

comment:88 in reply to: ↑ 86 Changed 4 weeks ago by bored

Replying to michael:

Please try the latest Windows test build<1>. I have made another attempt at fixing, including a test case for both problems seen.

<1> https://www.virtualbox.org/wiki/Testbuilds

Awesome, thanks michael. Yes, it works fine now as far as I can tell. :) The only thing I think worth noting is that it seems the double-click delay is based on the guest settings rather than the host settings, which isn't really a problem but is not what I would've expected from a guest using mouse pointer integration, since the mouse speed is necessarily from the host settings. Probably not worth worrying about but I just thought I'd mention it for completeness. Thanks a ton!

comment:89 Changed 4 weeks ago by Simple

Just upgraded to "VirtualBox-5.1.25-117130-Win.exe" + "Oracle_VM_VirtualBox_Extension_Pack-5.1.25-117130.vbox-extpack", and seems that the Mouse/Touch-Pad issue has been sorted.

In fact it is now more responsive than a number of earlier releases.

Well done to the developers.

comment:90 Changed 4 weeks ago by michael

  • Summary changed from Double click not working with precision touchpad to Double click not working with precision touchpad -> believed fixed in releases greater than 5.1.24

Good to hear. For those for whom this is important enough, I suggest that you keep on using the test build until a release containing the fix is made. I expect this fix to be present in any future 5.1 series and later test builds and releases.

Bored, your idea with the click speed makes sense, but it is not something that we would take the time to address at this point. Contributions are welcome if it is important enough to anyone - as usual, please talk to us before writing much code, to make sure that your (you meaning anyone interested) time is used as effectively (for you) as possible.

Last edited 4 weeks ago by michael (previous) (diff)

comment:91 Changed 4 weeks ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in 5.1.26.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use