Integrating custom config files for other Displays (It was "Touchscreen waveshare")

I forked it and added the xorg.conf.d and overlays file

Haven’t had time to test it yet.


Great @mheidt!
I will be waiting for your pull request …

1 Like

i tried , screen worked , but touch is still not working for me

did you try my fork? in that case I would comply with jofemodos wish.

@mheidt I copied your files from the GitHub and copied it to my zynth

didn’t work for my clone waveshare3.2b

not sure what fork is but I copied said files to my device

have you really deleted the line starting with

The line reappears every time you select a different display and reselect waveshare32b

The calibration of @norbim doesn’t work for rotated screens.

My numbers are
205 3754 3801 226

You can do your own calibration:

apt-get install -y xinput-calibrator

Create a file on the zynthian that contains

xinput_calibrator -v

make it executable

chmod +x

stop zynthian and run calibrate

systemctl stop zynthian
startx ./

Follow the screen instructions

In the ssh output where you started startx, you find the calibration values


got touchscreen working, but its the opersite xy??? any sujgestions?

yes, that’s what I was struggling with.
it seems, that you didn’t follow the exact instructions.
Directions change depending on the values in the 99-calibration file and the first line in the webconf ( boot/config.txt values)
The ones, that are checked in my fork work.

cool,that worked for me, your calibration worked on mine

what make is your clone?? or is it original

Hi all!
I want to express my appreciation - this thread helped me get to grips with my 3.5 screen (! For reference, I’m starting my Zynthian using a RPi3b, a hifiberry dac+ pro, and a novation impulse connected via USB.

Despite the screen being perfect out of the box as a PiScree 3.5 (v2), I did suffer for a pesky case of inverted X axis on the touchpad only. The following shell command did the trick, though:

DISPLAY=:0 xinput --set-prop 'ADS7846 Touchscreen' 'Coordinate Transformation Matrix' 1 0 0 0 -1 1 0 0 1

To make it work at startup, I’ve now added it to /zynthian/config/ - but I fear an update will take this away. That said, I hope this can help someone!

Next stop - soldering the encoders and the AIO board! :slight_smile:


Thanks edgarcocaves. :slight_smile:

Cheap chinese Landzo 3.5 inch touch screen suffered too inverted X axis syndrome. Provided matrix values helped with this lcd too.

Awesome werewolf! Glad I could help!

@edgar This helped me too, thanks! Although it did take me some time to find the file where I was supposed to change the Transformation Matrix numbers:
/zynthian/zynthian-sys/custom/display/<DISPLAY YOU'VE SELECTED IN WEBCONF>/config/

I am in the process of adding sainsmart 1.8" SPI display based on the st7735r chipset. I have it working and will submit a patch to the project. It uses a custom overlay. Where should we keep the dts (source) for the overlay? Zynthian only requires the dtbo which I can add to zynthian-sys project but we should be able to manage the source of this overlay.

Does that calibration procedure by @mheidt still work?
I noticed a slight offset of coordinates towards the edges of my PiScreen 3.5 V2 (actual touch area is scaled down by some percent) and I’m looking for instructions to fix it.
The calibration procedure yields the following output while touchscreen stays black all the time.

X.Org X Server 1.20.4
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.15.0-48-generic armv8l Raspbian
Current Operating System: Linux zynthian 4.19.66-v7l+ #1253 SMP Thu Aug 15 12:02:08 BST 2019 armv7l
Kernel command line: coherent_pool=1M 8250.nr_uarts=1 cma=64M bcm2708_fb.fbwidth=640 bcm2708_fb.fbheight=480 bcm2708_fb.fbswap=1 smsc95xx.macaddr=DC:A6:32:32:A5:36 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
Build Date: 05 June 2019  12:49:54PM
xorg-server 2:1.20.4-1+rpt1 ( 
Current version of pixman: 0.36.0
	Before reporting problems, check
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sun May  3 08:13:48 2020
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
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: Selected device: ADS7846 Touchscreen
DEBUG: Not usbtouchscreen calibrator: Not a usbtouchscreen device
DEBUG: Not evdev calibrator: Evdev: invalid "Evdev Axis Calibration" property format
Calibrating standard Xorg driver "ADS7846 Touchscreen"
	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 '' script to automatically get it (through HAL).
DEBUG: Found that 'ADS7846 Touchscreen' is a sysfs name.
xinit: connection to X server lost

waiting for X server to shut down (II) Server terminated successfully (0). Closing log file.

My configuration is:
Linux zynthian 4.19.66-v7l+ #1253 SMP Thu Aug 15 12:02:08 BST 2019 armv7l GNU/Linux
zyncoder: master (0165831)
zynthian-ui: feature/stepseq (13fa5a5)
zynthian-sys: master (c6ea736)
zynthian-data: master (9cccef5)
zynthian-webconf: master (ab294aa)

It worked for Waveshare. You need to google the method for your screen.
Or it changed with buster.


Step sequencer recent implementation led me here as well.
Effectively, it requires a precise touchscreen.

I have same configuration (kit V2) and same problem as you.

I looked at PiScreen Faq - :
they indicate that deleting “/etc/pointercal.xinput” should do but there isn’t such a file.

I’ll keep on searching.

Edit: Do not try this… I have my Zynthian frozen at boot screen now. Reflashing.

Maybe check that:

Not tested yet…

Edit: Step 3 “Download and install xinput_calibrator”, “make” command fails with a lot of errors.