Re: touchscreen inversion stopped working PIXEL
Hi folks,
I also heavily struggling due to the change to libdev. Rotating the touch input worked for me, however how do I calibrate the display? Must this also be done with the transformation matrix? https://wiki.archlinux.org/index.php/Ca ... ouchscreen implies this.
If this is the way to do it, how to find the touch area offset and touch area width?
In which way have the values to be altered when the touch input needs to be rotated?
I also heavily struggling due to the change to libdev. Rotating the touch input worked for me, however how do I calibrate the display? Must this also be done with the transformation matrix? https://wiki.archlinux.org/index.php/Ca ... ouchscreen implies this.
If this is the way to do it, how to find the touch area offset and touch area width?
In which way have the values to be altered when the touch input needs to be rotated?
Re: touchscreen inversion stopped working PIXEL
after some digging, I think the best answer is to create a 99-calibration.conf at /usr/share/X11/xorg.conf.d/99-calibration.conf
disclaimer: I started with latest raspbian lite, installed basic lxde and noticed xinput_calibration doesn't work anymore.. so it seems now it uses libinput... the `xinput --send-prop` works charm but is lost after reboot and somehow it doesn't work if I add it at LXDE/autostart as suggested...
to me, it was enough to get an approximated calibration, but you could change the transformation matrix a little to fix manually...
Code: Select all
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1"
EndSection
to me, it was enough to get an approximated calibration, but you could change the transformation matrix a little to fix manually...
- Pinkie Pi(e)
- Posts: 10
- Joined: Mon Jun 03, 2013 8:08 am
Re: touchscreen inversion stopped working PIXEL
I can confirm this problem and would appreciate any help to fix it.
The only way I could get my new Waveshare 3.5"(a) Display's Touchscreen to work & calibrate it correctly, was to re-install the 11.01.2017 Raspbian image and then not applying any updates.
I'm using the "LCD-show-161112.tar.gz" driver from Waveshare and xinput-calibrator for calibration, as described in this wiki: http://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)
Is there any way to make this work with a fully updated Raspbian, or do i have to wait for Waveshare to release a new driver?
The only way I could get my new Waveshare 3.5"(a) Display's Touchscreen to work & calibrate it correctly, was to re-install the 11.01.2017 Raspbian image and then not applying any updates.
I'm using the "LCD-show-161112.tar.gz" driver from Waveshare and xinput-calibrator for calibration, as described in this wiki: http://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)
Is there any way to make this work with a fully updated Raspbian, or do i have to wait for Waveshare to release a new driver?
- Pinkie Pi(e)
- Posts: 10
- Joined: Mon Jun 03, 2013 8:08 am
Re: touchscreen inversion stopped working PIXEL
Any way at all, or am I out of luck until a driver update?
Re: touchscreen inversion stopped working PIXEL
Have now the same problem --> rasbian full from january updated today -> touch is not working correctly, its mirrored...on an Raspberry 1 with an fake? waveshare 3,5 display
Any solution?
Any solution?
- Pinkie Pi(e)
- Posts: 10
- Joined: Mon Jun 03, 2013 8:08 am
Re: touchscreen inversion stopped working PIXEL
I'm still stuck too, sadly.cubii wrote:Have now the same problem --> rasbian full from january updated today -> touch is not working correctly, its mirrored...on an Raspberry 1 with an fake? waveshare 3,5 display
Any solution?
Re: touchscreen inversion stopped working PIXEL
My workaround:
1. Make sure that /etc/X11/xorg.conf.d is empty.
2. /usr/share/X11/xorg.conf.d should contain something like:
10-quirks.conf 40-libinput.conf 45-evdev.conf 70-synaptics.conf 99-calibration.conf 99-fbturbo.conf
Just be sure that evdev.conf has a higher number than libinput.conf
this forces evdev to load after libinput
3. My 99-calibration.conf :
Your numbers might vary.
1. Make sure that /etc/X11/xorg.conf.d is empty.
2. /usr/share/X11/xorg.conf.d should contain something like:
10-quirks.conf 40-libinput.conf 45-evdev.conf 70-synaptics.conf 99-calibration.conf 99-fbturbo.conf
Just be sure that evdev.conf has a higher number than libinput.conf
this forces evdev to load after libinput
3. My 99-calibration.conf :
Code: Select all
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3955 273 208 3844"
Option "SwapAxes" "1"
EndSection
- Pinkie Pi(e)
- Posts: 10
- Joined: Mon Jun 03, 2013 8:08 am
Re: touchscreen inversion stopped working PIXEL
I would have loved to try your workaround but it seems like now, one of the last dist-upgrade or rpi-update updates stopped the screen from working completely.w4kil wrote:My workaround:
1. Make sure that /etc/X11/xorg.conf.d is empty.
2. /usr/share/X11/xorg.conf.d should contain something like:
10-quirks.conf 40-libinput.conf 45-evdev.conf 70-synaptics.conf 99-calibration.conf 99-fbturbo.conf
Just be sure that evdev.conf has a higher number than libinput.conf
this forces evdev to load after libinput
3. My 99-calibration.conf :
Your numbers might vary.Code: Select all
Section "InputClass" Identifier "calibration" MatchProduct "ADS7846 Touchscreen" Option "Calibration" "3955 273 208 3844" Option "SwapAxes" "1" EndSection
Even reinstalling it by using the instructions and drivers from the waveshare wiki won't work now.
The screen just stays white.
I'm starting to grow rather frustrated with all those problems.
Some log entries that might be related:
syslog:
Code: Select all
Mar 1 01:14:05 RaspberryPi lightdm[557]: ** (lightdm:557): WARNING **: Error using VT_ACTIVATE 7 on /dev/console: Inappropriate ioctl for device
Mar 1 01:14:05 RaspberryPi lightdm[557]: ** (lightdm:557): WARNING **: Error using VT_WAITACTIVE 7 on /dev/console: Inappropriate ioctl for device
Mar 1 01:14:13 RaspberryPi lightdm[557]: ** (lightdm:557): WARNING **: Error using VT_GETSTATE on /dev/console: Inappropriate ioctl for device
Mar 1 01:14:20 RaspberryPi lightdm[557]: ** (lightdm:557): WARNING **: Error using VT_GETSTATE on /dev/console: Inappropriate ioctl for device
Mar 1 01:14:33 RaspberryPi lightdm[557]: ** (process:1206): WARNING **: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
Mar 1 01:14:33 RaspberryPi rsyslogd-2007: action 'action 17' suspended, next retry is Wed Mar 1 01:15:03 2017 [try http://www.rsyslog.com/e/2007 ]
kern.log:
Code: Select all
Mar 1 00:45:10 RaspberryPi kernel: [ 12.621610] spi0.1 supply vcc not found, using dummy regulator
Mar 1 00:45:10 RaspberryPi kernel: [ 12.679327] ads7846 spi0.1: touchscreen, irq 177
Mar 1 00:45:10 RaspberryPi kernel: [ 12.684365] input: ADS7846 Touchscreen as /devices/platform/soc/20204000.spi/spi_master/spi0/spi0.1/input/input0
Mar 1 00:45:10 RaspberryPi kernel: [ 12.738164] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
Mar 1 00:45:10 RaspberryPi kernel: [ 12.819899] fb_ili9486: module is from the staging directory, the quality is unknown, you have been warned.
Mar 1 00:45:10 RaspberryPi kernel: [ 12.821349] pinctrl-bcm2835 20200000.gpio: pin gpio17 already requested by spi0.1; cannot claim for spi0.0
Mar 1 00:45:10 RaspberryPi kernel: [ 12.821371] pinctrl-bcm2835 20200000.gpio: pin-17 (spi0.0) status -22
Mar 1 00:45:10 RaspberryPi kernel: [ 12.821426] pinctrl-bcm2835 20200000.gpio: could not request pin 17 (gpio17) from group gpio17 on device pinctrl-bcm2835
Mar 1 00:45:10 RaspberryPi kernel: [ 12.821439] fb_ili9486 spi0.0: Error applying setting, reverse things back
Mar 1 00:45:10 RaspberryPi kernel: [ 12.821476] fb_ili9486: probe of spi0.0 failed with error -22
Code: Select all
[+1065.53s] DEBUG: Activating VT 7
[+1065.53s] WARNING: Error using VT_ACTIVATE 7 on /dev/console: Inappropriate ioctl for device
[+1065.54s] WARNING: Error using VT_WAITACTIVE 7 on /dev/console: Inappropriate ioctl for device
Re: touchscreen inversion stopped working PIXEL
Wish I could help you further. I was at the point of trying all kinds of values in the "TransformationMatrix" and
getting no where. After lots of searching I found the idea of putting "evdev" higher than libinput. Then the old
way of using the "calibration" worked a charm. BTW I'm working with an updated "2017-01-11-raspbian-jessie.img".
getting no where. After lots of searching I found the idea of putting "evdev" higher than libinput. Then the old
way of using the "calibration" worked a charm. BTW I'm working with an updated "2017-01-11-raspbian-jessie.img".
- Pinkie Pi(e)
- Posts: 10
- Joined: Mon Jun 03, 2013 8:08 am
Re: touchscreen inversion stopped working PIXEL
Thanks a lot for trying to help.w4kil wrote:Wish I could help you further. I was at the point of trying all kinds of values in the "TransformationMatrix" and
getting no where. After lots of searching I found the idea of putting "evdev" higher than libinput. Then the old
way of using the "calibration" worked a charm. BTW I'm working with an updated "2017-01-11-raspbian-jessie.img".
When you say updated, does that include the newest firmware by running rpi-update?
Or just apt-get update + apt-get dist-upgrade?
I just tried updating a backup based on 2017-01-11-raspbian-jessie.img.
Updating by running apt-get update + apt-get dist-upgrade does work fine (aside from touch not working properly, but thats what your workaround would be for).
However, updating the firmware through rpi-update did result in a blank, white screen for me again.
Reinstalling the driver over SSH doesn't seem to fix it.
Re: touchscreen inversion stopped working PIXEL
O.K. I started over with the latest image(2017-02-16) with just apt update/upgrade. Here are my files:
cmdline.txt
config.txt
ads7846 is already in the overlay folder. You'll have to get waveshare35a from whereever(it's all over the internet).
Then just follow the rest of my above post.
Hope this helps.
cmdline.txt
Code: Select all
dwc_otg.lpm_enable=0 console=tty1 console=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo
Code: Select all
dtoverlay=waveshare35a
dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vref_on=1,swapxy=1,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900
Then just follow the rest of my above post.
Hope this helps.
Re: touchscreen inversion stopped working PIXEL
I'm having the same issue with updated 2017-01-11-raspbian-jessie and also with clean install of the feb update. I'm using eGalax touch panel. The lcd displays correctly and adding the 99-calibration.conf hasn't worked for me. My y axis is always inverted. Tried InvertY and SwapAxis with no luck. I downgraded and didn't update the Jan release and its works flawless. Any suggestions is greatly appreciated I'm fairly new so troubleshooting is hard due to my lack of knowledge.
For ref i'm using an Innolux 1024x600 7" screen with a touch panel from their 800x480 screen that i salvaged from the E-Log systems we use for our log books as a commercial driver. They work perfect just had to buy a vga board and the usb touch driver. hope this helps anyone puling their hair out!!
Thanks for reading
For ref i'm using an Innolux 1024x600 7" screen with a touch panel from their 800x480 screen that i salvaged from the E-Log systems we use for our log books as a commercial driver. They work perfect just had to buy a vga board and the usb touch driver. hope this helps anyone puling their hair out!!
Thanks for reading
Re: touchscreen inversion stopped working PIXEL
Hi,
recently (beginning of march) i started a new try and used a fresh Image (raspbian (not-lite? im not sure)) from Januar, updatet it completly and my Touchscreen (Waveshare 3,5 clone?)just worked, without calibration....
Dont now what was the difference, but perhaps they changed some updates and now it s not broken anymore?
Perhaps you can just try again?
Good luck
recently (beginning of march) i started a new try and used a fresh Image (raspbian (not-lite? im not sure)) from Januar, updatet it completly and my Touchscreen (Waveshare 3,5 clone?)just worked, without calibration....
Dont now what was the difference, but perhaps they changed some updates and now it s not broken anymore?
Perhaps you can just try again?
Good luck
Re: touchscreen inversion stopped working PIXEL
i had a similar problem with my egalax touchdisplay.
read a lot of tutorials but none worked.
The Section-options did not work.
I could solve my problems with changing from libinput to evdev.
Just do an
then you need to change the config file /usr/share/X11/xorg.conf.d/40-libinput.conf
in the last section change the driver to evdev. This is what i got:
After restarting x i still had my problems with orientation. But now the normal options like invertY work.
I think, this might be your problem.
read a lot of tutorials but none worked.
The Section-options did not work.
I could solve my problems with changing from libinput to evdev.
Just do an
Code: Select all
apt-get install xserver-xorg-input-evdev
in the last section change the driver to evdev. This is what i got:
Code: Select all
Section "InputClass"
Identifier "libinput touchscreen catchall"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
EndSection
I think, this might be your problem.
Re: touchscreen inversion stopped working PIXEL
Hello,
I have the similar eGalax touchscreen here. After theses modifications I have also always reverted axis and bad calibration.
For the next steps I put these options in /usr/share/X11/xorg.conf.d/99-calibration.conf (values comes from the app xinput_calibrator):
All is OK now, thanks !
Thanks for sharing !jjumper wrote:i had a similar problem with my egalax touchdisplay.
read a lot of tutorials but none worked.
The Section-options did not work.
I could solve my problems with changing from libinput to evdev.
Just do anthen you need to change the config file /usr/share/X11/xorg.conf.d/40-libinput.confCode: Select all
apt-get install xserver-xorg-input-evdev
in the last section change the driver to evdev. This is what i got:After restarting x i still had my problems with orientation. But now the normal options like invertY work.Code: Select all
Section "InputClass" Identifier "libinput touchscreen catchall" MatchIsTouchscreen "on" MatchDevicePath "/dev/input/event*" Driver "evdev" EndSection
I think, this might be your problem.

