Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3881

Troubleshooting • Wayland + Elecrow 5 inch TFT

$
0
0
Hi guys,

I'm trying to get my Elecrow 5 Inch TFT screen to work. It's ancient and a bit rubbish but the one I've got.

There's an official tutorial for it here: https://www.elecrow.com/wiki/hdmi-inter ... splay.html

But I wanted to try to see if I could get it working on my Pi4 with the new Wayland / Labwc stuff.

But from what I can tell, the install script that the linked above setup instruction has me run includes lines that I think are forcing the device to need to use X11 instead of Wayland, especially frustrating as I'd like to utilise the new Pi Connect stuff. I get the impression it's specially installing the touch input stuff in X11 and I suspect Elecrow won't be much interested in providing an update for this latest bit of kit.

Things start getting difficult from the bit where it has me run this `LCD5-show` script, the contents of which I'm pasting below in hope someone might look at it and say "oh, well you can do that in Wayland/Labwc with this instead" 😅

Code:

#!/bin/bashsudo ./system_backup.shroot_dev=`grep -oPr "root=[^\s]*" /boot/cmdline.txt | awk -F= '{printf $NF}'`if test "$root_dev" = "/dev/mmcblk0p7";thensudo cp -rf ./boot/config-noobs-nomal.txt ./boot/config.txt.bakelsesudo cp -rf ./boot/config-nomal.txt ./boot/config.txt.baksudo echo "hdmi_force_hotplug=1" >> ./boot/config.txt.bakfirow=`grep -nr "#dtoverlay=vc4-fkms-v3d" ./boot/config.txt.bak | awk -F ':' '{if(NR==1)printf $1}'`sudo sed -i -e ''"$row"'s/#dtoverlay=vc4-fkms-v3d/dtoverlay=vc4-fkms-v3d/' ./boot/config.txt.baksudo sed -i -e 's/#max_framebuffers=2/max_framebuffers=2/' ./boot/config.txt.baksudo echo "dtparam=i2c_arm=on" >> ./boot/config.txt.baksudo echo "dtparam=spi=on" >> ./boot/config.txt.baksudo echo "enable_uart=1" >> ./boot/config.txt.baksudo echo "display_rotate=0" >> ./boot/config.txt.baksudo echo "max_usb_current=1" >> ./boot/config.txt.baksudo echo "config_hdmi_boost=7" >> ./boot/config.txt.baksudo echo "hdmi_group=2" >> ./boot/config.txt.baksudo echo "hdmi_mode=1" >> ./boot/config.txt.baksudo echo "hdmi_mode=87" >> ./boot/config.txt.baksudo echo "hdmi_drive=1" >> ./boot/config.txt.baksudo echo "hdmi_cvt 800 480 60 6 0 0 0" >> ./boot/config.txt.baksudo echo "dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900" >> ./boot/config.txt.baksudo cp -rf ./boot/config.txt.bak /boot/config.txt#sudo cp -rf ./boot/config-5.txt /boot/config.txt #if test "$root_dev" = "/dev/mmcblk0p7";then#sudo cp ./usr/cmdline.txt-noobs /boot/cmdline.txt#else#sudo cp ./usr/cmdline.txt /boot/#fisudo cp ./usr/inittab /etc/sudo cp -rf ./usr/99-fbturbo.conf-HDMI /usr/share/X11/xorg.conf.d/99-fbturbo.conf if [ ! -d /etc/X11/xorg.conf.d ]; thensudo mkdir /etc/X11/xorg.conf.d fisudo cp -rf ./usr/99-calibration.conf-5-0 /etc/X11/xorg.conf.d/99-calibration.conf sudo touch ./.have_installedecho "hdmi:resistance:5:0:800:480" > ./.have_installed#nodeplatform=`uname -n`#kernel=`uname -r`version=`uname -v`#if test "$nodeplatform" = "raspberrypi";then#echo "this is raspberrypi kernel"version=${version##* }#version=${version#*#}echo $versionif test $version -lt 2017;thenecho "reboot"elseecho "need to update touch configuration"wget --spider -q -o /dev/null --tries=1 -T 10 http://mirrors.zju.edu.cn/raspbian/raspbianif [ $? -eq 0 ]; thensudo apt-get install xserver-xorg-input-evdev 2> error_output.txtelsesudo dpkg -i -B ./xserver-xorg-input-evdev_1%3a2.10.6-1+b1_armhf.deb 2> error_output.txtfiresult=`cat ./error_output.txt`echo -e "\033[31m$result\033[0m"grep -q "error:" ./error_output.txt && exitsudo cp -rf /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf#echo "reboot"fi#else#echo "this is not raspberrypi kernel, no need to update touch configure, reboot"#fisudo syncsudo syncsleep 1if [ $# -eq 1 ]; thensudo ./rotate.sh $1elif [ $# -gt 1 ]; thenecho "Too many parameters"fiecho "reboot now"sudo reboot

Statistics: Posted by apbarratt — Sat Nov 30, 2024 8:13 pm



Viewing all articles
Browse latest Browse all 3881

Trending Articles