Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#4630 closed bug (fixed)

Mouse messaging via VMWare's VNC server do not get handled in Haiku events properly...

Reported by: Super Dave Osbourne Owned by: stippi
Priority: normal Milestone: R1
Component: User Interface Version: R1/alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: x86

Description

I have succeeded with VMWare Fusion for Mac running Haiku, to connect with a VNC client to the Haiku VM via the VMWare VNC server. However, the mouse doesn't track properly. Is this a known problem? Seems to be an issue with Haiku and how it gets mouse events? Have tried VMWare's VNC server with other VMs running, Linux and Windows without problems. I have video showing/demo'ing the problem if someone would help. I need this to work to get my GUI testing automation framework started.

Attachments (3)

serial-r33290-vmware.txt (80.1 KB ) - added by zooey 15 years ago.
Session in VMware-player window
serial-r33290-vmware-vnc.txt (83.1 KB ) - added by zooey 15 years ago.
Session in VNC window
vmware_mouse.zip (5.0 KB ) - added by mmlr 15 years ago.

Download all attachments as: .zip

Change History (23)

comment:1 by Super Dave Osbourne, 15 years ago

The following link to a movie shows (with some commentary, erroneous likely) the problem...

http://www.mediafire.com/?ujmgqdrmymq

in reply to:  1 comment:2 by Super Dave Osbourne, 15 years ago

The color problem is likely endian issue, and was worked around by using 'default' setting in Eggplant's VNC client settings via Preferences.

comment:3 by mmlr, 15 years ago

Can you please find out what kind of input device this is? The iroster command will tell you. I could imagine this being an extra usb_hid device being added to the VM.

comment:4 by Super Dave Osbourne, 15 years ago

~> iroster

name type state


AT Keyboard 1 B_KEYBOARD_DEVICE running

Extended PS/2 Mouse 1 B_POINTING_DEVICE running

Wacom Tablets B_POINTING_DEVICE running

comment:5 by Super Dave Osbourne, 15 years ago

Is it normal that Wacom is there, even though I don't have a wacom installed? I'm simply running VMWare Fusion for Mac, with a Haiku VM image, and making a connection with VNC client t the VMWare's VNC server.

comment:6 by stippi, 15 years ago

Yes, the Wacom input_server add-on is written in a weird way, it manages it's own sub devices. Even if no Wacom is connected, the "master" add-on is still running. I should fix that some day...

in reply to:  6 comment:7 by Super Dave Osbourne, 15 years ago

Replying to stippi:

Yes, the Wacom input_server add-on is written in a weird way, it manages it's own sub devices. Even if no Wacom is connected, the "master" add-on is still running. I should fix that some day...

Hello stippi,

I just dropped 4K USD into some hardware to test Haiku via Eggplant, a high end (50K in licenses issued for this effort) software automation tool. Please, please fix this, its urgent for me, and I believe urgent for Haiku.

in reply to:  6 comment:8 by Super Dave Osbourne, 15 years ago

Replying to stippi:

Yes, the Wacom input_server add-on is written in a weird way, it manages it's own sub devices. Even if no Wacom is connected, the "master" add-on is still running. I should fix that some day...

Is there a way to turn this device off, or is it forced running all the time? I need to move forward with this testing configuration effort I'm doing, the cost, and time I have allocated is very large.

comment:9 by mmlr, 15 years ago

You could remove the wacom input_server device add-on. Unless the VNC server causes a wacom to be attached though and that one wouldn't be handled correctly, it doesn't cause what you are seeing. From the looks of it I would guess that there is a signed vs. unsigned problem causing the mouse data to be interpreted wrongly always resulting in the same direction. Not too unlikely is also that the input data is absolute while the driver assumes relative data. For VNC the data usually is absolute, that's why in QEMU you'd want to use the tablet input as a device as that one's absolute as well. It's also possible that it's simply a bug in VMWare Fusion when used with the VNC server. However this seems unlikely when other OSes work fine with the same VNC server/client combination.

Can you provide a syslog? It should at least contain information as to what kind of device is/are detected by the PS/2 driver. Enabling tracing data for the movement case in src/add-ons/kernel/bus_managers/ps2/ps2_standard_mouse.c line 141 making it into an unconditional dprintf() instead of TRACE() should dump a lot of info that can then be compared between the movement directly on the VM and the one over VNC.

comment:10 by stippi, 15 years ago

What I meant to say is that it will always look as though a Wacom device is running, while that is actually only the "master device" add-on. In another words, you can ignore the "Wacom Tablets" entry. It should have nothing to do with the problem at hand, unless there is indeed a Wacom device being emulated and picked up by Haiku. You can confirm this by looking at the running threads in the input_server team. There should not be any Wacom related thread. If there is one, then the Wacom driver could be part of the problem, if there is none, then it is unrelated.

