Bug 1322712 - incorrect mouse pointer movement after screen rotation in vmware 12
Summary: incorrect mouse pointer movement after screen rotation in vmware 12
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: xorg-x11-drv-vmmouse
Version: 6.8
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Peter Hutterer
QA Contact: Desktop QE
Lucie Maňásková
URL:
Whiteboard:
Depends On: 1318340 1361531
Blocks: 1360926 1361532
TreeView+ depends on / blocked
 
Reported: 2016-03-31 08:02 UTC by Tomas Hudziec
Modified: 2017-01-02 13:57 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
Incorrect mouse pointer movement after screen rotation inside a virtual machine in VMWare 11 or VMWare 12 If the screen rotation is changed inside a virtual machine in VMWare 11 or VMWare 12, the pointer movement remains unchanged. This only happens when the `xorg-x11-drv-vmware` driver is used, which initializes an absolute-axis device rather than a relative-axis device. The pointer does not follow the expected path because the driver is still mapping to the original coordinate system. To work around this problem, it it necessary to manually rotate the device, for example by running the following command: xinput set-prop "ImPS/2 Generic Wheel Mouse" "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1 Note that the command above is only an example. In general, the matrix needs to be adjusted depending on the specific scenario. Once the matrix is applied, pointer movement matches the rotation of the screen.
Clone Of: 1318340
: 1361532 (view as bug list)
Environment:
Last Closed: 2016-08-25 23:53:16 UTC
Target Upstream Version:


Attachments (Terms of Use)

Comment 2 Peter Hutterer 2016-08-25 10:09:45 UTC
Confirmed but only an issue when xorg-x11-drv-vmmouse is used. evdev behaves as expected.

Comment 3 Peter Hutterer 2016-08-25 23:31:31 UTC
Ok, this is intended behaviour. We have two types of pointer devices in X: relative and absolute devices. Relative devices like mice are rotated with the screen output and thus automatically adjust. That's why evdev works as expected within vmware.

Absolute pointer devices are not rotated by default. The reason for this decision was that a significant number of touchscreens are mounted wrongly and need extra calibration. And in the multi-monitor case (quite frequent nowadays with touch-capable laptops) the driver does not even know which screen area input is mapped to, let alone rotation.

This is the policy in the server, now let's look at vmmouse. It communicates with the VMware Player and initializes the device as an absolute device.

$> xinput list "ImPS/2 Generic Wheel Mouse"
ImPS/2 Generic Wheel Mouse              	id=6	[slave  pointer  (2)]
	Reporting 3 classes:
		Class originated from: 6. Type: XIButtonClass
		Buttons supported: 5
		Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down"
		Button state:
		Class originated from: 6. Type: XIValuatorClass
		Detail for Valuator 0:
		  Label: Abs X
		  Range: 0.000000 - 65535.000000
		  Resolution: 10000 units/m
		  Mode: absolute
		  Current value: 57368.000000
		Class originated from: 6. Type: XIValuatorClass
		Detail for Valuator 1:
		  Label: Abs Y
		  Range: 0.000000 - 65535.000000
		  Resolution: 10000 units/m
		  Mode: absolute
		  Current value: 42196.000000

Pointer updates are sent as absolute coordinates, the device thus looks like a touchscreen to X. And thus it's not rotated automatically. Rotation can be achieved by adjusting the transformation matrix to the respective values. For example, if the screen is rotated "left", this command adjusts the matrix accordingly:

xinput set-prop "ImPS/2 Generic Wheel Mouse" "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1

There is a long beginner-friendly writeup of the matrix here:
https://wiki.ubuntu.com/X/InputCoordinateTransformation

Note there is another device called VMware VMware Virtual USB Mouse that is only used when vmmouse doesn't initialize. That's the device evdev uses but it is mute whenever vmmouse is active.

Anyway, devel_nak because this is server policy and applies to any absolute device such as touchscreens.

Comment 4 RHEL Program Management 2016-08-25 23:53:16 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.


Note You need to log in before you can comment on or make changes to this bug.