xinput 2 "Coordinate Transformation Matrix" not affecting all events

Bug #767315 reported by Anisse Astier
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
xorg-server (Ubuntu)
Expired
Low
Unassigned

Bug Description

After rotating the screen with "xrandr -o left" and rotating the input device with:
xinput set-float-prop 9 "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1

I still noticed some events being sent, but not transformed.
In the sample below, see the jump from y coordinates ~1040 to ~205 and the back (I almost didn't move my finger):
$ xinput test-xi2
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ eGalax Inc. USB TouchController id=9 [slave pointer (2)]
⎜ ↳ HID 04f3:0103 id=11 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
    ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
    ↳ Power Button id=6 [slave keyboard (3)]
    ↳ Video Bus id=7 [slave keyboard (3)]
    ↳ Power Button id=8 [slave keyboard (3)]
    ↳ HID 04f3:0103 id=10 [slave keyboard (3)]
    ↳ USB 2.0 Camera id=12 [slave keyboard (3)]
    ↳ Asus Laptop extra buttons id=13 [slave keyboard (3)]
    ↳ AT Translated Set 2 keyboard id=14 [slave keyboard (3)]
EVENT type 9 (FocusIn)
    device: 3 (3)
    windows: root 0xad event 0x2600001 child 0x0
    mode: NotifyNormal (detail NotifyNonlinear)
    flags: [same screen]
    buttons:
    modifiers: locked 0 latched 0 base 0 effective: 0
    group: locked 0 latched 0 base 0 effective: 0
    root x/y: 590.00 / 1050.00
    event x/y: 523.00 / 997.00

EVENT type 6 (Motion)
    device: 2 (9)
    detail: 0
    flags: Pointer Emulated
    root: 598.83/1065.11
    event: 598.83/1041.11
    buttons: 1
    modifiers: locked 0 latched 0 base 0 effective: 0
    group: locked 0 latched 0 base 0 effective: 0
    valuators:
        1: 25544.00
    windows: root 0xad event 0x2600001 child 0x0
EVENT type 6 (Motion)
    device: 2 (9)
    detail: 0
    flags: Pointer Emulated
    root: 598.83/1065.11
    event: 598.83/1041.11
    buttons: 1
    modifiers: locked 0 latched 0 base 0 effective: 0
    group: locked 0 latched 0 base 0 effective: 0
    valuators:
        1: 25544.00
    windows: root 0xad event 0x2600001 child 0x0
EVENT type 6 (Motion)
    device: 2 (9)
    detail: 0
    flags: Pointer Emulated
    root: 594.71/227.50
    event: 594.71/203.50
    buttons: 1
    modifiers: locked 0 latched 0 base 0 effective: 0
    group: locked 0 latched 0 base 0 effective: 0
    valuators:
        0: 25368.00
        1: 5456.00
    windows: root 0xad event 0x2600001 child 0x0
EVENT type 6 (Motion)
    device: 2 (9)
    detail: 0
    flags: Pointer Emulated
    root: 593.96/226.83
    event: 593.96/202.83
    buttons: 1
    modifiers: locked 0 latched 0 base 0 effective: 0
    group: locked 0 latched 0 base 0 effective: 0
    valuators:
        0: 25336.00
        1: 5440.00
    windows: root 0xad event 0x2600001 child 0x0
EVENT type 6 (Motion)
    device: 2 (9)
    detail: 0
    flags: Pointer Emulated
    root: 592.46/226.17
    event: 592.46/202.17
    buttons: 1
    modifiers: locked 0 latched 0 base 0 effective: 0
    group: locked 0 latched 0 base 0 effective: 0
    valuators:
        0: 25272.00
        1: 5424.00
    windows: root 0xad event 0x2600001 child 0x0
EVENT type 6 (Motion)
    device: 2 (9)
    detail: 0
    flags: Pointer Emulated
    root: 591.33/225.50
    event: 591.33/201.50
    buttons: 1
    modifiers: locked 0 latched 0 base 0 effective: 0
    group: locked 0 latched 0 base 0 effective: 0
    valuators:
        0: 25224.00
        1: 5408.00
    windows: root 0xad event 0x2600001 child 0x0
EVENT type 6 (Motion)
    device: 2 (9)
    detail: 0
    flags: Pointer Emulated
    root: 590.21/224.83
    event: 590.21/200.83
    buttons: 1
    modifiers: locked 0 latched 0 base 0 effective: 0
    group: locked 0 latched 0 base 0 effective: 0
    valuators:
        0: 25176.00
        1: 5392.00
    windows: root 0xad event 0x2600001 child 0x0
EVENT type 6 (Motion)
    device: 2 (9)
    detail: 0
    flags: Pointer Emulated
    root: 590.21/1049.77
    event: 590.21/1025.77
    buttons: 1
    modifiers: locked 0 latched 0 base 0 effective: 0
    group: locked 0 latched 0 base 0 effective: 0
    valuators:
        1: 25176.00
    windows: root 0xad event 0x2600001 child 0x0
EVENT type 6 (Motion)
    device: 2 (9)
    detail: 0
    flags: Pointer Emulated
    root: 590.21/1049.77
    event: 590.21/1025.77
    buttons: 1
    modifiers: locked 0 latched 0 base 0 effective: 0
    group: locked 0 latched 0 base 0 effective: 0
    valuators:
        1: 25176.00
    windows: root 0xad event 0x2600001 child 0x0

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: xserver-xorg-core 2:1.10.1-1ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic i686
Architecture: i386
CompizPlugins: [core,bailer,detection,composite,opengl,decor,mousepoll,vpswitch,regex,animation,snap,expo,move,compiztoolbox,place,grid,imgpng,gnomecompat,wall,ezoom,workarounds,staticswitcher,resize,fade,unitymtgrabhandles,scale,session,unityshell]
CompositorRunning: compiz
DRM.card0.LVDS.1:
 status: connected
 enabled: enabled
 dpms: On
 modes: 1366x768
 edid-base64: AP///////wAmz4kEAAAAAB4UAQOAGg54CrvQlFdVkSchUFQAAAABAQEBAQEBAQEBAQEBAQEBpx9WPlEAIjAwIDwAAJAQAAAZAAAAAAAAAAAAAAAAAAAAAAAAAAAA/QA3QSsxCAAKICAgICAgAAAA/ABNMTE2TldSMSBSMSAKABE=
DRM.card0.VGA.1:
 status: disconnected
 enabled: disabled
 dpms: Off
 modes:
 edid-base64:
Date: Wed Apr 20 17:51:52 2011
DistUpgraded: Fresh install
DistroCodename: natty
DistroVariant: ubuntu
GraphicsCard:
 Intel Corporation N10 Family Integrated Graphics Controller [8086:a011] (prog-if 00 [VGA controller])
   Subsystem: Device [1b0a:00c7]
   Subsystem: Device [1b0a:00c7]
MachineType: PEGATRON M11JB
ProcEnviron:
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.38-8-generic root=UUID=468b816d-d6ee-4e77-949b-2f21644a523b ro splash quiet vt.handoff=7
ProcKernelCmdLine_: BOOT_IMAGE=/boot/vmlinuz-2.6.38-8-generic root=UUID=468b816d-d6ee-4e77-949b-2f21644a523b ro splash quiet vt.handoff=7
Renderer: Unknown
SourcePackage: xorg-server
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 11/19/2010
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: Lucid-GE-133
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: M11JB
dmi.board.vendor: PEGATRON
dmi.board.version: R2.0/R1.1
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 1
dmi.chassis.vendor: PEGATRON
dmi.chassis.version: R2.0/R1.1
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrLucid-GE-133:bd11/19/2010:svnPEGATRON:pnM11JB:pvrR2.0/R1.1:rvnPEGATRON:rnM11JB:rvrR2.0/R1.1:cvnPEGATRON:ct1:cvrR2.0/R1.1:
dmi.product.name: M11JB
dmi.product.version: R2.0/R1.1
dmi.sys.vendor: PEGATRON
version.compiz: compiz 1:0.9.4+bzr20110415-0ubuntu2
version.libdrm2: libdrm2 2.4.23-1ubuntu6
version.libgl1-mesa-dri: libgl1-mesa-dri 7.10.2-0ubuntu2
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 7.10.2-0ubuntu2
version.xserver-xorg: xserver-xorg 1:7.6+4ubuntu3
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.0-0ubuntu4
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.14.0-4ubuntu7
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20110107+b795ca6e-0ubuntu7

Revision history for this message
Anisse Astier (anisse) wrote :
Revision history for this message
Catscrash (catscrash) wrote :

same thing here

Revision history for this message
sdaau (sd-imi) wrote :

Interestingly, the original question

> xinput 2 "Coordinate Transformation Matrix" not affecting all events

... would refer to device id 2, which would be the master (Virtual core pointer id=2 [master pointer (3)]) ...

However, the given example is

> xinput set-float-prop 9 "Coordinate Transformation Matrix" ...

... which refers to a slave device (eGalax Inc. USB TouchController id=9 [slave pointer (2)])...

The problem for me is that I can get my device (touchscreen) rotated with `xinput set-float-prop...` if I get its id right - but I'd like to transform mouse AND touchscreen AND touchpad at the same time with one command, so I'm trying to change "Coordinate Transformation Matrix" of the master (Virtual core pointer id=2); and while I can do that with set-float-prop (since `xinput list-props 2` shows the matrix as changed), there is absolutely no effect on the pointer, from any of the devices.

Is that to say, that "Coordinate Transformation Matrix" for the master Virtual pointer are ignored?

Cheers!

Revision history for this message
sdaau (sd-imi) wrote :

PS: Via

Dual touchscreen support. NOW: Stuck on xinput configuration - Ars Technica OpenForum -
http://arstechnica.com/civis/viewtopic.php?f=16&t=1146846

... found the announcement for the patch allowing the coordinate transform matrix:

[PATCH] evdev: add 3x3 transformation matrix xinput property for multi-head handling -
http://lists.x.org/archives/xorg/2010-April/049967.html

There I can see functions like:
+EvdevTransformAbsolute(InputInfoPtr pInfo, int v[MAX_VALUATORS])

.... depending on "valuators", which can be obtained from xinput via "list" (not 'list-props'); however, note that for the master pointer:

> $ xinput list 2
> Virtual core pointer id=2 [master pointer (3)]
> Reporting 3 classes:
> ...
> Class originated from: 11
> Detail for Valuator 0:
> Label: Rel X
> Range: -1.000000 - -1.000000
> Resolution: 1 units/m
> Mode: relative
> Class originated from: 11
> Detail for Valuator 1:
> Label: Rel Y
> Range: -1.000000 - -1.000000
> Resolution: 1 units/m

... that is, the ranges for both X and Y are 0 (as they both span from -1 to -1); and apparently that is why the coordinate transformation on the master id=2 will not work?

Cheers!

Revision history for this message
Anisse Astier (anisse) wrote :

>Interestingly, the original question
>
>> xinput 2 "Coordinate Transformation Matrix" not affecting all events
>
>... would refer to device id 2, which would be the master (Virtual core pointer id=2 [master pointer (3)]) ...

No it wouldn't. I was refering to XInput, protocol version 2, to say that this property is an XInput property, and not a driver (evdev…) property, like 'Evdev Axes Swap'; which is broken in ubuntu, but utouch team told me migrate to the new 'Coordinate Transformation Matrix', which also happen to be broken.
So, I was indeed referring to device 9 (see xinput.txt)

> The problem for me is that I can get my device (touchscreen) rotated with
> `xinput set-float-prop...` if I get its id right - but I'd like to transform
> mouse AND touchscreen AND touchpad at the same time with one command, so I'm
> trying to change "Coordinate Transformation Matrix" of the master […]

I'm afraid this is another problem, I'd even say a it's a feature request. For now you just do a for loop on all devices and apply the appropriate coordinate transformation matrix.

For example (untested) :
ROTATION="left"
MATRIX="0 -1 1 1 0 0 0 0 1"
xrandr -o $ROTATION
for dev in $(xinput list |grep "slave pointer" | sed -e 's/^.*id=//' | awk '{print $1}')
do
   xinput set-float-prop $dev "Coordinate Transformation Matrix" $MATRIX
done

Cheers :-)

