Contact Us

Qt App Not Showing on Embedded Linux? EGLFS, KMS, GPU, Touch, Fonts

🇰🇷 한국어로 읽기 (Korean version): 임베디드 리눅스 보드에서 Qt 앱 화면이 안 뜰 때 점검할 곳 6가지: EGLFS·KMS·GPU 드라이버·터치·한글 폰트

You deploy a Qt app to an embedded Linux board, and nothing appears on the screen. Sometimes it exits right away with a "could not find the platform plugin" error; sometimes the process keeps running while the screen stays black or still shows the boot console. Even when the UI finally appears, it is common to find that touch does not respond or lands in the wrong place, that Korean (or other CJK) text shows up as boxes (□), or that the app works when you start it from a terminal but fails only when it is started automatically at boot.

On a PC, a window system such as X11 or Wayland and the desktop environment take care of the display, input, and fonts for you. On an embedded board, Qt often handles this itself through QPA (Qt Platform Abstraction, the layer that connects Qt to the display output, input devices, and graphics drivers). So even when there is nothing wrong with your Qt code, one mismatch in plugin deployment, KMS/DRM (Kernel Mode Setting/Direct Rendering Manager, the Linux kernel framework that manages displays and GPUs) settings, the GPU driver, input devices, fonts, or the runtime environment is enough to leave the screen blank. In this note, THEFINE summarizes the 6 things we check first when a Qt UI does not show up during board bring-up, each broken down into symptom, cause, and how to fix. If the UI does appear but the HMI is slow overall, see our note on 6 reasons an embedded Qt HMI slows down (Korean).

Illustration of a Qt UI and touch input flowing from the SoC GPU to an embedded display panel

What to check first (overview): Run the app with the QT_LOGGING_RULES="qt.qpa.*=true" environment variable and check in the log which platform plugin, backend, display output, and input devices were selected. Next, independently of Qt, check the connector status under /sys/class/drm, whether the display and GPU work with tools such as modetest and kmscube, and whether touch events reach the kernel with evtest. If something fails outside Qt as well, the problem is in the drivers or device tree; if it works outside Qt but fails only in Qt, the problem is in the Qt configuration or deployment. Splitting the scope this way first cuts debugging time considerably.

What you seeSuspect firstSection
Exits immediately with "Could not find the Qt platform plugin"Platform plugin deployment or selection, missing dependent libraries1
The app is running, but the screen is black or still shows the consoleEGLFS backend selection, another program holding the display, KMS output settings2, 3
Wrong resolution, or output appears on the wrong screenDRM device, connector, and mode settings3
The UI shows up but stutters and tears, and CPU usage is highGPU and EGL libraries, software rendering, vsync4
Touch does not respond, or coordinates are rotated or mirroredInput device permissions, libinput or evdev settings, rotation and calibration5
Korean (CJK) text shows as □, or the app fails only when started at bootMissing fonts or locale, systemd service environment6

1. The platform plugin cannot be found, or a desktop plugin is selected

Symptom: As soon as you start the app, messages such as qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" and This application failed to start because no Qt platform plugin could be initialized. appear and the app exits. Right below, a list of available plugins such as Available platform plugins are: eglfs, linuxfb, minimal, ... may also be printed.

Cause: At startup, Qt picks one platform plugin and loads it. The plugins most often used on embedded Linux are eglfs (draws directly to the screen with EGL and OpenGL ES, without a window system; the recommended choice for boards with a GPU), linuxfb (draws directly into the framebuffer with the CPU), and wayland (runs on top of a compositor such as Weston, a display server that combines the windows of multiple apps). The default plugin is decided when Qt is built, so if you use a Qt built with a PC configuration, or an environment variable from the development PC (such as QT_QPA_PLATFORM=xcb) is left in a script, Qt looks for a plugin that does not exist on the board. The same message also appears if you copied only the app executable without deploying the plugins/platforms directory, or if the plugin is there but fails to load because a library it depends on (libEGL, libgbm, libinput, and so on) is missing from the image.

