touchscreen doesn't rotate, but everything esle does

Hello,

My touchscreen is rotated wrong from the beginning (displays the lines from left to right instead from up to down). I rotate it in KDE with system settings and the display rotates, also the touchpad works fine/rotates, but the touchscreen is wrong: touching fro left to right moves the cursor up to down, touching from up to down moves the cursor from right to left.

This is a lenovo ideapad Duet 3
fresh install of Opensuse 15.3
KDE
uses X11, display-manager sddm

After searching I did
added to usr/share/x11/xorg.conf.d/10-evdev.conf
Option “SwapXY” “true”
in section InputClass - evdev touchscreen catchall

  • no change after reboot

added the same in etc/x11/xorg.conf.d/10-evdev.conf

  • no change after reboot

I am not sure, but it seems to me that actually evdev is not used as the driver. Searching /var/log/Xorg.0.log for “touchscreen” I find the following (hope I copied the correct…):


    32.457] (II) config/udev: Adding input device ELAN901C:00 04F3:2BD6 (/dev/input/event15)
    32.457] (**) ELAN901C:00 04F3:2BD6: Applying InputClass "evdev touchscreen catchall"
    32.457] (**) ELAN901C:00 04F3:2BD6: Applying InputClass "evdev touchscreen catchall"
    32.457] (**) ELAN901C:00 04F3:2BD6: Applying InputClass "libinput touchscreen catchall"
    32.457] (II) Using input driver 'libinput' for 'ELAN901C:00 04F3:2BD6'
    32.457] (**) ELAN901C:00 04F3:2BD6: always reports core events
    32.457] (**) Option "Device" "/dev/input/event15"
    32.457] (**) Option "_source" "server/udev"
    32.458] (II) event15 - ELAN901C:00 04F3:2BD6: is tagged by udev as: Touchscreen
    32.458] (II) event15 - ELAN901C:00 04F3:2BD6: device is a touch device
    32.458] (II) event15 - ELAN901C:00 04F3:2BD6: device removed
    32.487] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:16.3/i2c_designware.1/i2c-7/i2c-ELAN901C:00/0018:04F3:2BD6.0003/input/input22/event15"
    32.487] (II) XINPUT: Adding extended input device "ELAN901C:00 04F3:2BD6" (type: TOUCHSCREEN, id 16)
    32.487] (**) Option "AccelerationScheme" "none"
    32.487] (**) ELAN901C:00 04F3:2BD6: (accel) selected scheme none/0
    32.487] (**) ELAN901C:00 04F3:2BD6: (accel) acceleration factor: 2.000
    32.487] (**) ELAN901C:00 04F3:2BD6: (accel) acceleration threshold: 4
    32.488] (II) event15 - ELAN901C:00 04F3:2BD6: is tagged by udev as: Touchscreen
    32.488] (II) event15 - ELAN901C:00 04F3:2BD6: device is a touch device
    32.489] (II) config/udev: Adding input device ELAN901C:00 04F3:2BD6 (/dev/input/mouse2)
    32.489] (II) No input driver specified, ignoring this device.
    32.489] (II) This device may have been added with another device file.
    32.489] (II) config/udev: Adding input device ELAN901C:00 04F3:2BD6 UNKNOWN (/dev/input/event16)
    32.490] (II) No input driver specified, ignoring this device.
    32.490] (II) This device may have been added with another device file.
    32.490] (II) config/udev: Adding input device ELAN901C:00 04F3:2BD6 UNKNOWN (/dev/input/event17)
    32.490] (II) No input driver specified, ignoring this device.
    32.490] (II) This device may have been added with another device file.
    32.491] (II) config/udev: Adding input device ELAN901C:00 04F3:2BD6 (/dev/input/event18)
    32.491] (**) ELAN901C:00 04F3:2BD6: Applying InputClass "evdev tablet catchall"
    32.491] (**) ELAN901C:00 04F3:2BD6: Applying InputClass "evdev tablet catchall"
    32.491] (**) ELAN901C:00 04F3:2BD6: Applying InputClass "libinput tablet catchall"
    32.491] (II) Using input driver 'libinput' for 'ELAN901C:00 04F3:2BD6'
    32.491] (**) ELAN901C:00 04F3:2BD6: always reports core events
    32.491] (**) Option "Device" "/dev/input/event18"
    32.491] (**) Option "_source" "server/udev"
    32.492] (II) event18 - ELAN901C:00 04F3:2BD6: is tagged by udev as: Tablet
    32.540] (II) event18 - ELAN901C:00 04F3:2BD6: tablet 'ELAN901C:00 04F3:2BD6' unknown to libwacom
    32.540] (II) event18 - ELAN901C:00 04F3:2BD6: device is a tablet
    32.540] (II) event18 - ELAN901C:00 04F3:2BD6: device removed
    32.579] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:16.3/i2c_designware.1/i2c-7/i2c-ELAN901C:00/0018:04F3:2BD6.0003/input/input25/event18"
    32.579] (II) XINPUT: Adding extended input device "ELAN901C:00 04F3:2BD6" (type: TABLET, id 17)
    32.580] (II) event18 - ELAN901C:00 04F3:2BD6: is tagged by udev as: Tablet
    32.592] (II) event18 - ELAN901C:00 04F3:2BD6: tablet 'ELAN901C:00 04F3:2BD6' unknown to libwacom
    32.592] (II) event18 - ELAN901C:00 04F3:2BD6: device is a tablet
    32.592] (II) config/udev: Adding input device ELAN901C:00 04F3:2BD6 (/dev/input/mouse3)
    32.592] (II) No input driver specified, ignoring this device.
    32.592] (II) This device may have been added with another device file.
    32.593] (II) config/udev: Adding input device Ideapad extra buttons (/dev/input/event13)

