Fedora 45 transitions Linux virtual console from fbcon to kmscon
For decades, the Linux virtual console has relied on the kernel fbcon driver to draw the framebuffer, manage fonts, and handle keyboard layout. Starting with Fedora 45, the distribution switches to a userspace utility called kmscon. This change may impact users who interact with the virtual console, though those who never use text-mode interfaces are unlikely to notice any difference. The transition marks a significant shift in how Fedora renders text terminals, moving functionality from the kernel to userspace to enable greater flexibility and modern features.
The legacy fbcon driver has several significant drawbacks that kmscon addresses. Security is a primary concern, as bugs in fbcon can be exploited directly in the kernel, and each crash results in a kernel panic. Font rendering is limited to bitmaps that appear small on high-DPI displays and cannot be resized at runtime, with limited Unicode support. Additionally, fbcon lacks scrolling support due to a CVE, has no native mouse support, and relies on the outdated fbdev interface while GPU drivers now use DRM. Kmscon resolves these issues by using freetype for font rendering, providing basic mouse support through a transparent hardware cursor, and operating directly on the DRM interface.
Users and administrators will notice several practical changes when kmscon becomes the default console. The virtual terminal device shifts from /dev/tty1 to /dev/pts/0, meaning scripts and configurations referencing tty devices must be updated. Kmscon uses the exclusive DRM interface to the GPU, preventing other applications from accessing it unless explicitly released via the kmscon-launch-gui script. Kernel error and warning messages that previously appeared on tty1 can be viewed with dmesg -w or redirected to a dedicated kmscon instance. The setfont command has no effect, as kmscon uses built-in unifont or freetype, and keyboard layout changes require localectl set-keymap rather than loadkeys.
To maintain a fallback console using the legacy fbcon driver, administrators can mask the kmsconvt@tty5 service and enable getty@tty5, allowing Ctrl+Alt+F5 to switch to the traditional console. Default kmscon shortcuts include Ctrl++ and Ctrl+- for zooming, Super++ and Super+- for rotating the terminal, Shift+Arrow keys and mouse wheel for scrolling, and mouse selection with middle-click paste. The console can be switched between virtual terminals with Ctrl+Alt+FX, and restarted with systemctl restart kmsconvt@ttyX. The current VT number is available via echo $XDG_VTNR.
Kmscon is split into multiple subpackages, allowing a minimal installation without graphic or font dependencies for servers, with optional packages for enhanced features. The main kmscon package includes the unifont font for good Unicode support without additional dependencies. The kmscon-freetype package uses the freetype library for font rendering, while kmscon-pango (deprecated in favor of freetype) uses the pango library. For performance, the kmscon-gl OpenGL renderer is available but requires adding hwaccel to the configuration file. The configuration file located at /etc/kmscon/kmscon.conf can be customized by copying the example file and adjusting options such as font-engine, font-name, font-size, multi-monitor settings, DPMS timeout, mouse support, and color palette.
The Fedora Magazine article concludes by encouraging users to experiment with kmscon, whether occasionally or as a main session for specific use cases. Those encountering bugs or wishing to contribute can visit the upstream repository at github.com/kmscon/kmscon. The transition to kmscon in Fedora 45 represents a modernization of the Linux virtual console, trading the limitations of the kernel fbcon driver for a more flexible, feature-rich userspace solution while maintaining backward compatibility options for those who need the traditional console experience.