Feature Request: DRM/Framebuffer Access for Screenshot/Grabber Tools on Raspberry Pi 5 (LibreELEC 12 / VC6)

  • Hello LibreELEC developers,

    I'd like to suggest a feature that could benefit many community projects, especially those related to Hyperion (Ambilight) and screenshot-based display analysis.

    Goal:

    Enable access to the current scanout framebuffer on Raspberry Pi 5 with VC6/KMS driver – for use in screenshot or grabber tools – by optionally providing:

    • a kernel module
    • a char device (/dev/scanout-export)
    • a DMA-Buf export point
    • or an alternative interface (e.g. DRM plane clone, gbm_bo_export, etc.)

    Background:

    Since the move to KMS + VC6 on Raspberry Pi 5, it is no longer possible to access the visible framebuffer using traditional means like:

    • drmModeGetResources()
    • drmModeGetPlane()
    • gbm_bo_map()

    Errors such as EOPNOTSUPP are returned for plane/resource queries, breaking:

    • Hyperion DRM grabbers (VC4 still worked)
    • DRM-based screenshot tools
    • Live color analysis (e.g. ambient lighting, automation)

    Why this matters:

    Hyperion and other tools rely on capturing the live screen content for Ambilight effects or HDMI-based automation.

    Under LibreELEC 12 (aarch64, VC6), this capture is currently not possible at all.


    ✅ Proposal:

    • Provide an optional kernel module or grabber interface
    • Make the current scanout framebuffer accessible through DMA-Buf export
    • Alternatively, expose a linear, readable framebuffer via a lightweight device (e.g. /dev/scanout-dma)

    I'm happy to help testing this or discussing viable implementation options.
    Even partial access or a Kodi-based workaround could unblock community projects.

    Thank you for considering –
    Greetings from the North,
    CptHenry

  • I'd suggest you submit the idea to the Raspberry Pi kernel developers via their GitHub repo as this is not something that will be developed by LE staff.

  • I'm forgetting that this exists: https://github.com/rudihorn/drm-vc4-grabber

    If you want to experiment, the /usr/bin/drm-vc4-grabber binary is embedded in this image:

    https://chewitt.libreelec.tv/testing/LibreE…-12.80.2.img.gz (and the .tar)

    Note that I've only compiled the package, I have no means of testing it. The 'drm-capture' service should run on boot.

    Package changes are here: https://github.com/chewitt/LibreELEC.tv/commits/rpi-13.0

    If it works well it could be repackaged as an add-on, although an in-kernel solution would still be nicer.