WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Touchscreen on piCore  (Read 5128 times)

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Touchscreen on piCore
« on: May 20, 2022, 08:57:49 AM »
Hello guys,

I have a touchscreen on piCore but it seem that the axe x are reverse

How can I calibrate my screen ?
« Last Edit: May 20, 2022, 09:10:32 AM by MrToga »
It's fine

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: Touchscreen on piCore
« Reply #1 on: May 20, 2022, 10:42:29 AM »
axis x*
It's fine

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1243
Re: Touchscreen on piCore
« Reply #2 on: May 20, 2022, 03:40:38 PM »
Its probably easiest to swap it in the touch driver.  But it depends on what touchscreen you have.

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 713
Re: Touchscreen on piCore
« Reply #3 on: May 21, 2022, 02:22:42 PM »
Is the screen official one ?
You can just edit the config.txt file to swap the screen and the touch.

https://support.thepihut.com/hc/en-us/articles/115002072865-Official-touchscreen-is-upside-down

https://forums.raspberrypi.com/viewtopic.php?t=281149

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: Touchscreen on piCore
« Reply #4 on: May 24, 2022, 08:58:04 AM »
Update :

I needed to install xinput and xrandr, after that I used
Code: [Select]
xinput set-prop <deviceid> "Coordinate Transformation Matrix" -1.1 0 1.02 0 1.05 -0.02 0 0 1link here : https://unix.stackexchange.com/questions/685039/x11-how-to-invert-axis-on-touchscreen-matrix
But now I was wondering if I can make this modification persistent on my rasp I found this but don't know what to do (https://askubuntu.com/questions/20298/how-to-make-xinput-settings-persist-after-devices-are-unplugged-replugged-and)
It's fine

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: Touchscreen on piCore
« Reply #5 on: May 25, 2022, 08:47:43 AM »
Update :

After searching I found out that you can put a file in xorg.conf.d/ to handle the touchscreen ( https://askubuntu.com/questions/178140/xinput-coordinate-transformation-matrix-in-xorg-conf)
But after putting the file in xorg.conf.d and startx my touchscreen isn't modified by that file (See attached file).

Any toughts ?
It's fine

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: Touchscreen on piCore
« Reply #6 on: May 25, 2022, 09:17:58 AM »
Assuming you put the snippet in /usr/local/share/X11/xorg.conf.d, do you need MatchIsTouchscreen "on"?

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: Touchscreen on piCore
« Reply #7 on: May 25, 2022, 09:29:00 AM »
Hi juanito,

I just put MatchTouchscreen "on" betwenn Identifier and Driver it still doesn't work (I'm putting the snippet in /usr/local/share/X11/xorg.conf.d).
Maybe it's my syntax.
Any toughts ?
It's fine

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: Touchscreen on piCore
« Reply #8 on: May 25, 2022, 09:32:30 AM »
Not MatchTouchscreen, but MatchIsTouchscreen...

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: Touchscreen on piCore
« Reply #9 on: May 25, 2022, 09:38:10 AM »
Sorry that's what I wrote in the file but still doesn't work
It's fine

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: Touchscreen on piCore
« Reply #10 on: May 25, 2022, 09:39:21 AM »
So this doesn't work?

Quote
Section "InputClass"
        Identifier "libinput touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
   Option   "TransformationMatrix"   "-1.1 0 1.02 0 1.05 -0.02 0 0 1"
EndSection

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: Touchscreen on piCore
« Reply #11 on: May 25, 2022, 09:54:26 AM »
Yes doesn't work for me
It's fine

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: Touchscreen on piCore
« Reply #12 on: May 25, 2022, 10:05:29 AM »
Are there any other conf snippets in /usr/local/share/X11/xorg.conf.d that might conflict with this?

Offline MrToga

  • Full Member
  • ***
  • Posts: 142
Re: Touchscreen on piCore
« Reply #13 on: May 25, 2022, 10:09:08 AM »
Maybe the 40-libinput.conf but I can't modify this file since it's in /tmp/tcloop/xf86-input-libinput/usr/local/share/X11/xorg.conf.d/
Plus Xorg execute the file with the lowest number first.
« Last Edit: May 25, 2022, 10:10:56 AM by MrToga »
It's fine

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: Touchscreen on piCore
« Reply #14 on: May 25, 2022, 10:10:59 AM »
What happens if you rename your snippet 50-screen.conf -> 10-screen.conf?