How to fix: First run QT_DEBUG_PLUGINS=1 ./app to see which paths and files Qt searched and why loading failed. Find the plugin location with find / -path "*plugins/platforms*" -name "libq*.so" 2>/dev/null, and use ldd to make sure no library is reported as not found for that plugin (for example, libqeglfs.so). Then specify the plugin explicitly, either with the QT_QPA_PLATFORM=eglfs environment variable or with the ./app -platform eglfs command-line argument. On boards without a GPU, or whose GPU driver is not ready yet, use linuxfb; for a Qt Quick (QML) app you must then select the software renderer with QT_QUICK_BACKEND=software. Which plugin to use depends on the product architecture. eglfs assumes a single full-screen window per screen and does not support multiple OpenGL windows, so if you need several apps or windows on one screen, consider a Wayland compositor setup from the start.

2. The EGLFS backend does not match the board's GPU, or another program is holding the display

Symptom: You specified eglfs and there is no plugin error, yet the screen is black or the boot logo or console stays on screen. You may also see an EGL initialization error such as Could not initialize egl display, or a mode-setting error such as Could not set DRM mode.

Cause: EGL (a Khronos graphics API, the interface that connects OpenGL ES to the actual screen or window system) does not define how a board creates its screen, so EGLFS handles this part with device integration backend plugins. Typical backends are eglfs_kms (KMS/DRM based), eglfs_kms_egldevice (EGLDevice based), and backends such as eglfs_viv (Vivante GPU) and eglfs_mali (Mali GPU) used with older framebuffer-based BSPs. If the image contains several backends, an unintended one can be selected, and if the backend you set with QT_QPA_EGLFS_INTEGRATION fails to initialize, the remaining candidates are tried in turn, so it is easy to lose track of which one is actually running. Also, if Weston, an X server, or a demo app from the vendor's default image starts first and holds display control (DRM master), eglfs_kms cannot set the display mode.

How to fix: Run with QT_LOGGING_RULES="qt.qpa.*=true" and check the qt.qpa.egldeviceintegration log to see which backend was loaded; if needed, also print the selected EGL configuration with QT_QPA_EGLFS_DEBUG=1. The available backends are the files in egldeviceintegrations under the Qt plugin directory. On a recent BSP with a KMS/DRM driver, QT_QPA_EGLFS_INTEGRATION=eglfs_kms is usually the starting point, but follow your BSP documentation for the exact value. It is safer to ship only the backend you actually use in the product image. Use ps and systemctl list-units --type=service to check whether Weston, an X server, or a demo app is running, and stop or disable it if your app runs alone in full screen. Conversely, if your setup needs to keep the compositor, use the wayland plugin instead of eglfs.

3. The KMS/DRM output settings do not match the board's display layout

Symptom: The screen is black, the resolution does not match the panel, or the UI shows on an HDMI monitor but not on the board's LCD (a MIPI DSI or LVDS panel). On devices with two displays, the UI may appear on the wrong one.

Cause: Without any configuration, eglfs_kms finds a DRM device automatically, combines all connected outputs into one virtual desktop, and drives each output in its preferred mode. On some SoCs, however, the GPU and the display controller are separate DRM devices, such as /dev/dri/card0 and card1, and if the device without a display output is picked, nothing appears. If a connector shows as disconnected or has no panel mode information, the problem is not Qt but the display driver or device tree.

How to fix: First check the hardware state without Qt. List the DRM devices with ls /dev/dri/, check connector status with cat /sys/class/drm/card*-*/status, and check the supported modes per connector with the libdrm test tool modetest -c (add -M with the driver name if needed). If the connector does not show up at all, start with our note on device tree and driver probe failures. If the hardware is fine, specify the device and outputs in a JSON configuration file and point to it with QT_QPA_EGLFS_KMS_CONFIG=/etc/hmi/kms.json. Use the connector names (for example, HDMI1 or DSI1) exactly as they appear in the qt.qpa.eglfs.kms log.

{
  "device": "/dev/dri/card1",
  "hwcursor": false,
  "outputs": [
    { "name": "HDMI1", "mode": "off" },
    { "name": "DSI1", "mode": "1280x800" }
  ]
}

mode accepts values such as off, current, preferred, skip, 1280x800, and 1280x800@60 (the device path, names, and resolution above are examples). Qt skips mode setting when the current mode already matches the requested one; on boards where this leaves the display turned off, try QT_QPA_EGLFS_ALWAYS_SET_MODE=1. When you need to rotate the screen, for example for a portrait panel, note that QT_QPA_EGLFS_ROTATION applies only to software-rendered content such as QWidget and not to Qt Quick, so for a Qt Quick app, plan to handle rotation in the QML scene instead.

