Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Feb 2020 22:40:03 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 244110] x11-drivers/xf86-input-vmmouse InputClass not matching when VMWare is used
Message-ID:  <bug-244110-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D244110

            Bug ID: 244110
           Summary: x11-drivers/xf86-input-vmmouse InputClass not matching
                    when VMWare is used
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: x11@FreeBSD.org
          Reporter: daniel@morante.net
          Assignee: x11@FreeBSD.org
             Flags: maintainer-feedback?(x11@FreeBSD.org)

When using AutoAddDevices (currently the default behavior), X11 is not able=
 to
correctly match the input class of the vmware mouse in a virtual machine.  =
X11
therefore defaults to using the normal 'mouse' driver instead of 'vmmouse'.=
=20
This is true no matter if moused is used or not.

Both 'moused_nondefault_enable' and 'moused_enable' are set to "NO" in
/etc/rc.conf:

```
sysrc moused_nondefault_enable moused_enable

moused_nondefault_enable: NO
moused_enable: NO
```

Currently in `/usr/local/share/X11/xorg.conf.d/50-vmmouse.conf` (as install=
ed
by x11-drivers/xf86-input-vmmouse)

```
Section "InputClass"
        Identifier      "vmmouse"
        MatchIsPointer  "on"
        MatchTag        "vmmouse"
        Driver          "vmmouse"
EndSection
```

Xorg.0.log shows that X11 is falling back to using the default "mouse' driv=
er
for both /dev/sysmouse and /dev/psm0.

```
[     9.160] (II) config/devd: adding input device (null) (/dev/sysmouse)
[     9.160] (II) LoadModule: "mouse"
[     9.160] (II) Loading /usr/local/lib/xorg/modules/input/mouse_drv.so
[     9.161] (II) Module mouse: vendor=3D"X.Org Foundation"
[     9.161]    compiled for 1.18.4, module version =3D 1.9.3
[     9.161]    Module class: X.Org XInput Driver
[     9.161]    ABI class: X.Org XInput driver, version 22.1
[     9.161] (II) Using input driver 'mouse' for 'sysmouse'
[     9.161] (**) sysmouse: always reports core events
[     9.161] (**) Option "Device" "/dev/sysmouse"
[     9.161] (=3D=3D) sysmouse: Protocol: "Auto"
[     9.161] (**) sysmouse: always reports core events
[     9.161] (=3D=3D) sysmouse: Emulate3Buttons, Emulate3Timeout: 50
[     9.161] (**) sysmouse: ZAxisMapping: buttons 4 and 5
[     9.161] (**) sysmouse: Buttons: 5
[     9.161] (**) Option "config_info" "devd:sysmouse"
[     9.161] (II) XINPUT: Adding extended input device "sysmouse" (type: MO=
USE,
id 7)
[     9.161] (**) sysmouse: (accel) keeping acceleration scheme 1
[     9.161] (**) sysmouse: (accel) acceleration profile 0
[     9.161] (**) sysmouse: (accel) acceleration factor: 2.000
[     9.161] (**) sysmouse: (accel) acceleration threshold: 4
[     9.161] (II) sysmouse: SetupAuto: hw.iftype is 4, hw.model is 0
[     9.161] (II) sysmouse: SetupAuto: protocol is SysMouse
[     9.194] (II) config/devd: adding input device Mouse (/dev/psm0)
[     9.194] (II) Using input driver 'mouse' for 'Mouse'
[     9.194] (**) Mouse: always reports core events
[     9.194] (**) Option "Device" "/dev/psm0"
[     9.194] (=3D=3D) Mouse: Protocol: "Auto"
[     9.194] (**) Mouse: always reports core events
[     9.227] (=3D=3D) Mouse: Emulate3Buttons, Emulate3Timeout: 50
[     9.227] (**) Mouse: ZAxisMapping: buttons 4 and 5
[     9.227] (**) Mouse: Buttons: 5
[     9.227] (**) Option "config_info" "devd:psm0"
[     9.227] (II) XINPUT: Adding extended input device "Mouse" (type: MOUSE=
, id
8)
[     9.227] (**) Mouse: (accel) keeping acceleration scheme 1
[     9.227] (**) Mouse: (accel) acceleration profile 0
[     9.227] (**) Mouse: (accel) acceleration factor: 2.000
[     9.227] (**) Mouse: (accel) acceleration threshold: 4
[     9.233] (II) Mouse: SetupAuto: hw.iftype is 3, hw.model is 4
[     9.233] (II) Mouse: SetupAuto: protocol is IMPS/2
[     9.519] (II) Mouse: ps2EnableDataReporting: succeeded
```

Output of xinput

