Ubuntu 18.04 Diametrically Opposed Events on Touchscreen

splinx

New Member
Credits
71
Problem:
My touchscreen functionality is diametrically opposed --> click events shows up mirrored in both the x and y directions from my finger touch location.

Background
The orientation of the built in monitor of my 2in1 Tablet is, by default, inverted (landscape flipped). When setting the screen orientation to inverted, the carrying handle can be placed at the "top" of the screen, which is what I want because the tablet can still be set down on a table/desk and used. I use the GNOME GUI settings to orient the display to inverted.

When I need to log in from a power off event or a restart, my log in screen is up-side-down, and we will orient itself to inverted after the log in attempt.

During boot (in order):
  1. Screen to enter BIOS appears inverted (the way I want my screen)
  2. GRUB menu appears normal (up-side-down)
  3. Log in screen appears normal (up-side-down) - first location I can see the touch controls are diametrically opposed.
  4. Desktop appears and the screen will be oriented correctly based GNOME GUI settings chosen.
Extra - When shutting down the shown CLI appears normal (up-side-down).

Additional Info
  • The touch functionality and screen orientation work correctly in the BIOS.
    • Screen is shown as inverted (how I want it)
    • Touch click events show up where my finger touches.
Hardware

10thGen Intel i7-10710U
Intel UHD Graphics (CML GT2) (0x9bca)

Operating System

Ubuntu 18.04.5 LTS (Bionic)

Additionally Package Management

sudo apt-get remove -y iio-sensor-proxy

The iio-sensor-proxy package causes known problems with accelerometer readings and the built in display is automatically rotated to an incorrect orientation. I do not need the auto rotation feature, so to save some headaches the package is removed immediately after OS install.

Attempted Solutions

I have primarily tried the xinput transformation matrix (https://wiki.ubuntu.com/X/InputCoordinateTransformation), but I believe this is just another way to orient the screen and not affect the touch calibration.

After doing some more reading I found the xinput_calibrator tool. It seems to be tied to xorg by using a .conf file in /etc/X11. When using the xinput calibrator my touches show up correctly on the targets. I do not currently understand xorg and how it handles sessions etc (related to log in screen and wanting to fix the problem permanently and not after every log in attempt). I don't understand how it is further related to evdev.

Here are my xinput results

~$ xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Corsair Corsair Gaming K55 RGB Keyboard Consumer Control id=12 [slave pointer (2)]
⎜ ↳ eGalax Inc. eGalaxTouch P80H46 0486 v01_T2 k4.06.186 Mouse id=14 [slave pointer (2)]
⎜ ↳ Logitech G305 id=10 [slave pointer (2)]
⎜ ↳ eGalax Inc. eGalaxTouch P80H46 0486 v01_T2 k4.06.186 id=13 [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)]
↳ Sleep Button id=9 [slave keyboard (3)]
↳ Corsair Corsair Gaming K55 RGB Keyboard id=11 [slave keyboard (3)]
↳ eGalax Inc. eGalaxTouch P80H46 0486 v01_T2 k4.06.186 id=15 [slave keyboard (3)]
↳ OYT 8M AF USB Camera: OYT 8M AF id=16 [slave keyboard (3)]
↳ Atlas ACPI button driver id=17 [slave keyboard (3)]
↳ Corsair Corsair Gaming K55 RGB Keyboard Consumer Control id=19 [slave keyboard (3)]
↳ Logitech G305 id=18 [slave keyboard (3)]

Here are my xinput_calibrator -v results

~$ xinput_calibrator -v
DEBUG: XInputExtension version is 2.3
DEBUG: Skipping virtual master devices and devices without axis valuators.
DEBUG: Skipping device 'Virtual core XTEST pointer' id=4, does not report Absolute events.
DEBUG: Skipping device 'Corsair Corsair Gaming K55 RGB Keyboard Consumer Control' id=12, does not report Absolute events.
DEBUG: Skipping device 'Logitech G305' id=10, does not report Absolute events.
Warning: multiple calibratable devices found, calibrating last one (eGalax Inc. eGalaxTouch P80H46 0486 v01_T2 k4.06.186)
use --device to select another one.
DEBUG: Selected device: eGalax Inc. eGalaxTouch P80H46 0486 v01_T2 k4.06.186
DEBUG: Not usbtouchscreen calibrator: Not a usbtouchscreen device
DEBUG: Not evdev calibrator: Evdev: invalid "Evdev Axis Calibration" property format
Calibrating standard Xorg driver "eGalax Inc. eGalaxTouch P80H46 0486 v01_T2 k4.06.186"
current calibration values: min_x=0, max_x=65535 and min_y=0, max_y=65535
If these values are estimated wrong, either supply it manually with the --precalib option, or run the 'get_precalib.sh' script to automatically get it (through HAL).
DEBUG: Found that 'eGalax Inc. eGalaxTouch P80H46 0486 v01_T2 k4.06.186' is a sysfs name.
DEBUG: Adding click 0 (X=1678, Y=1036)
DEBUG: Adding click 1 (X=292, Y=1049)
DEBUG: Mis-click detected, click 2 (X=1703, Y=361) not aligned with click 0 (X=1678, Y=1036) or click 1 (X=292, Y=1049) (threshold=15)
DEBUG: Adding click 0 (X=1666, Y=1040)
DEBUG: Adding click 1 (X=217, Y=1047)
DEBUG: Mis-click detected, click 2 (X=1683, Y=144) not aligned with click 0 (X=1666, Y=1040) or click 1 (X=217, Y=1047) (threshold=15)
DEBUG: Adding click 0 (X=1673, Y=1039)
DEBUG: Adding click 1 (X=241, Y=1052)
DEBUG: Adding click 2 (X=1665, Y=148)
DEBUG: Adding click 3 (X=226, Y=134)
--> Making the calibration permanent <--
DEBUG: Found that 'eGalax Inc. eGalaxTouch P80H46 0486 v01_T2 k4.06.186' is a sysfs name.
copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf' (/usr/share/X11/xorg.conf.d/ in some distro's)
Section "InputClass"
Identifier "calibration"
MatchProduct "eGalax Inc. eGalaxTouch P80H46 0486 v01_T2 k4.06.186"
Option "MinX" "65134"
Option "MaxX" "-196"
Option "MinY" "65330"
Option "MaxY" "-532"
Option "SwapXY" "0" # unless it was already set to 1
Option "InvertX" "0" # unless it was already set
Option "InvertY" "0" # unless it was already set
EndSection

Help

I have tried placing the "snippet below" from xinput_calibrator into /etc/X11/xorg.conf.d/99-calibration.conf. I had to create /xorg.conf.d and the file 99-calibration.conf but this does not seem to do anything.


Any help would be appreciated.
 
Last edited:
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online


Latest posts

Top