pi3d / pi3d.github.com

Org page for pi3d
22 stars 7 forks source link

black screen #12

Closed Tsjippy closed 1 year ago

Tsjippy commented 1 year ago

I have installed this on a rpi 3b+ with Bookworm

with:

wget https://github.com/pi3d/pi3d_demos/archive/master.zip
unzip master.zip
rm master.zip
mv pi3d_demos-master pi3d_demos

I get a black screen and a 0 in my console with DISPLAY=:0.0 python3 /home/pi/pi3d_demos/PictureFrame2020.py

with DISPLAY=:0.0 python3 RunTests.py I get to see some pictures.

What could be wrong?

paddywwoof commented 1 year ago

Hi, There are various changes with bookworm so there might be different causes. I'm not sure how you installed pi3d, which will be main determinant, but also whether you are using bookworm 64 v 32 bits and whether you have the full desktop or only the lite version. There is some active discussion on the picframe site (github.com/helgeerbe/picframe) which has various strategies but not a final version for the instructions.

The fact that some of the demos sound to work means that you probably have some things install (i.e. desktop SD image) I would suggest trying changing the arguments to creating the Display, to use sdl2:

DISPLAY = pi3d.Display.create(x=config.DISPLAY_X, y=config.DISPLAY_Y,
              w=config.DISPLAY_W, h=config.DISPLAY_H, frames_per_second=config.FPS,
              display_config=pi3d.DISPLAY_CONFIG_HIDE_CURSOR, background=config.BACKGROUND, use_sdl2=True)

However this supposes that you are using pi3d v2.51 which won't be installed automatically from pypi using pip, to get the latest version you will need to upgrade pi3d using:

python -m pip install git+https://github.com/tipam/pi3d --upgrade
#### you will also need pysdl2
python -m pip install pysdl2
#### and probably the libraries
sudo apt install libsld2-dev

I'd also like to know how you got on with the venv requirements in bookworm.

Paddy