Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: Waveshare DSI 7.9 Touch display on Moode 9
#11
(10-19-2024, 09:58 AM)felix1024 Wrote: The rotate=xx command in /boot/firmware/cmdline.txt will only affect the system output while booting. Not the graphical output of X!

For rotating X the changes in .xinitrc are important! Following exactly the instructions in post #1 should configure X correctly.

The addition of libinput and configuration in 40-libinput.conf will adjust touchscreen accordingly.

tnks felix1024
U'r support it's too appreciated

I mod also . xinitrc but after reboot, the X layout have same prob. as my image..., is oriented to the left ..

instead after adding the libinput section the touch screen (the pointer) is as it should be but the orientation of the X interface is wrong ...as said before

what is wrong
tnks
Reply
#12
After messing around with some cheap HDMI displays and not getting it to work, I'm back to a Waveshare 5inch DSI display.
https://www.waveshare.com/wiki/5inch_DSI_LCD

To config.txt I added as per the link above:
dtoverlay=vc4-kms-dsi-7inch

To cmdline.txt I added at the start of the line:
video=HDMI-1:d video=HDMI-2:d video=DSI-1:800x480M@60,rotate=90

After reboot, the boot text flying by is rotated. All good, but Moode GUI is still in normal orientation.

To .xinitrc I add:
xrandr --output HDMI-1 --off
xrandr --output HDMI-2 --off
xrandr --output DSI-1 --rotate left --mode 480x800
fbset --geometry 800 480 800 480 16
SCREENSIZE="800,480"
#SCREENSIZE="$(kmsprint | awk '$1 == "FB" {print $3}' | awk -F"x" '{print $1","$2}')"

However, after reboot it's still in the original orientation. It seems that GUI starts a bit slower though with a white screen in between, which I can't remember seeing before.

Any obvious mistakes I made? Is there a log for when the .xinitrc is parsed?
Reply
#13
In the journalctl I found an error for .xinitrc:
xrandr --output DSI-1 --rotate left --mode 480x800
-> "xrandr: cannot find mode 480x800".

Removing "--mode 480x800" now rotates the display, but I just get a square 480x480, with the bottom remaining empty/black.
It also seems the right part of the GUI is missing and is cut off.
Reply
#14
Okay, got it all working for the Waveshare 5 inch
https://www.waveshare.com/wiki/5inch_DSI_LCD

To config.txt I added as per the link above:
Code:
dtoverlay=vc4-kms-dsi-7inch

To cmdline.txt I added at the start of the line:
Code:
video=HDMI-1:d video=HDMI-2:d video=DSI-1:800x480M@60,rotate=90

To ~/.xinitrc I added:
Code:
xrandr --output HDMI-1 --off
xrandr --output HDMI-2 --off
xrandr --output DSI-1 --rotate left --mode 800x480
fbset --geometry 800 480 800 480 16
SCREENSIZE="480,800"
#SCREENSIZE="$(kmsprint | awk '$1 == "FB" {print $3}' | awk -F"x" '{print $1","$2}')"

Then in /usr/share/X11/xorg.conf.d/40-libinput.conf I changed section InputClass to:
Code:
Section "InputClass"
      Identifier "libinput touchscreen catchall"
      MatchIsTouchscreen "on"
      Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1"
      MatchDevicePath "/dev/input/event*"
      Driver "libinput"
EndSection

Works like a charm now...
Reply


Forum Jump: