LCD-show icon indicating copy to clipboard operation
LCD-show copied to clipboard

3.5inch RPi LCD (B) not working on Raspberry Pi OS Lite (bookworm)

Open project-owner opened this issue 2 years ago • 9 comments

There were no errors when I ran the script:

git clone https://github.com/waveshare/LCD-show.git
cd LCD-show/
./LCD35B-show lite

I can see the boot messages on the screen and the touchscreen calibration worked fine. But the display doesn't show any image when it's working either with Pygame 2 and framebuffer or just framebuffer 'fbi' utility. The same display worked fine with Raspberry Pi OS Lite (buster). Is there any way to make it working with 'bookworm' OS version? Thanks!

project-owner avatar Oct 18 '23 21:10 project-owner

Hello, I have BookWorm and LCD35-show didnot work as well. Any solution on this problem?

Toh-git avatar Oct 23 '23 05:10 Toh-git

I've done more experiments and can say for sure that this is Waveshare display problem: https://forums.raspberrypi.com/viewtopic.php?t=358144#p2149219 I'm not sure if that's hardware or software issue. Hopefully software issue which can be fixed.

project-owner avatar Oct 25 '23 23:10 project-owner

@project-owner can you try that maybe? https://github.com/waveshare/LCD-show/issues/58#issuecomment-1859084420
=> i assume same could apply for other versions (A et B)

worked for me on with bookworm and bullseye for Rasberry Pi OS
it won't likely work for non-Raspbian based OS - e.g Ubuntu - as using a different kernel (so likely more changes)

also must run through xorg (repo doesn't not setup for e.g wayland)

JimJ92120 avatar Dec 18 '23 12:12 JimJ92120

I need it on OS Lite - the OS without desktop.

project-owner avatar Jan 11 '24 01:01 project-owner

@project-owner both works are working on my side. additionally LCD35B model has 2 version models. are you correctly using the v1 or v2 and matching script?

JimJ92120 avatar Jan 11 '24 02:01 JimJ92120

Yes, the terminal shows up on a screen. But this is not enough for me. I need to draw on screen using Pygame 2 llibrary. That doesn't work. Here is the simple Python script which draws a line on a screen. This script doesn't work.

import os
import pygame
import time
os.environ["SDL_FBDEV"] = "/dev/fb0"
pygame.init()
display = pygame.display.set_mode((480, 320))
print(pygame.display.get_driver())
display.fill((0,0,0))
pygame.display.update()
pygame.draw.line(display, (30,80,200),[100,100],[200,200],2);
pygame.display.update()
time.sleep(5)

I have v1 display. So, I use this command:

./LCD35B-show lite

project-owner avatar Jan 11 '24 06:01 project-owner

@project-owner I believe it has nothing to do with driver and this repo then. Driver is working as you're able to render what the OS is supposed to.

A server do not render GUI by default and by design except the usual terminal, unless such GUI rendering is explicitly configured and declared. That's why there are server and desktop versions.

So this would point to your system being misconfigured and the need to set up such rendering and forward it to your screen.

You may search for "kiosk mode" OS's - rpi-imager does have some in images list.

JimJ92120 avatar Jan 11 '24 08:01 JimJ92120

It still works fine, since Raspbian bookworm the files config.txt and cmdline.txt moved from /boot/ to /boot/firmware/ . So I did following before I run ./LCD-show installation:

mv /boot/config.txt /boot/config.txt.old
mv /boot/cmdline.txt /boot/cmdline.txt.old
ln -s /boot/firmware/config.txt /boot/config.txt
ln -s /boot/firmware/cmdline.txt /boot/cmdline.txt

vchrizz avatar Jun 27 '24 20:06 vchrizz

Which OS do you use, lite or desktop version? I need it working on a Lite version (no X, no Wayland). Can you use Pygame?

project-owner avatar Jun 28 '24 01:06 project-owner