comment:11 by stippi, 15 years ago

Could you point me to a guide or could you give me some instructions how I could replicate your setup here? I have never used VNC before.

in reply to:  11 comment:12 by Super Dave Osbourne, 15 years ago

Replying to stippi:

Could you point me to a guide or could you give me some instructions how I could replicate your setup here? I have never used VNC before.

VNC is virtual network computing, or distant control of a desktop/computer through the VNC protocols (which are very well established). On a mac, which I'm running, you can use Fast User Switch to establish another running user on your computer. You can download VMWare Fusion from vmware.com, and they issue a temp/30 day license. Install this, and run VMWare with your RC1 of Haiku. Then switch back to the original account (with fast user switching in os x), and using built in (10.5 and above) or Chicken of the Sea (COTC), or another free or pay VNC client, make a connection with the IP address and port you are using on the VNC server of the installed and running VMWare VNC server. To enable the VMWare VNC server, you can follows the directions at http://bradarsenault.com/post/482

comment:13 by zooey, 15 years ago

You can reproduce the problem with VMware-player on Linux, too, by adding these two lines to the *.vmx file:

RemoteDisplay.vnc.enabled = true
RemoteDisplay.vnc.port = 5900

After starting the VM and using vncviewer to connect to localhost:5900, the VNC viewer window comes up with the Haiku desktop. Mouse behaviour in that window is indeed broken (while it works fine in the VMware-player window).

No idea if this helps with tracking down the problem: haiku mouse behaviour is ok when using the same image over VNC in qemu-kvm (with the same VNC client). In that setup, the mouse is too fast (i.e. the VNC cursor and haiku's cursor move at different speeds), but that can be remedied by deactivating mouse acceleration in haiku's mouse prefs.

comment:14 by zooey, 15 years ago

Owner: changed from stippi to zooey
Status: newassigned

by zooey, 15 years ago

Attachment: serial-r33290-vmware.txt added

Session in VMware-player window

by zooey, 15 years ago

Session in VNC window

comment:15 by zooey, 15 years ago

Owner: changed from zooey to stippi
Status: assignednew

I've tried, but failed to determine the cause for this. Attached is a serial log for a vmware session without VNC, where I moved the mouse upwards, downwards, left and right and another serial log for the same over VNC.

Clearly, the VNC version shows that vmware's PS/2 mouse emulation seems to only ever send mouse movements into the same direction, no matter what one does in the VNC window.

Installing the vmw_tools available on BeBits doesn't change a thing with respect to VNC.

I'm giving up on this one for now.

comment:16 by mmlr, 15 years ago

This is not a bug. From VMWare:

You must install VMware Tools in the virtual machine before you
connect with the VNC client. Otherwise, the mouse cannot work. (VNC
clients do not support relative mice; VMware Tools contains an absolute
mouse driver.)

VNC uses absolute coordinates, hence VMWare emulates an "absolute" mouse device. This can't work with any standard mouse driver (it doesn't work with other OSes either, only through installing the extra drivers). I don't really understand why they don't simply emulate a HID device that can work with absolute coordinates (you can do that under QEMU with the tablet device).

It's likely that the vmw_tools do not include a port of the extra driver needed. Seeing that it must somehow "replace" the standard PS/2 code this seems more involved under Haiku than just writing a driver. You'd essentially have to integrate it into the PS/2 bus_manager, alongside the standard, intellimouse and synaptics code. I have no idea how easy/difficult this is to do however.

comment:17 by mmlr, 15 years ago

Working on an updated input_server filter for the VMWare tools. I do get data for both VNC and normal interaction, but it's yet incomplete as some scaling seems to be missing. Will attach here when I finish so you can test.

by mmlr, 15 years ago

Attachment: vmware_mouse.zip added

comment:18 by mmlr, 15 years ago

Please extract the attached vmware_mouse add-on and install it to "/boot/system/add-ons/input_server/filters". Remove other VMWare related modules if you have installed them. Please report back if this solves your problem.

comment:19 by mmlr, 15 years ago

Resolution: fixed
Status: newclosed

Filter supporting VMWare io port protocol added in hrev33298. Please reopen if there is a problem still.

in reply to:  19 comment:20 by Super Dave Osbourne, 15 years ago

Replying to mmlr:

Filter supporting VMWare io port protocol added in hrev33298. Please reopen if there is a problem still.

Thanks, looks to be fixed.

Note: See TracTickets for help on using tickets.