kmscon: Try the Userspace Virtual Console on Fedora
Fedora 45 moves its text consoles from the kernel fbcon driver to kmscon. Learn what changes, how to install the packages and how to check your setup.
Contents
kmscon is a virtual console that runs in userspace. According to Fedora Magazine, starting with Fedora 45 it takes over the default text consoles from fbcon, the console driver inside the kernel. This article explains what changes for you and how to install and inspect kmscon on a Fedora system.
What kmscon replaces
fbcon draws the framebuffer, handles fonts and applies the keyboard layout for the Linux virtual console, all inside the kernel. kmscon does those jobs in a normal userspace program built on kernel mode setting (KMS). The upstream project describes itself as a replacement for the in-kernel VT implementation.
Why Fedora is moving
The Fedora Magazine article lists these reasons:
- Security: a bug in fbcon runs in kernel space, so a crash is a kernel panic.
- Keyboard layouts: kernel layouts differ from userspace ones, so the installer has to pick the closest match.
- Fonts: fbcon offers only small bitmap fonts that cannot be resized at runtime, with limited Unicode support. kmscon can use FreeType.
- Scrolling and mouse: fbcon no longer supports scrolling because of a CVE and has no native mouse support. kmscon has basic mouse support.
- Kernel cleanup: without fbcon, the fbdev emulation layer could be removed, since GPU drivers now use DRM.
Install and check the packages
The article describes four packages. kmscon is the main one and bundles the unifont font. kmscon-freetype renders with FreeType, kmscon-pango renders with Pango (deprecated in favor of FreeType), and kmscon-gl is an OpenGL renderer that needs hwaccel set in the configuration file.
The article does not spell out an install command for kmscon, so the one below is the standard dnf form using the package name it gives.
dnf install -y kmscon kmscon-freetype
rpm -q kmscon kmscon-freetypeFor nicer fonts, the article suggests installing the Cascadia font family:
dnf install -y cascadia-fonts-allCheck which console you are on
Console switching is the same as before: Ctrl+Alt+F3 opens tty3, for example. The following commands only make sense on a real Fedora 45 machine with a text console, so they are not run in the test container.
echo $XDG_VTNR
tty
journalctl -u 'kmsconvt*'
sudo systemctl restart kmsconvt@tty3Because kmscon uses pseudo-terminals, tty prints something like /dev/pts/0 rather than /dev/tty1. Scripts that depend on the old device name need updating.
Configure fonts, monitors and mouse
The configuration file is /etc/kmscon/kmscon.conf. The article says to create it from the shipped example:
sudo cp /etc/kmscon/kmscon.conf.example /etc/kmscon/kmscon.confOptions the article highlights:
font-engine:freetype(default when available),unifont,pangoorpsf.font-nameandfont-size: pick a font installed under/usr/share/fonts(usefc-listto find names) and its pixel height.multi-monitor:scaled(default),cloneorlargest.dpms-timeout: seconds before the monitor turns off; default 600, 0 disables it.no-mouse: turns off mouse support, which can help with touchpads on some laptops.verbose: more logging for troubleshooting.
Things that behave differently
setfontandloadkeysno longer have an effect. Use the font options above, and set the layout withlocalectl set-keymap, which manages the layout instead.- kmscon holds the exclusive DRM interface. To start a graphical session, use the
kmscon-launch-guiwrapper, for examplekmscon-launch-gui startx. - Kernel messages appear on tty1 by default. Read them with
dmesg -w.
Keep one tty on fbcon
If you want a fallback, the article shows how to mask kmscon on one tty and enable a classic getty there:
sudo systemctl mask kmsconvt@tty5 && sudo systemctl enable --now getty@tty5This keeps tty5 on the classic in-kernel console as a fallback, while the other virtual consoles use kmscon.
Known limitations
The article says that in Fedora 45 the boot-time LUKS prompt and the rescue console still use the old path, with kmscon planned for them in Fedora 46. Early-boot kernel messages also do not go through kmscon yet.
For disk checks from a console, see Check disk usage on Linux with df, du and ncdu.
Sources
This article was drafted with AI assistance, fact-checked against the sources listed above and reviewed by a human editor before publication. Spotted an error? See our corrections policy.