Skip to content

kmscon: add terminal emulator for KMS devices - #161

Merged
dangowrt merged 2 commits into
openwrt:masterfrom
dangowrt:kmscon
Sep 26, 2026
Merged

dangowrt merged 2 commits into
openwrt:masterfrom
dangowrt:kmscon

Conversation

@dangowrt

Copy link
Copy Markdown
Member

A system without a framebuffer console has no text console at all. kmscon draws a terminal straight onto a DRM device, through OpenGL ES where the GPU allows and in software on the same device otherwise.

Device access goes through libseat, so the seat owns the drm device and the vt rather than kmscon reaching for both itself. That needs seatd, which is a small daemon and already starts before this service. Built without the fbdev backend and with the built-in PC screen font, so it needs neither pango nor freetype. The service is off until enabled, so it does not take the display from whatever else is using it.

Two patches are carried. The first keeps the unifont generator, a native helper linked against zlib for the build machine, out of a build that has the unifont backend disabled, which otherwise breaks cross compilation. The second stops an error loop: a render-only drm node answers NULL to drmModeGetResources, which the hotplug path treated as an error and returned from the poll handler, so kmscon wrote 776 error lines in eighty seconds on a board where the GPU enumerates before the display controller.

State machine for a VT220 terminal emulator, with no rendering or input
handling of its own. kmscon builds on it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
@openwrt openwrt Bot added the add package Introduces a new package Makefile build script label Sep 24, 2026
A system without a framebuffer console has no text console at all.
kmscon draws a terminal straight onto a DRM device, through OpenGL ES
where the GPU allows and in software on the same device otherwise.

Device access goes through libseat, so the seat owns the drm device and
the vt rather than kmscon reaching for both itself. That needs seatd,
which is a small daemon and already starts before this service. Built
without the fbdev backend and with the built-in PC screen font, so it
needs neither pango nor freetype. The service is off until enabled, so
it does not take the display from whatever else is using it.

Two patches are carried. The first keeps the unifont generator, a
native helper linked against zlib for the build machine, out of a build
that has the unifont backend disabled, which otherwise breaks cross
compilation. The second stops an error loop: a render-only drm node
answers NULL to drmModeGetResources, which the hotplug path treated as
an error and returned from the poll handler, so kmscon wrote 776 error
lines in eighty seconds on a board where the GPU enumerates before the
display controller.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
@dangowrt
dangowrt merged commit 605d768 into openwrt:master Sep 26, 2026
14 checks passed
@dangowrt
dangowrt deleted the kmscon branch September 26, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

add package Introduces a new package Makefile build script

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant