Important: Please read the Qt Code of Conduct -

DRM/KMS configuration for Raspberry Pi 4

  • I'm trying to get Qt running on a Raspberry Pi 4 fullscreen and without Raspbian - specifically the 3D accelerated parts. I'm using Buildroot, but have matched my Linux kernel configuration, mesa3d versions, etc. to ones running on Raspbian.

    Here's my current understanding:

    • Upstream is moving from the proprietary Broadcom interface to DRM/KMS
    • Raspbian enables the "firmware" KMS device tree overlay (vc4-fkms-v3d) for the Raspberry Pi 4, so this is what I'm doing to
    • In this configuration, a vc4 and a v3d kernel module are loaded to provide the DRM/KMS interface
    • The VC4 interface is via /dev/drm/card1. The V3D interface is via /dev/drm/card0
    • All drawing commands go to V3D (aka card0)
    • All screen resolution and configuration commands go to VC4 (aka card1)

    Qt's automatic detection of which card to use doesn't work. For me, it has been picking card1 so the screen resolution gets set and I get a hardware cursor that seems to work. However, graphics drawing requests fail. If I force card0, then my test program fails quickly when Qt tries to get the screen resolution.

    It feels like QT_QPA_EGLFS_KMS_CONFIG might be useful, but I'm not sure how to configure some commands going to card0 and some going to card1.

    Is this possible?

    Also, I'm using Qt 5.13.0. I didn't see anything recent that might address that, but if upgrading or pulling in a patch, I'll certainly try.


  • Does this mean I should not link against the libs in /opt/vc (the broadcom libraries)? If not, what do I need to do (see )

    Regarding your eglfs question: Maybe try eglfs.json like suggested here

Log in to reply