I have the similar eGalax touchscreen here. After theses modifications I have also always reverted axis and bad calibration.
For the next steps I put these options in /usr/share/X11/xorg.conf.d/99-calibration.conf (values comes from the app xinput_calibrator):
Code: Select all
Section "InputClass"
Identifier "calibration"
MatchProduct "eGalax Inc. USB TouchController"
Option "Calibration" "1711 266 1675 292"
Option "SwapAxes" "1"
Option "InvertX" "0"
Option "InvertY" "0"
EndSection
- LetHopeItsSnowing
- Posts: 357
- Joined: Sat May 26, 2012 6:40 am
- Location: UK
- Contact: Website
Re: touchscreen inversion stopped working PIXEL
I pulled together some end to end instructions for rotating the touchscreen 90 degrees which might prove useful.
http://www.stuffaboutcode.com/2017/05/r ... trait.html
http://www.stuffaboutcode.com/2017/05/r ... trait.html
"am I getting slower, or is stuff more complicated; either way I now have to write it down - stuffaboutcode.com"
Re: touchscreen inversion stopped working PIXEL
Hi There
Sorry to post in such an old thread but I am at my wit's end with this issue and this information so far is the closest I've come to a solution. (That is, this seems to be the only settings that seem to make any effect on my touch input at all after trying xinput_calibrator etc etc)
I have a Raspberry Pi 3 running the standard Raspbian OS. I have the following touch display: https://www.sainsmart.com/sainsmart-hdm ... ry-pi.html
I have display_rotate set to 1 in my config file as I am using the display in a portrait setting. However the touch axis is inverted.
With the display in a portrait orientation, moving my finger up and down works correctly and the mouse tracks the point fine. Moving side to side however is inverted. When my finger goes left, the pointer goes right.
How might I write a transformation matrix which flips only one axis? I have given it a few attempts myself but nothing seems to produce the right result. The maths involved here makes no sense to me, and I fear it never will. I've hunted and hunted for an example somewhere but to no avail. There are example matrixes for rotating 90, 180 and 270 degrees, but nothing on how to flip an axis.
Any help would be greatly appreciated!
Kind Regards
Ben H
Sorry to post in such an old thread but I am at my wit's end with this issue and this information so far is the closest I've come to a solution. (That is, this seems to be the only settings that seem to make any effect on my touch input at all after trying xinput_calibrator etc etc)
I have a Raspberry Pi 3 running the standard Raspbian OS. I have the following touch display: https://www.sainsmart.com/sainsmart-hdm ... ry-pi.html
I have display_rotate set to 1 in my config file as I am using the display in a portrait setting. However the touch axis is inverted.
With the display in a portrait orientation, moving my finger up and down works correctly and the mouse tracks the point fine. Moving side to side however is inverted. When my finger goes left, the pointer goes right.
How might I write a transformation matrix which flips only one axis? I have given it a few attempts myself but nothing seems to produce the right result. The maths involved here makes no sense to me, and I fear it never will. I've hunted and hunted for an example somewhere but to no avail. There are example matrixes for rotating 90, 180 and 270 degrees, but nothing on how to flip an axis.
Any help would be greatly appreciated!
Kind Regards
Ben H
Re: touchscreen inversion stopped working PIXEL
Hi
May or may not help, but I had an issue with a generic touch screen 7" eGalax Inc. with usb connection for touch screen, with inverted axis issues on new install of Stretch.
Tried many things, but eventual found a straight forward fix which was.
Then go to /usr/share/X11/xorg.conf.d and list the files
The ##-evdev.conf must load after ##-libinput.conf for me the files were 10-evdev.conf and 40-libinput.conf, which caused the confg libinput to overide the evdev config.
change the initial number to higher than the libinput number, this then loads the evdev config after the libinput config.
This resolved my inverted axis issue, then run the calibration, graphically or from comand line.
Hope it helps.
May or may not help, but I had an issue with a generic touch screen 7" eGalax Inc. with usb connection for touch screen, with inverted axis issues on new install of Stretch.
Tried many things, but eventual found a straight forward fix which was.
Code: Select all
apt-get install xserver-xorg-input-evdev
Code: Select all
cd /usr/share/X11/xorg.conf.d
ls
Code: Select all
sudo mv 10-evdev.conf 45-evdev.conf
Code: Select all
reboot
Hope it helps.
Re: touchscreen inversion stopped working PIXEL
I can't get this to work on autostart.
It works fine when I type it in... but adding it to the end of "/etc/xdg/lxsession/LXDE-pi/autostart" doesn't restore it on boot.
Code: Select all
xinput --set-prop 'FT5406 memory based driver' 'Coordinate Transformation Matrix' 0 1 0 -1 0 1 0 0 1
-
- Posts: 1
- Joined: Wed Dec 05, 2018 1:27 am
Re: touchscreen inversion stopped working PIXEL
I have the same issue. Although I tried adding the xinput line to ~/.config/lxsession/LXDE-pi/autostartJaxel wrote: ↑Sun Aug 26, 2018 5:08 amI can't get this to work on autostart.
It works fine when I type it in... but adding it to the end of "/etc/xdg/lxsession/LXDE-pi/autostart" doesn't restore it on boot.Code: Select all
xinput --set-prop 'FT5406 memory based driver' 'Coordinate Transformation Matrix' 0 1 0 -1 0 1 0 0 1
I'm like 90% sure I'm editing the correct file because I screwed something up the first time and my Pi just booted to a black screen. It was still "working" because I could VNC to the Pi but to a black screen.
Like @Jaxel I can type the command into terminal and it works fine, but in the autostart file, it does nothing
-
- Posts: 25687
- Joined: Tue Mar 25, 2014 12:40 pm
- Location: Delightful Dorset
Re: touchscreen inversion stopped working PIXEL
jason21psu wrote: ↑Wed Dec 05, 2018 1:46 amI have the same issue. Although I tried adding the xinput line to ~/.config/lxsession/LXDE-pi/autostartJaxel wrote: ↑Sun Aug 26, 2018 5:08 amI can't get this to work on autostart.
It works fine when I type it in... but adding it to the end of "/etc/xdg/lxsession/LXDE-pi/autostart" doesn't restore it on boot.Code: Select all
xinput --set-prop 'FT5406 memory based driver' 'Coordinate Transformation Matrix' 0 1 0 -1 0 1 0 0 1
I'm like 90% sure I'm editing the correct file because I screwed something up the first time and my Pi just booted to a black screen. It was still "working" because I could VNC to the Pi but to a black screen.
Like @Jaxel I can type the command into terminal and it works fine, but in the autostart file, it does nothing
The OP was using Raspbian Jessie with PIXEL Desktop, both are obsoleted as of August 2017.....
The information is out there....you just have to let it in.
My other Linux machines are a ChromeBox & Intel CoreDuo Desktop
My other Linux machines are a ChromeBox & Intel CoreDuo Desktop
-
- Posts: 1
- Joined: Fri Jul 05, 2019 12:39 am
Re: touchscreen inversion stopped working PIXEL
So I was messing with this and trying hard to get this to work but I found the place to put in the `xinput`.
Create this file if you do not have it but you want to put your `xinput` line in to `.xsessionrc` file in your home directory.
Then add `xinput --set-prop 'FT5406 memory based driver' 'Coordinate Transformation Matrix' 0 1 0 -1 0 1 0 0 1` to the file save it and reboot and the flip will keep.
Create this file if you do not have it but you want to put your `xinput` line in to `.xsessionrc` file in your home directory.
Code: Select all
nano .xsessionrc