LinuxCommandLibrary

kmscon

TLDR

Start kmscon on the first available TTY

$ sudo kmscon
copy

Start kmscon in a specific TTY
$ sudo kmscon --vt [/dev/ttyX|ttyX|X]
copy

Enable mouse support
$ sudo kmscon --mouse
copy

Specify the command to use for login
$ sudo kmscon [[-l|--login]] [command]
copy

SYNOPSIS

kmscon [OPTION...] [KEYMAP]

PARAMETERS

-h, --help
    Print short help text and exit

-V, --version
    Print version information and exit

-l, --log=LEVEL
    Set log level (error|warning|info|debug)

-p, --path=PATH
    Add library search path

--vt[=VT], --virtual-terminal[=VT]
    Use virtual terminal VT (default: auto)

--no-switchvt
    Do not switch to the virtual terminal

--seat[=SEAT]
    Use specified seat (default: seat0)

--screen-width=WIDTH, --sw=WIDTH
    Force screen width in pixels

--screen-height=HEIGHT, --sh=HEIGHT
    Force screen height in pixels

--screen-dpi=DPI, --dpi=DPI
    Set screen DPI

--screen-rotate=ROTATION
    Rotate screen: 0|90|180|270

--font-engine=ENGINE
    Font engine: pango|fontconfig|unifont

--font-size=SIZE, --fs=SIZE
    Set font size in points

--font-size-relative=SIZE, --fsr=SIZE
    Relative font size adjustment

--force-font-size[=SIZE]
    Force specific font size

--xkb-rules=RULES
    XKB rules file

--xkb-model=MODEL
    XKB keyboard model

--xkb-layout=LAYOUT
    XKB layout (e.g., us)

--xkb-variant=VARIANT
    XKB layout variant

--xkb-options=OPTIONS
    XKB options string

--keymap=KEYMAP
    Load console keymap file

--login[=SHELL]
    Spawn login shell (default: /bin/login)

--no-login
    Disable automatic login spawning

--daemonize
    Daemonize process

--pid-file=PATH
    PID file path

--no-daemonize
    Disable daemonizing

--vt-trigger
    Enable VT switching key bindings

--unicode-exclude=CHARS
    Exclude Unicode codepoints

--allow-software-rendering
    Fallback to software rendering

DESCRIPTION

kmscon is a userspace implementation of a terminal emulator for Linux consoles, leveraging the kernel's Kernel Mode Setting (KMS) and Direct Rendering Manager (DRM) for hardware-accelerated rendering. It replaces the standard framebuffer console (fbcon) with smooth, flicker-free text output, FreeType-based font rendering, full Unicode support, bidirectional text, and complex script handling via Pango or Fontconfig.

Designed for early boot (e.g., initramfs) and multi-user environments, kmscon supports XKB keyboard layouts, hardware cursors, VT switching, screen rotation, DPI scaling, and multi-seat via systemd-logind. It can spawn login shells, run as a daemon managing multiple VTs, or operate standalone.

Unlike software-rendered terminals like fbterm, kmscon uses GPU acceleration for low latency. Configuration is via command-line options; no config files needed. Ideal for systems without X11/Wayland, providing a modern console experience.

CAVEATS

Requires kernel DRM/KMS drivers; no active maintenance since ~2016; potential issues with modern kernels/systemd; use systemd-vconsole-setup as alternative.

FONT RENDERING

Pango engine preferred for best Unicode/bidi support; scales glyphs smoothly with subpixel antialiasing.

MULTI-SEAT

Integrates with logind for independent GPU/keyboard per seat; auto-detects hardware.

KEYMAP ARGUMENT

Optional trailing argument loads legacy console keymap (e.g., us.kmap.gz); overrides XKB.

HISTORY

Initiated ~2011 by David Herrmann and contributors as a modern fbcon replacement. First stable release v1 in 2013; peaked at v8 (2014). Aimed at initramfs/multi-seat use but development halted ~2016 due to upstream integration challenges.

SEE ALSO

agetty(8), getty(8), fbcon(4), drm(4), fbterm(1), console-setup(5)

Copied to clipboard