4. A GPU/EGL driver mismatch causes a fallback to software rendering or screen tearing

Symptom: The UI appears, but animations stutter and one CPU core stays busy. Scrolling shows tearing, where the top and bottom of the screen look out of step, or, the other way around, animations play unusually fast.

Cause: Either the image contains both the software renderer from Mesa (the open-source graphics driver stack) and the vendor GPU libraries (libEGL, libGLESv2, and libgbm for Mali, Vivante, PowerVR, and so on), and the wrong libEGL gets loaded first, or Qt was built without a GPU backend and can only render in software. A mismatch between the Qt version and the BSP's GPU library version can cause similar symptoms. Tearing happens when screen updates are not synchronized with the display's vertical sync (vsync). By default, linuxfb draws straight into the framebuffer without vsync, while eglfs syncs to vsync by default; synchronization breaks if a setting such as QT_QPA_EGLFS_SWAPINTERVAL=0 is left over or the driver does not handle synchronization properly.

How to fix: Running a Qt Quick app with QSG_INFO=1 prints the graphics API in use and the GPU renderer information. If the renderer name is llvmpipe or softpipe, the CPU, not the GPU, is doing the drawing. To see which graphics libraries the running app actually loaded, use grep -E "EGL|GLES|gbm|mali" /proc/$(pidof app)/maps (replace app with the actual process name). Checking separately from Qt whether kmscube (a test program that exercises KMS, GBM, and OpenGL ES) runs smoothly tells you whether it is a GPU driver problem or a Qt configuration problem. If you built Qt yourself, check the configure results (for Qt 6, config.summary in the build directory) to confirm that EGLFS, the relevant backend, and OpenGL ES are detected as yes. If graphics memory is reserved up front on your platform, Full HD and above can fail in odd ways when that memory runs out, so check the allocation as well; for contiguous memory issues, see our DMA and contiguous memory (CMA) note. If the board has to use linuxfb, enabling DRM double buffering (page flipping) with QT_QPA_FB_DRM=1 lets you sync to vsync even with software rendering.

5. Touch does not respond, or the coordinates are rotated

Symptom: The display is fine, but touch does not respond, or a different spot from the one you touched gets pressed. The coordinates may be rotated 90 degrees or mirrored left-right or top-bottom, and a mouse cursor may show up even though it is a touchscreen.

Cause: With eglfs and linuxfb, which have no window system, Qt reads the /dev/input/event* devices directly. If the app runs as a non-root user without permission to read these devices, no input arrives at all. Qt uses libinput (the Linux input device handling library) by default when it is available and otherwise falls back to its own evdev input handlers, and the two are configured differently for rotation and calibration. Also, the screen rotation setting (QT_QPA_EGLFS_ROTATION) does not affect touch input, so if you rotate only the screen and not the touch input, the coordinates will not line up.

How to fix: First select the touch device in evtest and check that events such as ABS_MT_POSITION_X/Y appear as you move your finger. If no events appear here, the problem is not Qt but the touch controller driver or the device tree (I2C address, interrupt pin). If kernel events are fine, use QT_LOGGING_RULES="qt.qpa.input=true" to see which devices Qt opened. With libinput, set rotation and calibration in QT_QPA_LIBINPUT_TOUCH_MATRIX by giving the first two rows of the transformation matrix (for example, "-1 0 1 0 -1 1" for a 180-degree rotation). To use evdev instead, set QT_QPA_EGLFS_NO_LIBINPUT=1 (QT_QPA_FB_NO_LIBINPUT=1 for linuxfb) and specify the device together with rotate (90, 180, 270), invertx, or inverty, as in QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event1:rotate=90. Event numbers can change between boots or device configurations, so it is safer to create a fixed device name with a udev rule. With multiple displays, assign a touchDevice to each output in the JSON configuration file from section 3, and if a cursor shows on a touch device, hide it with QT_QPA_EGLFS_HIDECURSOR=1. In industrial and medical HMIs, touch calibration is a safety matter, since it decides whether the button the user presses is the one that gets pressed, so manage it as a validated image setting rather than a value changed in the field.

6. Korean (CJK) text shows as boxes, or the app fails only when started at boot

Symptom: Latin text is fine, but Korean (or other CJK) characters show as □ or are blank. Or the app starts fine when you run it from an SSH terminal, but when it is started automatically at boot as a systemd service, the screen stays black or the app exits immediately.

