xf86-input-vmmouse InputClass not matching on FreeBSD
This bug report is for xorg/driver/xf86-input-vmmouse
on FreeBSD. I filed it here because there is no way to open issues for that project.
Summary
When using AutoAddDevices
xorg 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
.
Description
Currently in 50-vmmouse.conf
(as provided by the xf86-input-vmmouse
driver)
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
driver.
[ 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="X.Org Foundation"
[ 9.161] compiled for 1.18.4, module version = 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] (==) sysmouse: Protocol: "Auto"
[ 9.161] (**) sysmouse: always reports core events
[ 9.161] (==) 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: MOUSE, 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] (==) Mouse: Protocol: "Auto"
[ 9.194] (**) Mouse: always reports core events
[ 9.227] (==) 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
Or when using udev, /dev/input/event*
(lshal_output.txt):
[ 23.244] (II) config/udev: Adding input device System mouse (/dev/input/event0)
[ 23.244] (**) System mouse: Applying InputClass "evdev pointer catchall"
[ 23.244] (**) System mouse: Applying InputClass "libinput pointer catchall"
[ 23.244] (II) LoadModule: "libinput"
[ 23.244] (II) Loading /usr/local/lib/xorg/modules/input/libinput_drv.so
[ 23.256] (II) Module libinput: vendor="X.Org Foundation"
[ 23.257] compiled for 1.20.9, module version = 0.30.0
[ 23.257] Module class: X.Org XInput Driver
[ 23.257] ABI class: X.Org XInput driver, version 24.1
[ 23.257] (II) Using input driver 'libinput' for 'System mouse'
[ 23.257] (**) System mouse: always reports core events
[ 23.257] (**) Option "Device" "/dev/input/event0"
[ 23.257] (**) Option "_source" "server/udev"
[ 23.264] (II) event0 - System mouse: is tagged by udev as: Mouse
[ 23.264] (II) event0 - System mouse: device is a pointer
[ 23.265] (II) event0 - System mouse: device removed
[ 23.265] (**) Option "config_info" "udev:/dev/input/event0"
[ 23.265] (II) XINPUT: Adding extended input device "System mouse" (type: MOUSE, id 6)
[ 23.265] (**) Option "AccelerationScheme" "none"
[ 23.265] (**) System mouse: (accel) selected scheme none/0
[ 23.265] (**) System mouse: (accel) acceleration factor: 2.000
[ 23.265] (**) System mouse: (accel) acceleration threshold: 4
[ 23.266] (II) event0 - System mouse: is tagged by udev as: Mouse
[ 23.266] (II) event0 - System mouse: device is a pointer
[ 23.267] (II) config/udev: Adding input device System keyboard multiplexer (/dev/input/event1)
[ 23.267] (**) System keyboard multiplexer: Applying InputClass "evdev keyboard catchall"
[ 23.267] (**) System keyboard multiplexer: Applying InputClass "Evdev keyboard"
[ 23.267] (**) System keyboard multiplexer: Applying InputClass "libinput keyboard catchall"
[ 23.267] (II) Using input driver 'libinput' for 'System keyboard multiplexer'
[ 23.267] (**) System keyboard multiplexer: always reports core events
[ 23.267] (**) Option "Device" "/dev/input/event1"
[ 23.267] (**) Option "_source" "server/udev"
[ 23.268] (II) event1 - System keyboard multiplexer: is tagged by udev as: Keyboard
[ 23.268] (II) event1 - System keyboard multiplexer: device is a keyboard
[ 23.268] (II) event1 - System keyboard multiplexer: device removed
[ 23.268] (**) Option "config_info" "udev:/dev/input/event1"
Workaround
Change 50-vmmouse.conf
to match on the device instead.
Section "InputClass"
Identifier "vmmouse"
MatchIsPointer "on"
MatchDevicePath "/dev/psm0"
Driver "vmmouse"
EndSection
...if using using moused
Section "InputClass"
Identifier "vmmouse"
MatchIsPointer "on"
MatchDevicePath "/dev/sysmouse"
Driver "vmmouse"
EndSection
...Or on later versions of FreeBSD and Xorg with udev using /dev/input/event*
:
Section "InputClass"
Identifier "vmmouse"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "vmmouse"
EndSection
The correct driver is loaded, for example:
[ 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="X.Org Foundation"
[ 9.408] compiled for 1.18.4, module version = 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: MOUSE, 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
Solution
I'm unsure of what the correct solution is other than the workaround.