DirectFB2 project brings back DirectFB graphics library for Linux embedded systems

DirectFB2 is a new open-source project that brings back DirectFB, a graphics library optimized for Linux-based embedded systems that was popular several years ago for 2D user interfaces but has since mostly faded away. DirectFB2 attempts to preserve the original DirectFB backend while adding new features such as modern 3D APIs like Vulkan and OpenGL ES.

I personally used it in 2008-2009 while working with Sigma Designs media processors that relied on the DirectFB library to render the user interfaces for IPTV boxes, karaoke machines, and so on. I remember this forced me to switch from a MicroWindows + Framebuffer solution, but the DirectFB API was easy enough to use and allowed us to develop a nicer user interface.


I found out about the new project while checking out the FOSDEM 2022 schedule and a talk entitled “Back to DirectFB! The revival of DirectFB with DirectFB2” which will be presented by Nicolas Caramelli on the 5th of February. We still have a few details including some of the main changes include the Meson build system, a pure C implementation, and modularization of the source code.

DirectFB2 library ( can access the low-level display driver in one of two ways:

  • Linux Framebuffer interface (/dev/fb0) handled with plugin
  • KMS/DRM interface (/dev/dri/card0) handled with plugin

Hardware-accelerated graphics rendering can also be achieved using the architecture of the GFX driver modules. provided the platform is supported. Nicolas says the core library is very light without any external dependencies and provides basic font, image, and video rendering support as can be seen with the DirectFB examples shown above.

Besides basic support, DirectFB2 can be further enhanced with the DirectFB-media package adding FreeType library, rendering images with libpng or jpeg libraries, rendering videos with FFmpeg, or GStreamer libraries. Another new development is support for 3D graphics through OpenGL (ES) or Vulkan rendering, while 2D graphics rendering can be handled via Cairo or Evas libraries. DirectFB(2) can also handle user input (e.g. keyboard and mouse) through the console interface (/dev/tty0), the event device interface (/dev/input/event0/1, and/or the PS/2 mouse interface (/dev/psaux) .

DirectFB2 OpenGL
DirectFB2 OpenGL demo

If you want to find more information and get started check out the Github repo and documentation with samples programs such as dfbterm terminal emulator, various DirectFB examples, tests or benchmarks, compatible toolkits like LiTE (Lightweight Toolkit Enabler) and its extended Component Kit (LeCK), or on the ilixi toolkit.

Share this:

Support CNX Software! Donate via cryptocurrencies or become a Patron on Patreon

ROCK Pi 4C Plus
Notify of
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
Ray Knight
Ray Knight
9 months ago

I wonder how this relates to

9 months ago

Do fb0 and card0 have same functionality being user space links towards low level graphics driver (kernel built-in(s) or module(s), combined with user space graphics library (*.so)) for graphics hardware components (gpu not vpu -> /dev/video*)?

3 months ago

fb0 use Linux Framebuffer API, card0 use KMS/DRM API, it depends on their respective drivers implementation. fb is a very old one from 90s, but still used for console terminals on GNU/Linux

9 months ago

Thanks Jean-Luc, this warmed my heart. Even if I’m unlikely to use it myself, it’s great to see this is alive and an available option.

4 months ago

thanks for the info, glad to see it is back. GUI for embedded device has always been a challenge over the last few decades.

Weller PCB manufacturer