Graphics performance worse after updating to balenaOS > 2.51.1

Hello everyone,

I’ve noticed that the performance of graphics related content decreased after updating to balenaOS > 2.51.1 on a raspberrypi4 (64 bit). I’ve noticed this using both the balena-dash image (Chromium + X11) as well as a custom project I’ve made specifically for this problem using Wayland + WPE (https://gitlab.com/steffend/balena-performance-test).

To reproduce simply clone the repository and push it to a raspberry4-64 project. Ensure that the device is running balenaOS <= 2.51.1. For me specifically the pi did a very consistent ~25fps on 2.51.1 and only fluctuating ~19fps on any newer release. I’ve also noticed degraded performance when using CSS animations and other stuff (although I cannot not really quantify this).

I guess this must have something to do with the kernel update from 4.19 to 5.4, but I’m no linux graphics expert so I’ve got no clue how to track this down any further. Maybe someone here has a hint or knows someone that could look into this?

Anyway, thank you for the aweseome work at balena!

Thanks for the report Steffen, we hadn’t specifically tested this as far as I know, so I will ask some folks if it’s something we are aware of and get back to you.

1 Like

Hello @steffend,

Can you share a bit more about how you have the Pi setup? More specifically, the display you’re using, the resolution it is running and if there are any other settings/flags you have set.

Cheers,
Nico.

Yeah of course,
I’m currently using a standard 1080p monitor, the output mode is 1920x1080@60Hz. The only other options set are RESIN_HOST_CONFIG_disable_overscan=1 and 256MB GPU memory. All other options are the default for the pi 4 (so e.g. vc4-fkms-v3d overlay). I’m using the 4GB version of the Pi.

Hi,

Does the following command bring back the fps to ~25 on your side?
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

WOW, thank you :smiley:. That actually helps a lot. Using the demo image I get back a stable 25fps. Is this a setting that was recently changed?

(Another thing I’ve noticed repeatedly: when booting balenaOS > 2.51.1 with my mouse and keyboard attached, the Pi will not boot and only turn on and off the screen in a loop. Plugging them out allows the Pi to boot. I do not experience this issue on 2.51.1 and below. But I guess that’s something for another thread :smile:)

Edit: I’ve found another thread with a similar but maybe also not related problem.

Hey Steffen,

Glad you got the performance back up, and thank you for reporting this as it also helps us and everyone else. :wink:

Let us know how you get on with the keyboard & mouse investigation.

Phil

Steffen,

We have tried to recreate the issue with a keyboard and mouse plugged in and booting, but cannot recreate on any OS version. I think it must be something specific to the hardware combination you are using.

Phil