-
Notifications
You must be signed in to change notification settings - Fork 36
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
Installing picframe on OS Bullseye #390
Comments
So adding
|
Hi Wolfgang, it looks like there's something missing from the X setup. I've used @thomasedoff's setup https://gist.github.com/thomasedoff/3973846101da1e7496524be075f1c02f in the past as it installs the minimum needed X libraries and does away with the |
Thanks, Paddy. I looked at Thomas' Setup but he did not use a Pi 4 and following his instructions didn't work for me. Also, I am unclear which OS he actually used. I'll try again but so far no luck. |
I might have used the instructions selectively... can't remember details. You could try just adding the X related sounding dependencies from step 6 and see if that gets the X server running. Paddy |
Ok, I added
and
I get
|
Okay, I did a complete fresh install, and lo and behold, it works! The difference from last time is that I used the 32-bit OS version instead of 64-bit. Now, what I'd like to test is the frame rate to determine if Bullseye is at least as good as Buster. |
Tried to use @paddywwoof RPI4 Test, but they seem outdated. However, I made an interesting observation, which I think is a good sign: On my Pi3D Buster Pi 4, I have set the transition time to 10 seconds. However, in reality, the fading time is about 22 seconds. |
So, I tested it on a 4 K monitor. The fading is a bit slower, I think (it's hard to measure crossfading transitions exactly because you don't know when they start) on a 4 K monitor with Bullseye Pi 4, but only a bit. Setting it to 7 seconds in the config results in about 20 seconds of fading time, which is great. So, I guess it's time to move to Bullseye! I will test the system overnight, but I am really keen on having the filtering functionality again, which @helgeerbe has kindly updated. @paddywwoof Is there any recent fps testing routine? |
Hi, A few of the pi3d_demos do FPS monitoring but there are different factor that effect the speed of GPU rendering. The one that is probably nearest to picframe, ironically, is Minimal.py. You need to hack it a bit to get a meaningful result. Something like this import pi3d
import time
## set the height and width the same as the screen (or leave blank, there is a X setting to make if full screen, something like
## display_config=pi3d.DISPLAY_CONFIG_FULLSCREEN)
display = pi3d.Display.create(display_config=pi3d.DISPLAY_CONFIG_FULLSCREEN)#w=1920, h=1280)
camera = pi3d.Camera(is_3d=False) ## set default camera to orthographic with pixel width and height vals
shader = pi3d.Shader("uv_flat")
## read in different sized images to see how the fps varies
sprite = pi3d.ImageSprite("textures/PATRN.PNG", shader, w=1920.0, h=1280.0)
mykeys = pi3d.Keyboard()
start_tm = time.time()
n_frames = 0
while display.loop_running():
n_frames += 1
sprite.draw()
k = mykeys.read()
if k == 27:
mykeys.close()
display.destroy()
break
## you might not get the print outputting to terminal when running with xinit so write to ramdisk i.e. /dev/shm/fps.txt say
with open("/dev/shm/fps.txt", "a") as f:
f.write(f"FPS: {n_frames/(time.time() - start_tm):5.1f}\n") #append fps as new line leave it running for a while to get a reasonable average then ESC to stop. If you're running remotely and ESC doesn't work (can't remember if it does or not) then you might need to change the while loop to a for loop to do 1000 frames or something. i.e. do: for i in range(1000):
display.loop_running()
n_frames += 1
... |
@sapnho I wrote a setup guide for bookworm using X. So even screen blanking is working. Don't know what the performance is. But this setup should work also on a pi 3/4/5 https://github.com/helgeerbe/picframe/wiki/Setup-guide-Bookworm-and-X |
Thanks, @helgeerbe , I just did a fresh install on a Pi 4, and it works. I will try to get to works Paddy's code to compare the performance on the various OS. I suppose in your instructions, you mean Screen Blanking is to be disabled, not enabled. And how can I turn on/off the screen using a batch command in Bookworm or a separate Python script? Using |
Found it! Didn't that not work before in Bookworm? Nice! |
@paddywwoof So I did the following: Using this code:
I get the error message
that X11 is not running. |
Works on a Pi 4 but couldn't get it to work on a Pi 5 yet. |
No, you have to enable it. Otherwise the monitor power saving (dpms) functionality is disabled and xset will not work. Run |
Installed it on a Pi3: Works great. Pi 4 already worked great. Were you able to try it on a Pi 5? |
Sorry I don't own a Pi 5. Do you have some logs? |
Here is the revised long-form article based on Helge's instructions: https://www.thedigitalpictureframe.com/how-to-build-the-best-raspberry-pi-digital-picture-frame-with-bookworm-and-pi3d-picframe-2024-edition/ where the screen on/off works like a charm. @helgeerbe One thing: I left the D4 Screenblanking at OFF and it still works fine. If I don't, my screen blanks after a while in Terminal. |
Will try again this weekend. Which logs would you like to see? |
set loglevel of picframe to debug and run picframe from the console. You can set up a log directory in the configuration.yaml |
It looks my Pi 5 is broken. I changed SD cards three times, but I still get random freezes, which I have never seen with any Pi before. Have to get a new one. |
I got a new Pi 5 today and David Wei sent me his solution to make it work with a Pi 5. I just amended the article with his solution. |
One thing I noticed is that the Pi 5 gets superhot running Pi3D whereas the Pi 4 stays relatively cool. Does anybody else get that? |
How do I start picframe manually these days? |
And this is what I changed in the config file: log_level: "DEBUG" |
That does look like a lot of CPU for something that's supposed to use the GPU for all the heavy lifting. I wonder if the pi5 had to use software emulsion for GPU if it's not running Wayland. I will try to have a look after the weekend. Paddy |
I can chime in there and confirm I cannot get this working on a 5, I reverted back to python -m pip install git+https://github.com/helgeerbe/picframe@sdl2 and everything is fine. Not sure what I am missing out on, but just in case anyone else comes here, the setup listed for that version works fine. Debian GNU/Linux 12 (bookworm) (GNU/Linux 6.6.31+rpt-rpi-v8 aarch64) |
Can you recheck your link, please? It gives me a 404. |
I think this issue can be closed. |
I am opening this new thread so we don't mix the topics too much. I am trying to see if the problems we had some years ago when moving from Buster to Bullseye can be fixed. Thanks, @helgeerbe and @paddywwoof for your help. I will make a new blog post if everything works fine and the performance is comparable or better than Buster.
On a Pi 4.
So here is what I did:
sudo apt update -y && sudo apt upgrade -y
sudo raspi-config
and changed D4 Screen blanking to off, GPU Memory to 512MB, an Boot Option to auto-login to consolesudo apt install python3-pip
and thenpython3 -m pip install picframe
resulting in
sudo python3 -m pip install -U pip
andsudo python3 -m pip install pi-heif
andsudo pip3 install picframe
resulting in
mkdir DeletedPictures
, reboot,picframe -i .
Then I wanted to start with
sudo xinit /usr/bin/python3 /home/pi/picframe_data/run_start.py /home/pi/picframe_data/config/configuration.yaml
which got me
What is missing or needs to be changed?
The text was updated successfully, but these errors were encountered: