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

Is there a way someone can show me or tell me how to use my touchscreen on my waveshare 3.2 clone

Working for me with following setup:
Select WaveShare32B in webconf.
In /boot/config.txt disable the ads7846 driver:
You can do it also from webconf in Display - advanced view.

Change the /etc/X11/xorg.conf.d with the following:

Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option “Calibration” "3744 152 191 3922"
Option “SwapAxes” "1"

Your calibration values may differ form the above. I did the calibration according this description:

1 Like

Thanks buddy… I’ll get on that right now

Please, take a look to the “custom” folder in the zynthian-sys repository. Inside there is a subfolder called “display”, and inside there is a subfolder for every device that need customized config files:

The device’s subfolder name should match the name used in the webconf tool.

As you see, currently there is only 2 customized devices (the 2 officially supported displays :wink: ), but more displays should be added, specially for getting touch support out-the-box.

Please, consider helping to add more devices to the “custom” folder. It’s easy: When you have a configuration that works for you:

1.) Copy the files you have customized in the next 3 places:

  • /etc
  • /boot
  • /zynthian/config/

to a subfolder inside “/zynthian/zynthian-sys/custom”, with the same name used by the webconf tool. You must re-create the directory structure inside the subfolder. Take a look to the existing examples.

2.) Try to re-configure your display from the webconf tool. If it still work after this, probably you do a good work in the previous step, so we can continue.

3.) Fork the zynthian-sys repository and copy/upload the new custom subfolder with its content, as you do it in the step 1.

4.) Send a pull request with some explanation and i will review the changes and merge with the master repo for making available the custom configuration in the next update software :wink:

Kind Regards,

1 Like

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.