Can't get a 4" DSI Waveshare display to work with Zynthian

Can’t get a 4" DSI Waveshare display to work.

#4inch DSI LCD 480×800:
sudo bash ./WS_xinchDSI_MAIN.sh 40 I2C0

When doing this line / trying to install the driver, I get a responce that the driver is already there. So it was installed by default.
It I use any display setting from webconfig (tried them all), not working.
The green led on the back of the display blinks, indicating it is getting power, but the config is wrong.
When booting an image provided by Waveshare, display works fine, so it is not wiring or anything.
What should I try?
If I select Custom display from the web config. What settings should I add in the appropriate fields?

Any help would be greatly appreciated!


dtoverlay=vc4-kms-v3d,noaudio
dtoverlay=vc4-kms-dsi-waveshare-panel,4_0_inch,i2c0
With these settings I was finally able to get it to work. But now it needs rotation by 90 degrees. The image is basically on its side now.


maybe have a look here:

Hi, Thank you! Yes I’ve read it before. Couldn’t make it work.
Sinse yesterday I’ve made a bit of a progress.
I am able to rotate the screen temporarily by:
xrandr --display :0 --output DSI-1 --rotate left

But that doesn’t stick, after reboot my issue is back…
And that rotation doesn’t rotate the touch sensors.

Try these setting but play with rotate. Value 2 is for 180 degrees (inverted display).

Hello.
In my understanding no matter what is chosen in the display field, the overlay used for that display is what actually matters. I might be wrong on that.
No matter which display I chose, it doesn’t work, unless I specifi my specific overlay in the Config field in the image you’ve provided.
In my case unless I add the following lines it doesn’t output any image to display:
dtoverlay=vc4-kms-v3d,noaudio
dtoverlay=vc4-kms-dsi-waveshare-panel,4_0_inch,i2c0

Found a solution that works half way:

  1. Go to /etc/X11/xorg.conf.d/
  2. find the file with your display
  3. Modify it by adding the following line:
    Option “Rotate” “left”
  4. Save and reboot.
    In this case the rotation is correct even afer restart.
    But… The touch in this case is not rotated.
    Looking for the solution for this issue now.
    Waveshare provides complete OS images. I might install that and grab the correct overlay or will check the way the’ve set their files in /etc/X11/xorg.conf.d/ to find correct settings so that the touch is rotated as well as the image on the screen.

Added the following lines to boot/firmware/config.txt
dtoverlay=vc4-kms-v3d,noaudio
dtoverlay=vc4-kms-dsi-waveshare-panel,4_0_inch,i2c0
dtoverlay=WS_xinchDSI_Touch,I2C_bus=0
It woeks now. Both image and touch.
Until I update the system )))

good to hear.

you can create a custom config in webconf