Anybody knows how I can make the touchscreen rotate and work correctly?
Thanks a lot!

almost solved:

according to the output of


xinput list

my touchscreen is called ‘ELAN901C:00 04F3:2Bd6’. As it seems that there are two devices with that name I had o use the prefix “pointer:” in the following command:

xinput set-prop pointer:'ELAN901C:00 04F3:2Bd6' 'Coordinate  Transformation Matrix' 0 1 0 -1 0 1 0 0 1

(there is a page that explains it good: https://wiki.ubuntu.com/X/InputCoordinateTransformation )

to make this setting permanent I added a script “Xsetup” to

/etc/X11/xdm/scripts

that contains the above line.
then I added in the empty file

/etc/sdm.conf
[XDisplay] 
DisplayCommand=/etc/X11/xdm/scripts/Xsetup 

This works, also after reboot.

There remains a little problem:

The App-Starter-Icons on the Desktop do not react on touch (they don’t get marked nor start the app).

But in one exception desktop-icon-touch works: When I first touch an open window, and after that touch an icon, it works (app starts) as it should. But only if I first touch an open window, and then it only works once, directly after touching that window.

How can I resolve this?

Hi danielbasel
I have the same laptop 10IGL5 N5030, 8GB Ram 128GB eMMC. Initially I had the same issue as you minus “the little problem”. On my machine, tipping on an icon starts the app.
Thankks to your posts here, I was able to solve - almost - all problems.

I run Leap 15.3 on it using KDE plasma. So maybe, if you switch to KDE, you might have your “little problem” solved :slight_smile:

To achieve screen being permantly rotated right I did as follows:

cat /usr/share/sddm/scripts/Xsetup
#! /bin/sh

Xsetup - run as root before the login dialog appears

#rotate screen right:
xrandr – output DSI-1 --rotate right

get touchscreen (finger touch) mapping correct

note I use the numeric ID as obtained from “xinput list | grep ELAN”, which retuns id=22

I could not use ‘ELAN901C:00 04F3:2Bd6’, as there were two with the same id string and ids 22 and 23

23 is “[slave keyboard (3)]”

xinput set-prop 22 ‘Coordinate Transformation Matrix’ 0 1 0 -1 0 1 0 0 1

get the stylus orientation correct

note: does not work at boot time, as the device “ELAN901C:00 04F3:2Bd6 Pen (0)” is not listed then!

xinput set-prop 30 ‘Coordinate Transformation Matrix’ 0 1 0 -1 0 1 0 0 1

The tablet is intended for my wife. She does not use the stylus (pen), however, I do, as I do some drawings on it.
The real strage thing is:

  • On login, the pen can be used, but as mentioned, its orientation is false. Thus you tap on something and the cursor jumps to a false position.
  • Logging in using finger and virtual keyboard works flawlessly however, so for that part, above script works fine
  • If I do “xinput list” “ELAN901C:00 04F3:2Bd6 Pen (0)” is NOT there, even if tapping with it on the login screen
  • If logged in, tpping on the screen with the pen mracoulously brings “ELAN901C:00 04F3:2Bd6 Pen (0)” up and “xinput list” shows it with an “id=30”.
  • If I do now the “xinput set-prop 30 ‘Coordinate Transformation Matrix’ 0 1 0 -1 0 1 0 0 1” the pen works as wanted.
  • When I log out, I can tp on “OK” using the pen
  • Then the login screen reapears and the pen is wrong
    again, while finger touch works as expected. - If I log in, the pen remains wrong until I execute “xinput set-prop 30 ‘Coordinate Transformation Matrix’ 0 1 0 -1 0 1 0 0 1”, but now “xinput list” shows “ELAN901C:00 04F3:2Bd6 Pen (0)”
  • => on boot, the pen is not seen: why?
  • => logging out and in makes the pen loos its set properties: why?

So my “little problem” is, how do I get the pen work correctly on login screen?
greez
chris

Little update
When trying to show the shiny piece to my wife, nothing worked anymore. Looking at the output of xinput list I discovered, the id numbers are changed.

new, working stuff looks like that:

cat Xsetup 
#!/bin/sh
# Xsetup - run as root before the login dialog appears

#rotate screen right:
xrandr --output DSI-1 --rotate right

# get touchscreen (finger touch) mapping correct
# note I use the numeric ID as obtained from "xinput list | grep ELAN", which retuns id=22
# I could not use 'ELAN901C:00 04F3:2Bd6', as there were two with the same id string and ids 22 and 23
# 23 is "[slave keyboard (3)]"
#echo touchscreen
id=$(xinput list | grep ELAN | grep pointer | sed 's/.*id=//' | sed 's/\s.*//')
xinput set-prop $id 'Coordinate Transformation Matrix' 0 1 0 -1 0 1 0 0 1

# get the stylus/pen orientation correct
# note: does not work at boot time, as the device "ELAN901C:00 04F3:2Bd6 Pen (0)" is not listed then!
echo pen
id=$(xinput list | grep ELAN | grep Pen | sed 's/.*id=//' | sed 's/\s.*//')
xinput set-prop $id 'Coordinate Transformation Matrix' 0 1 0 -1 0 1 0 0 1


Sorry for the mishap
greez
chris

It still has some flaws. After Hibernating, all was wrong again.

So, not yet solved.
Greez
chris