This change is to replace the kernel console fbcon with the userspace console kmscon in Fedora, to provide an enhanced and more secure console for Fedora users.
The long term goal is also to deprecate fbcon/fbdev emulation in the kernel, and this is the first step in this direction.
fbcon is a terminal emulator in the kernel, which is not well maintained (it lost scrolling support a few years ago due to a CVE), and requires a fbdev emulation layer in the kernel, as all GPU drivers are using the newer drm interface. It still requires userspace executable like getty and bash to be useful.
kmscon is a simple terminal emulator based on linux kernel mode setting (KMS). It can replace fbcon for VT console, and provide better keyboard support, and better security.
This change will do the following: Install kmscon by default, and update the symbolic link /usr/lib/systemd/system/autovt@.service to point to kmsconvt@.service, to start kmscon by default when switching VT. kmscon should be the default also on non-graphical installation, as it doesn't require any graphic library (only libdrm, to access the framebuffer).
This change won't affect the installation, the boot process (like encryption password fallback), as fbcon will still be compiled in the kernel. User can still revert to fbcon if they want, or if kmscon has issue on their setup. If kmscon fails to launch, it will fallback to getty/fbcon.
Currently kmscon depends on opengl/mesa, because it has an optional opengl backend. But we don't want that on non-graphical server installation. I will split the package in two, having something like kmscon and kmscon-gl for the optional gl renderer.
kmscon is more configurable, and has more features than fbcon:
By the time Fedora 44 is released, it may also have these additional features:
Do you require 'QA Blueprint' support? Y/N
kmscon is available in the Fedora repository, but if you want to test the latest version with mouse support, rotation support, and kmscon-launch-gui, then use this copr instead, it has builds for F41 to F44 rawhide:
sudo dnf copr enable jfalempe/kmscon
Install kmscon with:
sudo dnf install kmscon kmscon-freetype
If you want to test the opengl version also install the gl plugins:
sudo dnf install kmscon-gl
then make it the default VT with:
sudo ln -s /usr/lib/systemd/system/kmsconvt@.service /etc/systemd/system/autovt@.service
You can edit the file /etc/kmscon/kmscon.conf, to customize kmscon.
Then restart the service with:
sudo systemctl restart kmsconvt@tty3
Press Ctrl+alt+F3 to switch to the VT console.
Login and check if it's running kmscon with ps aux | grep tty3.
You should see a kmscon process, like this:
bash root 52095 0.0 0.0 115180 16868 ? Ssl 17:37 0:00 /usr/libexec/kmscon/kmscon --vt=tty3 --seats=seat0 --no-switchvt --login -- /sbin/agetty -o -p -- \u --noclear -- -
Check that you can scroll back with page up/page down.
Check that you can increase the font size with "ctrl +" and decrease with "ctrl -"
Check that your terminal applications like top, nano, vi, ... work as expected.
No dependencies.
It should be easy to revert, just not install kmscon, and fbcon with getty service will be the default.
kmscon is a bit different than fbcon, so some applications will not work on it.
Tools that configure the kernel font/keyboard layout won't work: setfont, loadkeys, ...
Instead you can configure the font/keyboard settings in /etc/kmscon/kmscon.conf, (by default kmscon will use the keyboard config from localectl)
Tools that override tty to add mouse support won't work too: gpm, consolation
Mouse support is now built-in kmscon main git branch.
Starting a graphic application from kmscon also won't work directly, you need to use the kmscon-launch-gui script. (so for things like startx or startplasma).
You can configure kmscon to your taste, by editing the file /etc/kmscon/kmscon.conf
Execute man kmscon.conf to see all option available.