Cause: Qt no longer ships its own fonts, so the system image has to provide them. Size-reduced embedded images often have no Korean font. Qt normally finds system fonts through fontconfig (the Linux font discovery and configuration library), and without fontconfig it looks in Qt's lib/fonts directory (or the path set with QT_QPA_FONTDIR). If the locale is set to a non-UTF-8 value such as C, Qt 6 prints a Detected locale "C" ... which is not UTF-8 warning at startup and tries to switch to C.UTF-8. If the image has no UTF-8 locale to switch to, or you are using Qt 5, handling of Korean file names and strings can break. When the app fails only at autostart, the cause is usually a difference in the runtime environment. A systemd service does not read login shell files (such as /etc/profile), so QT_* environment variables you export in the shell are not applied, and the service may also start before the display and touch drivers are ready.

How to fix: Check with fc-list :lang=ko whether a font with Korean support is installed. If not, add a Korean font whose license you have checked (for example, Noto Sans CJK KR or NanumGothic, both under the SIL OFL) to the image and refresh the font cache with fc-cache -f. To get the same typeface regardless of how the image is built, you can also bundle the font in the app resources and register it with QFontDatabase::addApplicationFont(). Set the locale with LANG=C.UTF-8 (or ko_KR.UTF-8 if it is included in the image). When running as a service, write the required environment variables directly into the service file.

[Unit]
Description=Qt HMI application

[Service]
Environment=QT_QPA_PLATFORM=eglfs
Environment=QT_QPA_EGLFS_INTEGRATION=eglfs_kms
Environment=QT_QPA_EGLFS_KMS_CONFIG=/etc/hmi/kms.json
Environment=LANG=C.UTF-8
ExecStart=/opt/hmi/bin/hmi
Restart=on-failure
RestartSec=2

[Install]
WantedBy=multi-user.target

The paths and values above are examples; check the cause of a failure with journalctl -u hmi.service -b. If the app runs as a non-root user, also set up access to /dev/dri and /dev/input (usually through the video, render, and input groups, depending on the distribution). If your setup uses the wayland plugin, add XDG_RUNTIME_DIR to the service environment so the app can find the compositor socket (plus WAYLAND_DISPLAY if the socket name differs from the default). If the first launch fails because a driver comes up late, let Restart=on-failure retry it, and to shorten the time to the first screen itself, see our embedded Linux boot time note (Korean).

Checklist at a glance

  1. Check platform plugin and dependency loading with QT_DEBUG_PLUGINS=1, and specify the plugin explicitly.
  2. Check the selected EGLFS backend and output and input devices with QT_LOGGING_RULES="qt.qpa.*=true", and make sure no other program is holding the display.
  3. Check connectors and modes with /sys/class/drm and modetest, then pin the device and outputs with QT_QPA_EGLFS_KMS_CONFIG.
  4. Check whether the GPU is rendering with QSG_INFO=1 and kmscube, and sort out the graphics libraries and vsync settings.
  5. Check kernel touch events with evtest, then configure Qt's input device, rotation, and calibration.
  6. Add Korean fonts and a UTF-8 locale, state the environment variables and permissions in the service file, and verify autostart at boot.

Summary: Qt display problems start in the graphics and input environment around the app, not in the app code

When a Qt UI does not appear on an embedded Linux board, or touch and text misbehave, the cause is almost always one of the following, or a combination: platform plugin deployment and selection, the EGLFS backend and display ownership, KMS/DRM output settings, the GPU/EGL driver, input device settings, or fonts, locale, and the service runtime environment. First confirm that the display, GPU, and touch work outside Qt, then make the Qt configuration explicit with environment variables and configuration files and fix it in the image. That way you avoid the situation where everything works on the development board but not in the production image.

At THEFINE, a single team handles contract development from embedded Linux BSP and display bring-up through Qt/QML HMI applications.

If your Qt UI still does not appear on the board, or touch or font problems persist, send us your SoC and BSP version, your Qt version and the platform plugin you use, the display and touch panel specifications, and the log from running with QT_LOGGING_RULES="qt.qpa.*=true". We will review them and get back to you.

Related notes

Related services: Qt Application Development · Embedded Linux Development

Contact us / Request a quote | ☎ +82-31-498-3130