05-31-2024, 03:36 PM
Hi
just upgraded to latest Moode 9.0 release. Unfortunately my solution for running a local Waveshare DSI 7.9 display on 8.3.9 is not working anymore.
But here is the solution to make it working again:
The necessary LCD drivers are now included in the Bookworm release, no need to install drivers
Just need to enable it in /boot/firmware/config.txt
insert
and save.
Since this display has portrait orientation one need to change it for boot messages:
Edit /boot/firmware/cmdline.txt
insert this in front of the command line:
save it. after a reboot boot messages appears in landscape orientation.
Now one need to tell X11 the same. Edit .xinitrc in the home directory:
insert these lines:
Now after a reboot the local display will work as expected in landscape orientation.
Last thing to do is change the orientation of the touchscreen. Unfortunately this needs to be done in the xserver configuration.
First install libinput if not already there:
Then create a local config directory:
Now copy over the template and edit the copied file:
insert the right option into the touchscreen section select from
#90°Right touch rotation:
Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
#180° Inverted touch rotation:
#Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1"
#270° Left rotation:
#Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1"
The resulting section should look like:
Voilà one more reboot and every thing works as expected.
much joy with Waveshare 7.9 DSI Touch display!
just upgraded to latest Moode 9.0 release. Unfortunately my solution for running a local Waveshare DSI 7.9 display on 8.3.9 is not working anymore.
But here is the solution to make it working again:
The necessary LCD drivers are now included in the Bookworm release, no need to install drivers
Just need to enable it in /boot/firmware/config.txt
Code:
$ sudo nano /boot/firmware/config.txt
Code:
dtoverlay=vc4-kms-dsi-waveshare-panel,7_9_inch
Since this display has portrait orientation one need to change it for boot messages:
Edit /boot/firmware/cmdline.txt
Code:
$ sudo nano /boot/firmware/cmdline.txt
Code:
video=HDMI-1:d video=HDMI-2:d video=DSI-1:400x1280e,rotate=270
Now one need to tell X11 the same. Edit .xinitrc in the home directory:
Code:
$ cd
$ sudo nano .xinitrc
Code:
# disable HDMI ports
xrandr --output HDMI-1 --off
xrandr --output HDMI-2 --off
#Force rotation for Waveshare
xrandr --output DSI-1 --rotate right --mode 400x1280
fbset --geometry 1280 400 1280 400 16
# Capture screen size
#SCREENSIZE="$(fbset -s | awk '$1 == "geometry" { print $2","$3 }')"
SCREENSIZE="1280,400"
Last thing to do is change the orientation of the touchscreen. Unfortunately this needs to be done in the xserver configuration.
First install libinput if not already there:
Code:
$ sudo apt-get install xserver-xorg-input-libinput
Code:
$ sudo mkdir /etc/X11/xorg.conf.d
Code:
$ sudo cp /usr/share/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/
$ sudo nano /etc/X11/xorg.conf.d/40-libinput.conf
#90°Right touch rotation:
Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
#180° Inverted touch rotation:
#Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1"
#270° Left rotation:
#Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1"
The resulting section should look like:
Code:
Section "InputClass"
Identifier "libinput touchscreen catchall"
MatchIsTouchscreen "on"
Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
much joy with Waveshare 7.9 DSI Touch display!