Revision history for this message
sdaau (sd-imi) wrote :

Hi @Anisse Astier,

Awesome - I had indeed misread your original post:

> ....
> So, I was indeed referring to device 9 (see xinput.txt)

... so thanks for clarifying this!

And especially thanks for:

> I'm afraid this is another problem, I'd even say a it's a feature
> request. For now you just do a for loop on all devices and apply the
> appropriate coordinate transformation matrix.

... and the corresponding script. As it can be seen, I don't know much about xinput, and I hadn't found a resource that explained this detail ....

Thanks again,
Cheers!

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

Hey anisse,

You filed this bug report against natty, but I see it's still open and
doesn't appear to have much activity recently. So, now that oneiric
is released and stable, this may be a good point for you to upgrade
and re-test if this issue is still present there.

If it's solved in the new release and you think it's worth backporting
the fix, please indicate that. Or if having the fix in the new release
is good enough, feel free to close out the bug (or let us know and we'll
close it.)

If it's not solved, leave the bug report open. I can't promise we'll
get to it (we get way more bugs filed than we can usually get to), but
your testing and feedback can help out if and when we do.

Changed in xorg-server (Ubuntu):
status: New → Incomplete
Revision history for this message
bugbot (bugbot) wrote :

We're closing this bug since it is has been some time with no response from the original reporter. However, if the issue still exists please feel free to reopen with the requested information. Also, if you could, please test against the latest development version of Ubuntu, since this confirms the bug is one we may be able to pass upstream for help.

Changed in xorg-server (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Mark (mark-a-mester) wrote :

I experience the same problem, bug reported in:

https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1085031

everything detailed in this url.

Changed in xorg-server (Ubuntu):
status: Expired → New
Revision history for this message
penalvch (penalvch) wrote :

Anisse Astier, this bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? If so, could you please test for this with the latest development release of Ubuntu? ISO images are available from http://cdimage.ubuntu.com/daily-live/current/ .

If it remains an issue, could you please run the following command in the development release from a Terminal (Applications->Accessories->Terminal), as it will automatically gather and attach updated debug information to this report:

apport-collect -p xorg-server REPLACE-WITH-BUG-NUMBER

Please note, given you already have done this in a prior release, performing this on a release prior to Trusty would not be helpful.

Thank you for your understanding.

Helpful bug reporting tips:
https://wiki.ubuntu.com/ReportingBugs

Changed in xorg-server (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for xorg-server (Ubuntu) because there has been no activity for 60 days.]

Changed in xorg-server (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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