-
-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DietPi-Config | tft35a LCD display support #2590
Comments
@SteveJohnsson Yeah indeed the script is out of style, but this is no big issue, it is small enough to easily allow an overview. The problem is more, that it simply overrides several RPi core config files completely, thus overwriting any other required or manually made changes. This is easier from the scripts/drivers dev point of view, but breaks any custom use cases and requirements. So lets try to find the essential settings that are required to run this LCD. First thing of course the driver itself is required:
Next is the X.org calibrations:
Next is the kernel command line file
The Next is the
The
So lets do the touch configuration updates:
I don't get the last command. This simply doubles one config file installed by the above packages. It raises its "priority" but as long as those settings are not overridden by another one (with priority between 10 and 45), this should have no effect. And even if wanted, then the file should not be copied, but moved, to not have doubled settings 🤔. I would just skip this... Finally:
|
@SteveJohnsson If it does not work or as failsafe, we better enable those overlays as well:
EDITThis one: http://www.lcdwiki.com/zh/3.5inch_RPi_Display ? |
Hi @MichaIng! I have tested your solution and it worked a charm! The only "issue" I found with this setup is that the font that is sent to the LCD is quite small. It is not a big issue however. BIG thanks for quick response and the help you provided mate! :) |
@SteveJohnsson I reopen this issue as a request to add this LCD to our dietpi-config selection. |
Hi @MichaIng! Sorry for the late response. As there are no mention about I2C or UART, so I guess it is the SPI interface. Unfortunately, there is no documentation that comes with the display either. |
@SteveJohnsson
Then reboot and see if the display still works. |
Hi @MichaIng
I did try it on fresh install image. And the unit working until displaying (ask to hit return for login) same as without that two command. I follow every step from your guidance in this thread. With some modification because of the changed source file or uncompleted path:
execute
But yes... the console running replacing white screen sorry for my lack knowledge, I just master on following step :-) on device github page, I found this page showed some info for other raspberry image. But yes, I still prefer using DietPi |
@rzmichel
Checking your error and re-checking the script, this actually seems strange to me:
The However if it is finally working, it seems to works, then obviously it worked, hence |
Hi @MichaIng From the guidance above, TFT LCD 3.5" is working on console mode. But not on KIOSK mode or whatever Desktop application. Xorg showed me no screen found(EE) First I want to fill information what I use on this thread.
After fresh install, software installed is:
I using 3.5inch TFT LCD attached on RPi 3 Model B Follow the guidance edit resolution screen for chromium option on /Dietpi/dietpi.txt If we reboot now, the display will showing console process and failed to start Desktop. I found the solution on this post. Display and touch WORKING! finally. |
@rzmichel
The solution you found makes sense. The script installs the fbturbo driver with Allwinner identifier: https://github.com/goodtft/LCD-show/blob/master/usr/99-fbturbo.conf
Also to link the actual source which contains some other differences: https://www.raspberrypi.org/forums/viewtopic.php?p=712958#p712958 Btw the thread again verifies that it is an SPI display, hence the three /DietPi/config.txt entries:
are not required. Btw, what I was not understanding from the beginning... Are these drivers for a specific display or generic for many similar SPI display, as the thread above obviously was about WaveShare SpotPear. There is a build-in overlay on RPi:
|
Hello, I did comparing fresh install latest image between dietpi and raspbian lite with desktop. I continue checking on installed file.
The rest files have some difference.
At file cmdline.txt:
At file
Tried to put same value configuration, DietPi still stop starting Desktop. After add configuration fbdev driver above, it's start desktop but with wrong match of touch and screen input still.
The display coming with no manual paper, inside box with bubble warp and the plastic stylus. I got the info for installing driver on description product. From the market place, they had SPI and HDMI choice of display with various size. The display with me is SPI 3.5" coming without any brand. Just chipset code (maybe), XPT2046 I just curious, how come DietPi need option fbdev when on Raspbian don't. |
@rzmichel From
|
Hi @MichaIng First sorry not responded in time. Actually I follow step on this thread, combine with what I found and what I need for the device. I did rotate the device since the power port is on the bottom of display when following default configuration walk through. Below is my final configuration on the device (DietPi on RPi3 with 3.5" TFT LCD) :
/boot/config.txt = /DietPi/config.txt
/boot/cmdline.txt
/etc/X11/xorg.conf.d/99-calibration.conf
That's all. It's running well. But start up takes some time than Raspbian Lite with Desktop image. |
@rzmichel
and
Two configs attached to the same framebuffer device |
I did try comment in one by one:
and
and comment in both.
Screen and touch input will running. |
@rzmichel |
Hello hello :) I got a "MHS35" LCD screen from the https://github.com/goodtft/LCD-show repository, this one here http://www.lcdwiki.com/MHS-3.5inch_RPi_Display. I was wondering if the LCD35 was eventually added to dietpi-config ? Scripts for Ubuntu, Raspbian and Kali Linux are available, but for a Raspberry Pi, I also still prefer using DietPi |
I was able to get it to work for the "MHS35" LCD screen. Please let me know how I can help to maybe include a script for these screens on Dietpi-config. |
Thanks for the offer. Yes generally those install scripts work on DietPi as well, but they are extremely intrusive, override large parts of boot configuration which is not required and break customisations and lots of them are not required or even very outdated (not effective on modern RPi firmware), so I'd recommend to extract the essential steps from those scripts, which is then true for our implementation as well. Would be great if you could share the steps you did. |
Hello @MichaIng , Download the repository that contains the drivers and the installation script for a bunch of these cheap LCD screens:
Change permissions of the folder so that your user can read and write, then enter the downloaded folder: dietpi@DietPi:~$ chmod -R 755 LCD-show/
dietpi@DietPi:~$ cd ./LCD-show/ Copy the driver for the LCD screen purchased: sudo cp ./usr/mhs35-overlay.dtb /boot/overlays/
sudo cp ./usr/mhs35-overlay.dtb /boot/overlays/mhs35.dtbo Modify the X.org calibrations: mkdir -p /etc/X11/xorg.conf.d
cp usr/99-calibration.conf-35-90 /etc/X11/xorg.conf.d/99-calibration.conf
mkdir -p /usr/share/X11/xorg.conf.d
cp usr/99-fbturbo.conf /usr/share/X11/xorg.conf.d/ Modifications necessary for the kernel command line file sed -i 's/[[:blank:]]logo.nologo//' /boot/cmdline.txt
sed -i 's/[[:blank:]]fbcon=[^[:blank:]]*//g' /boot/cmdline.txt
echo "$(sed -n 1p /boot/cmdline.txt) fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo" > /boot/cmdline_new.txt
mv /boot/cmdline_new.txt /boot/cmdline.txt @MichaIng I was not able to use the Remove the micro SD card from your Raspberry Pi, insert it in a laptop or other computer. Open the
Remove the SD-card, put it in your Raspberry Pi 4 and reboot, Please note that I do not know if the touchscreen actually works, I do not know (yet) if there is some kind of benchmark app I can use to test the touchscreen. Can you perhaps help me with this ? I hope these instructions can help implement these LCD screens within Dietpi. |
Just a side note. |
Thank you for this quick answer, it explains a lot 😅 Well, I won't need to remove the SD card from the RPi next time. |
Awesome, many thanks for sharing the steps.
Only the second is necessary, as you use
Do you have any I just see that fbturbo is available on the RPi repo, aside of fbdev: http://archive.raspberrypi.org/debian/pool/main/x/ If one finds time, we could to some 2D acceleration benchmarks on different RPi models to check whether fbturbo is a better default, when X server is installed on RPi, but I'm going off-topic 🙂. |
The Raspberry Pi 4 and 3B+ were freshly installed, the only thing I did is build opencv and installed a few python related packages (venv) I believe. I did not need to use this command, since the LCD screen changed from white to the console when I rebooted:
Here is the list of packages that start with
Please le me know if I did not understand or answer something. I have the LCD running on the 3B+ and 4, so we could test these two if you have a benchmark script :) |
The config is not loaded unless you actually start an X server, like a desktop or GUI program, which doesn't seem to be installed in your case. For console usage, fbturbo or any other DDX have no effect anyway 😉. |
I followed this guide, just changed tft35a to mhs35 since that's the LCD I got. The LCD works just fine, but I lost my network connection and can't figure out why? I think maybe the edit of cmdline.txt might be the issue. But exactly what I don't know. pls help :) |
The cmdline is not related to network at all. I guess it became apparent as part of package upgrades or the reboot. If you still have network issues, please open a new issue about that. |
I add the datas not in the dietpi config file I add it in the /boot/config.txt. Thx for the guide. |
Great. Yes, all those settings need to be applied to |
We are workin on this project. https://github.com/splitti/MuPiBox My steps:
I hope you can help. |
Can you try But while the above changes the output screen for the console, I'm not sure whether this is passed automatically to the X server. Especially when KMS is used, it definitely won't. For this you could try: startx /usr/bin/chromium-browser -- :1 to force it starting at screen 1 instead of screen 0. This can be made permanently for all X sessions as well, or for Chromium via our autostart script. We might even make this a |
So I do a lot and stat up with a new system. Now the screen will Display the browser afer I do this in the console Now my problem is that I click right the mouse goes on top, if click left mouse goes down, if I click down it mouse goes right, if i click up mouse goes left. Can you support me again? |
I'm also no expert in this. Check out the calibration configs from here, which should give you an idea how it works:
You can also try apt install xinput-calibrator
xinput_calibrator |
Display is working now. Enter these from above into /etc/X11/xorg.conf.d/99-calibration.conf
In /boot/config.txt I have to change because everything will be delete by the script from the Display. After I test it with this code Now I have to find the problem why chromium cannot open any webpage also 127.0.0.1
|
Not a good idea to run those scripts IMHO, as long as it is not a fresh official Raspberry Pi OS. They are doing way too much and assuming way too much, breaking a lot of custom configurations etc. The Section "Device"
Identifier "uga"
Driver "modesetting"
Option "kmsdev" "/dev/dri/card1"
EndSection Preserving syntax and identifier you used above. Please keep discussion about the Chromium issue here (which seems to match your issue): #5342 |
i had as well problem with the calibration even if i rotated the sceen as the guy from some posts above, it didnt work for me. I followed the example of MichaIng and installed xinput calibrator but I couldnt launch it cause i didnt have intall LXDE or any other graphic interface as i was runnign chromium without. It may see obvious for others but not for me so i'm putting here all the steps just in case someone also needs it. So
(same monitor 3.5inch RPi Display and rotation 270). Cheers ! p.s. big thanx once more to MichaIng to help in the first place making the script work! |
G_DIETPI_VERSION_CORE=6
G_DIETPI_VERSION_SUB=21
G_DIETPI_VERSION_RC=1
G_GITBRANCH=master
G_GITOWNER=Fourdee
G_DISTRO_NAME=stretch
Kernel=
Linux pi 4.14.98-v7+ #1200 SMP Feb 12 2019 armv7l
Device=RPi 3 model B
Power supply=USB from the router
SDcard: SanDisk ultra
Steps to reproduce
Expected behaviour
Actual behaviour
Installation fails (Yes, the script is messy)
Extra details
if test "$nodeplatform" = "raspberrypi";then echo "this is raspberrypi kernel" version=${version%% *} version=${version#*#} echo $version if test $version -lt 970;then echo "reboot" else echo "need to update touch configuration" sudo apt-get install xserver-xorg-input-evdev sudo 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" fi
The text was updated successfully, but these errors were encountered: