Lei Zhou
Case study · Mixed-criticality and virtualisation

vcockpit: QNX and Linux cockpit displays on one PC

A QNX 8.0 instrument cluster and a Linux guest run in separate virtual machines and are composed into one cockpit display on a desktop PC, so cockpit software can be built and integrated before the vehicle hardware exists.

Independent open-source project · sole author · QNX Global Hackathon 2026 entry
Context

The cockpit screen is where isolated systems meet

A vehicle cockpit is one screen showing the work of several systems that must stay isolated from each other: a safety-relevant instrument cluster next to an infotainment stack that is updated often. In a software-defined vehicle they usually run as separate guests on one SoC, and the display is the one place where their output has to come together.

Software for that screen normally waits for prototype hardware. vcockpit moves the work earlier: the same guest operating systems run as virtual machines on an ordinary PC, and their displays are composed the way a cockpit composes them, so teams can develop and integrate cockpit software with fast iteration and fewer hardware dependencies, then move it to the target platform.

The challenge

Getting frames out of each guest, and putting them in the right place

Two design questions decided the shape of the system.

  • The display path. An earlier proof of concept used QEMU’s SDL display, which proved the path from guest to host but runs the display code inside the hypervisor process. The final design uses QEMU’s D-Bus display: QEMU hands each frame to a separate process as a dma-buf file descriptor, so a fault in the display path cannot take the hypervisor down, and the proxy never maps or copies a frame.
  • The composition policy. A cockpit needs fixed zones and an explicit stacking order, not desktop windows. Weston with the COVESA IVI shell places each guest’s output as a numbered surface at pixel coordinates on its own layer. A compositor that assigns roles such as fullscreen or split would not give a fixed multi-zone layout without custom policy.

Then came the details that only show up when it runs: QEMU’s D-Bus display needs the legacy VGA console disabled; importing a dma-buf inside a D-Bus callback can deadlock a GLib main loop; guest frames with an alpha channel left trails on the host until they were imported as opaque and the compositor got an opaque background; and the IVI shell drops keyboard focus when the host window loses focus. Each one is written up with its cause and fix in the repository.

My role

Sole author

vcockpit is my own project, conceived and built on my own hardware. I set the goal and scope, chose the architecture and the design trade-offs on this page, and wrote the specifications each feature was built against. Implementation ran as a series of written work orders with AI assistance: Claude for design review, code drafting and debugging analysis, and Gemini as a cross-reviewer. I ran and accepted each step on the test machine, and every commit is mine.

The approach

Composition in two levels, with the hypervisor kept out of the display path

  • Each guest composes its own windows; the host composes the guests. QNX Screen and the Linux guest’s own display stack produce a finished picture; the host only arranges buffers it is given.
  • One QEMU, one private D-Bus bus and one proxy per guest. Guests do not share a display connection, and each proxy is its own process.
  • Fail visibly. The proxy refuses QEMU’s pixel-copy methods, so a guest that cannot provide dma-bufs shows an error instead of silently falling back to copying frames through the CPU.
  • Production habits on a proof of concept. The QNX programs are developed following ASIL-B-oriented practices; they are not certified. Owned C code follows a written coding standard enforced by a make check gate.
What I built

A proxy, a compositor, two guests and one command

Architecture: a QNX 8.0 guest running cluster-gauge and telltale-monitor, and a Debian 12 guest running glxgears, each send virtio-gpu commands to their own QEMU with virglrenderer. Each QEMU hands frames over a private D-Bus bus as dma-buf file descriptors to its own proxy, which passes them to Weston with the COVESA IVI shell as IVI surfaces 1000 and 2000 over an opaque background surface. Mouse and keyboard input flows back from the compositor through each proxy to its guest.
Two guests, one cockpit display. Frames travel as dma-buf file descriptors; input flows back through the same proxy.
  • automotive-dbus-proxy (C): listens to QEMU’s D-Bus display, imports each scanout as a Wayland buffer, draws the pointer cursor and forwards mouse and keyboard input to the guest under the pointer.
  • Host compositor: Weston 10 with the COVESA IVI shell in a container, with surface placement, stacking and input focus set by IVI policy.
  • cluster-gauge (C, QNX SDP 8.0): an instrument cluster drawn with QNX Screen and OpenGL ES 2, publishing the telltale state it commands.
  • telltale-monitor (C, QNX SDP 8.0): a separate process that captures the composed display ten times a second and checks the telltales shown against the telltales commanded, the pattern used for telltale integrity in instrument clusters.
  • A Debian 12 guest beside the QNX guest, with its own QEMU, bus and proxy.
  • vcockpit.sh start | stop | status: brings the whole cockpit up and down, checking each step, while both guests start their content at boot.
  • A codelab: QNX 8.0 graphics from QEMU into a Wayland compositor, step by step.
Results

Two operating systems live on one cockpit display

CompositionQNX 8.0 and Debian 12 rendering live side by side, each through its own proxy, with input following the pointer
Cluster frame rate60 fps with no overruns over a 30-second run; longest frame 19.4 ms
Telltale checkInjected telltale faults detected in 265–284 ms in testing, inside the 500 ms design target
One commandStart, stop and status for the whole cockpit, verified on three consecutive clean runs
Open sourceCode GPL-2.0-or-later, documentation CC BY 4.0, every file SPDX-tagged
SubmissionEntered in the QNX Global Hackathon 2026, Developer Tooling & Host Tools, with a codelab

Tested on one machine: an Ubuntu 22.04 host with an AMD GPU, QEMU 9.2.4 and virglrenderer 1.3.0. Whether buffers stay in GPU memory end to end has not been measured yet. The telltale timings are design targets, not derived from a hazard analysis, and in the tested setup the guest’s window manager, not the monitor, decided how its warning band was shown.

What’s next

From one picture per guest to one surface per application

  • Per-application composition. A Linux guest with several virtual outputs, each pinned to an application and placed by the host as its own surface, so navigation, infotainment and a driver-assistance overlay can be composed independently.
  • A warning layer on the host. A telltale warning placed by the IVI compositor above every guest surface would not depend on any guest’s window manager.
  • Frame path measurement. Confirm whether buffers stay in GPU memory end to end, and measure frame latency and jitter with both guests at 60 fps.
  • Parity on target hardware. The same composition contract on an automotive SoC, and on cloud hosts for development at scale.