installer and livecd should detect vmware mouse device and use the right driver

Bug #71167 reported by Philip Langdale
14
Affects Status Importance Assigned to Milestone
xorg (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

First, see bug 69780 about making sure the vmmouse driver is in main (or it won't be available to use at install time).

To provide the best user experience for someone installing Ubuntu into a VM, the vmware mouse driver should be autoselected just as the video driver is. Now, the video driver detection is handled by Xorg but it has no support for mouse detection, so the work will have to be done separately.

Detecting mouse support is a relatively simple operation and readily reusable code exists inside the mouse driver itself.

See VMMouseClientVMCheck here:

http://gitweb.freedesktop.org/?p=xorg/driver/xf86-input-vmmouse.git;a=blob_plain;f=src/vmmouse_client.c
http://gitweb.freedesktop.org/?p=xorg/driver/xf86-input-vmmouse.git;a=blob_plain;f=src/vmmouse_proto.c

These files can be taken and dropped in anywhere appropriate to do the test (of course, the rest of the mouse functions are not needed)

Tags: bitesize
Revision history for this message
Matt Zimmerman (mdz) wrote :

Rodrigo, please have a look at this and see what can be done

Changed in xorg:
assignee: nobody → rodarvus
importance: Undecided → Low
status: Unconfirmed → Confirmed
Revision history for this message
Philip Langdale (langdalepl) wrote :

I have put together a simple program that will test for the presence of the vmmouse device and return 0 if it is present or 1 otherwise.

http://intr.overt.org/misc/vmmouse-detect-1.0.0.tar.bz2

I don't know what the best way to integrate this into the installer and live-cd startup flows is. It might be fine to run it from a script as is, or you might prefer to insert the code directly into some pre-existing program (although the need for a segfault handler will probably make that hard).

If you want this code to have some definitive upstream home, I can look into hosting it in xorg git, but right now it's just the tarball on my website.

Matt Zimmerman (mdz)
Changed in xorg:
assignee: rodarvus → bryceharrington
Revision history for this message
Bryce Harrington (bryce) wrote :

Hi Philip,

I've tested out your vmmouse detection command and it works perfectly. I'm attaching a modified dexconf that incorporates use of this tool. Would you mind testing it out and make sure it works properly under vmware?

 $ sudo ./dexconf -o xorg.conf

I'm wondering whether we should package vmmouse-detect as a standalone package, or add it to an existing package, such as xorg-server/hw/xfree86/utils/?

--- dexconf.orig 2007-06-27 17:58:15.002257500 -0700
+++ dexconf 2007-06-27 17:53:11.831310500 -0700
@@ -256,6 +256,13 @@

 DO_EMULATE3BUTTONS=

+MOUSE_DRIVER=mouse
+if which vmmouse_detect >/dev/null 2>&1; then
+ if vmmouse_detect > /dev/null ; then
+ MOUSE_DRIVER=vmmouse
+ fi
+fi
+
 fetch xserver-$SERVER/config/inputdevice/mouse/port
 MOUSE_PORT="$RET"
 fetch xserver-$SERVER/config/inputdevice/mouse/protocol
@@ -269,7 +276,7 @@
 cat >&4 <<SECTION
 Section "InputDevice"
        Identifier "Configured Mouse"
- Driver "mouse"
+ Driver "$MOUSE_DRIVER"
        Option "CorePointer"
        Option "Device" "$MOUSE_PORT"
        Option "Protocol" "$MOUSE_PROTOCOL"

Revision history for this message
Jay Camp (jayc) wrote :

Bryce, thanks so much for doing this! The patch didn't apply cleanly in a Feisty guest but adding the same changes worked just fine. I think adding vmmouse_detect to an existing package would be the thing to do. Also, (you probably already know this) xserver-xorg-input-vmmouse will need to be added to xserver-xorg-input-all as well.

Revision history for this message
Bryce Harrington (bryce) wrote :

After talking with colin watson, it seemed that mdetect was the best place to put vmmouse_detect. Merging these was a bit of a challenge since they use completely different build systems, but I got a functioning package put together yesterday. I'll post it for testing once it's had some review, and then we can also apply the xorg patch to start using it.

Changed in xorg:
status: Confirmed → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Fine for me to fix for Tribe 4, but not a blocker.

Revision history for this message
Bryce Harrington (bryce) wrote :

This is now uploaded to gutsy and will be available in Tribe-5.

I tried packaging it two ways - first by utilizing vmmouse_detect's autoconf infrastructure and putting mdetect's files into it. This gave a nice package, but resulted in a gargantuan diff between us and debian. I was concerned about the long term maintainability of this.

So the second try (which is now uploaded), follows mdetect's simple Makefile packaging, and drops vmmouse_detect's autoconf stuff. This has resulted in a much lighter diff, and should hopefully be more maintainable long term.

The changes to xorg have already been deployed, so in theory starting with tribe-5, the installer and live cd should now properly detect the vmware mouse, and set up xorg.conf with the correct driver.

Changed in xorg:
status: In Progress → Fix Released
Revision history for this message
Tim Hull (thully) wrote :

In Gutsy Beta 1, I am seeing this problem again with VMware Fusion 1.0 and 1.1b1. In particular, what is happening is that in addition to the vmmouse driver not being used by default, it isn't even *included* on the beta 1 cd. Thus, I had to download it from the repository and manually edit the xorg.conf
to make it work.

Could 1) the vmmouse driver be included on the CD 2) vmmouse be used by default on all VMware guests? I spent quite a while trying to figure out what was up with my mouse in Gutsy before finally discovering vmmouse (or the lack thereof). After manually installing vmmouse, the device works perfectly.

Changed in xorg:
status: Fix Released → New
Revision history for this message
Janne Hyötylä (janne-hyotyla) wrote :

Same problem as Tim Hull confirmed also with VMWare Workstation 5.5.2 and Gutsy Beta 1 (Desktop-LiveCD and Installed), Feisty Host.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

So all that's missing now is to put xserver-xorg-input-vmmouse in main?

Changed in xorg:
status: New → Triaged
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

This is fixed in Hardy alpha3, which is released later this week.

Changed in xorg:
assignee: bryceharrington → nobody
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.