```
xinput list

=E2=8E=A1 Virtual core pointer                          id=3D2    [master p=
ointer  (3)]
=E2=8E=9C   =E2=86=B3 Virtual core XTEST pointer                id=3D4    [=
slave  pointer  (2)]
=E2=8E=9C   =E2=86=B3 sysmouse                                  id=3D7    [=
slave  pointer  (2)]
=E2=8E=9C   =E2=86=B3 Mouse                                     id=3D8    [=
slave  pointer  (2)]
=E2=8E=A3 Virtual core keyboard                         id=3D3    [master k=
eyboard (2)]
    =E2=86=B3 Virtual core XTEST keyboard               id=3D5    [slave  k=
eyboard (3)]
    =E2=86=B3 kbdmux                                    id=3D6    [slave  k=
eyboard (3)]


xinput list-props 7

Device 'sysmouse':
        Device Enabled (116):   1
        Coordinate Transformation Matrix (117): 1.000000, 0.000000, 0.00000=
0,
0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        Device Accel Profile (230):     0
        Device Accel Constant Deceleration (231):       1.000000
        Device Accel Adaptive Deceleration (232):       1.000000
        Device Accel Velocity Scaling (233):    10.000000
        Device Node (234):      "/dev/sysmouse"
        Button Labels (235):    "Button Left" (119), "Button Middle" (120),
"Button Right" (121), "Button Wheel Up" (122), "Button Wheel Down" (123)
        Mouse Middle Button Emulation (236):    1
        Mouse Middle Button Timeout (237):      50


xinput list-props 8

Device 'Mouse':
        Device Enabled (116):   1
        Coordinate Transformation Matrix (117): 1.000000, 0.000000, 0.00000=
0,
0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        Device Accel Profile (230):     0
        Device Accel Constant Deceleration (231):       1.000000
        Device Accel Adaptive Deceleration (232):       1.000000
        Device Accel Velocity Scaling (233):    10.000000
        Device Node (234):      "/dev/psm0"
        Button Labels (235):    "Button Left" (119), "Button Middle" (120),
"Button Right" (121), "Button Wheel Up" (122), "Button Wheel Down" (123)
        Mouse Middle Button Emulation (236):    1
        Mouse Middle Button Timeout (237):      50
```

My guess is that for some reason in FreeBSD it's unable to make the match b=
ased
on the tag.  (I don't know how to get the tag to confirm).  By changing
`/usr/local/share/X11/xorg.conf.d/50-vmmouse.conf` to match on the device n=
ode
instead, the correct driver is loaded:

```
Section "InputClass"
        Identifier      "vmmouse"
        MatchIsPointer  "on"
        MatchDevicePath "/dev/psm0"
        Driver          "vmmouse"
EndSection
```

```
[     9.407] (II) config/devd: adding input device (null) (/dev/sysmouse)
[     9.407] (**) sysmouse: Applying InputClass "vmmouse"
[     9.407] (II) LoadModule: "vmmouse"
[     9.407] (II) Loading /usr/local/lib/xorg/modules/input/vmmouse_drv.so
[     9.408] (II) Module vmmouse: vendor=3D"X.Org Foundation"
[     9.408]    compiled for 1.18.4, module version =3D 13.1.0
[     9.408]    Module class: X.Org XInput Driver
[     9.408]    ABI class: X.Org XInput driver, version 22.1
[     9.408] (II) VMWARE(0): VMMOUSE module was loaded
[     9.408] (II) Using input driver 'vmmouse' for 'sysmouse'
[     9.408] (**) sysmouse: always reports core events
[     9.408] (II) VMWARE(0): vmmouse is available
[     9.408] (**) Option "Device" "/dev/sysmouse"
[     9.408] (**) sysmouse: ZAxisMapping: buttons 4 and 5
[     9.408] (**) Option "config_info" "devd:sysmouse"
[     9.408] (II) XINPUT: Adding extended input device "sysmouse" (type: MO=
USE,
id 7)
[     9.408] (II) VMWARE(0): VMMOUSE DEVICE_INIT
[     9.408] (**) sysmouse: (accel) keeping acceleration scheme 1
[     9.408] (**) sysmouse: (accel) acceleration profile 0
[     9.408] (**) sysmouse: (accel) acceleration factor: 2.000
[     9.408] (**) sysmouse: (accel) acceleration threshold: 4
[     9.408] (II) VMWARE(0): VMMOUSE DEVICE_ON
[     9.408] (II) VMWARE(0): vmmouse enabled
[     9.441] (II) config/devd: adding input device Mouse (/dev/psm0)
[     9.441] (**) Mouse: Applying InputClass "vmmouse2"
[     9.441] (II) Using input driver 'vmmouse' for 'Mouse'
[     9.441] (**) Mouse: always reports core events
[     9.441] (II) VMWARE(0): vmmouse is available
[     9.441] (**) Option "Device" "/dev/psm0"
[     9.475] (**) Mouse: ZAxisMapping: buttons 4 and 5
[     9.475] (**) Option "config_info" "devd:psm0"
[     9.475] (II) XINPUT: Adding extended input device "Mouse" (type: MOUSE=
, id
8)
[     9.475] (II) VMWARE(0): VMMOUSE DEVICE_INIT
[     9.475] (**) Mouse: (accel) keeping acceleration scheme 1
[     9.475] (**) Mouse: (accel) acceleration profile 0
[     9.475] (**) Mouse: (accel) acceleration factor: 2.000
[     9.475] (**) Mouse: (accel) acceleration threshold: 4
[     9.475] (II) VMWARE(0): VMMOUSE DEVICE_ON
[     9.481] (II) VMWARE(0): vmmouse enabled
(II) VMWARE(0): vmmouse enable absolute mode
(II) VMWARE(0): re-requesting absolute mode after reset
```

Or in the case of when you are using moused (sysrc
moused_nondefault_enable=3D"YES" moused_enable=3D"YES"), it needs to match =
on
`/dev/sysmouse`:

```
Section "InputClass"
        Identifier      "vmmouse"
        MatchIsPointer  "on"
        MatchDevicePath "/dev/sysmouse"
        Driver          "vmmouse"
EndSection
```

Even though it 'fixes' the problem, I'm not sure if the correct way is by
changing the InputClass match, that's beyond my current know-how.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-244110-7788>