Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4896

Graphics, sound and multimedia • QT4.8 & KMS - no framebuffer without monitor

$
0
0
I am slowly switching PINN over from the firmware graphics driver to KMS to cater for the Pi5. So far it works when a monitor is attached to HDMI0.
PINN uses Qt4.8 which relies on an environment variable QWS_DISPLAY to indicate which device to render the display to, typically /dev/fbX or vnc.
With the previous firmware graphics driver on Pi4 and below, it seems that /dev/fb0 was always created whether or not any monitors were attached. This was good for headless operation.

However with KMS, a framebuffer only seems to be created if a physical monitor is attached, even if hotplug is forced or a video setting is added to cmdline.txt. QWS_DISPLAY must indicate a valid framebuffer, so without any attached monitors causing a framebuffer to be created, the Qt application will crash.

My workaround for headless operation so far is to set QWS_DISPLAY to use VNC, but this means VNC is always enabled.

Is there a way to force /dev/fb0 to be created without any monitors being attached?

I've read about 'vfb', but as this must be enabled from cmdline.txt I'm not sure it is appropriate, as it would always be present and would only want it IF there were no monitors attached.

Statistics: Posted by procount — Mon Jul 01, 2024 2:18 pm



Viewing all articles
Browse latest Browse all 4896

Trending Articles