I wonder if you could have the kmscons code check for the error (from the selinux blockage) and report it without burning 100% CPU?
Can that be fixed? Is it possible to do something like multiplex the device to allow multiple ones at once?
Changing the way drm master works in the kernel will break all userspace that rely on it. And if you allow 2 applications to draw frames at the same time, which one should the GPU display?
I don’t think it can be solved from the kernel side, without changing all userspace that uses graphics too.
I feel it’s much easier to make startx or equivalent to start a systemd service on another tty, and that solve the issue easily.
Can we get something like TERM_SESSION_TYPE=kms supported in KMSCON? That would also be useful for the Wayland-based terminals eventually, too.
Yes, it’s also possible to fix that 100%CPU from kmscon.
If you can try the following patch:
Yes, this is something I’m working on.
you can run kmscon with –term=kmscon, to specify a $TERM variable.
The problem is that by default, kmscon starts agetty, which erase the $TERM variable with vt102.
In my tests, I was not able to override this agetty behavior.
But I’m also in favor of having $TERM=kmscon (and not xterm-256color which is the default in kmscon).
That’s why I suggested a new variable rather than using $TERM.
anyone else been able to launch a wayland compositor with kmscon-launch-gui reliably?
for me it only worked one time, and i haven’t been able to do it again since even with reboots.
i managed to save a log from that successfull launch:
log success - kmscon-launch-gui weston
Date: 2025-11-15 -03
[16:22:14.503] weston 14.0.2
https://wayland.freedesktop.org
Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
Build: 14.0.2
[16:22:14.503] Command line: weston
[16:22:14.503] OS: Linux, 6.17.7-300.fc43.x86_64, #1 SMP PREEMPT_DYNAMIC Sun Nov 2 15:30:09 UTC 2025, x86_64
[16:22:14.503] Flight recorder: enabled
[16:22:14.503] Starting with no config file.
[16:22:14.503] Output repaint window is 7 ms maximum.
[16:22:14.503] Loading module '/usr/lib64/libweston-14/drm-backend.so'
[16:22:14.504] initializing drm backend
[16:22:14.504] Trying libseat launcher...
[16:22:14.504] [libseat/backend/seatd.c:64] Could not connect to socket /run/seatd.sock: No such file or directory
[16:22:14.504] [libseat/libseat.c:76] Backend 'seatd' failed to open seat, skipping
[16:22:14.505] [libseat/libseat.c:73] Seat opened with backend 'logind'
[16:22:14.505] libseat: session control granted
[16:22:14.506] using /dev/dri/card2
[16:22:14.506] DRM: supports atomic modesetting
[16:22:14.506] DRM: supports GBM modifiers
[16:22:14.506] DRM: supports Atomic async page flip
[16:22:14.506] DRM: supports picture aspect ratio
[16:22:14.506] Loading module '/usr/lib64/libweston-14/gl-renderer.so'
[16:22:14.529] Using rendering device: /dev/dri/renderD129
[16:22:14.529] EGL version: 1.5
[16:22:14.529] EGL vendor: NVIDIA
[16:22:14.529] EGL client APIs: OpenGL_ES OpenGL
[16:22:14.529] EGL features:
EGL Wayland extension: no
context priority: yes
buffer age: yes
partial update: yes
swap buffers with damage: yes
configless context: yes
surfaceless context: yes
dmabuf support: modifiers
[16:22:14.581] GL version: OpenGL ES 3.2 NVIDIA 580.105.08
[16:22:14.581] GLSL version: OpenGL ES GLSL ES 3.20
[16:22:14.581] GL vendor: NVIDIA Corporation
[16:22:14.581] GL renderer: NVIDIA GeForce RTX 4070 Ti SUPER/PCIe/SSE2
[16:22:14.582] GL ES 3.2 - renderer features:
read-back format: ARGB8888
glReadPixels supports y-flip: no
glReadPixels supports PBO: yes
wl_shm 10 bpc formats: yes
wl_shm 16 bpc formats: yes
wl_shm half-float formats: no
internal R and RG formats: yes
OES_EGL_image_external: yes
[16:22:14.582] Using GL renderer
[16:22:14.589] event1 - Power Button: is tagged by udev as: Keyboard
[16:22:14.589] event1 - Power Button: device is a keyboard
[16:22:14.589] event9 - Video Bus: is tagged by udev as: Keyboard
[16:22:14.589] event9 - Video Bus: device is a keyboard
[16:22:14.590] event0 - Power Button: is tagged by udev as: Keyboard
[16:22:14.590] event0 - Power Button: device is a keyboard
[16:22:14.590] event13 - HDA NVidia HDMI/DP,pcm=3: is tagged by udev as: Switch
[16:22:14.590] event13 - not using input device '/dev/input/event13'
[16:22:14.591] event14 - HDA NVidia HDMI/DP,pcm=7: is tagged by udev as: Switch
[16:22:14.591] event14 - not using input device '/dev/input/event14'
[16:22:14.591] event15 - HDA NVidia HDMI/DP,pcm=8: is tagged by udev as: Switch
[16:22:14.592] event15 - not using input device '/dev/input/event15'
[16:22:14.592] event16 - HDA NVidia HDMI/DP,pcm=9: is tagged by udev as: Switch
[16:22:14.592] event16 - not using input device '/dev/input/event16'
[16:22:14.593] event3 - Logitech Candy: is tagged by udev as: Keyboard
[16:22:14.593] event3 - Logitech Candy: device is a keyboard
[16:22:14.594] event2 - Logitech G502 X LS: is tagged by udev as: Keyboard Mouse
[16:22:14.594] event2 - Logitech G502 X LS: device is a pointer
[16:22:14.594] event2 - Logitech G502 X LS: device is a keyboard
[16:22:14.595] event7 - Logitech USB Receiver: is tagged by udev as: Mouse
[16:22:14.595] event7 - Logitech USB Receiver: device is a pointer
[16:22:14.596] event8 - Logitech USB Receiver Keyboard: is tagged by udev as: Keyboard
[16:22:14.596] event8 - Logitech USB Receiver Keyboard: device is a keyboard
[16:22:14.596] event6 - Cooler Master ARGB GEN-2: is tagged by udev as: Mouse
[16:22:14.597] event6 - Cooler Master ARGB GEN-2: device is a pointer
[16:22:14.597] event10 - HD-Audio Generic HDMI/DP,pcm=3: is tagged by udev as: Switch
[16:22:14.597] event10 - not using input device '/dev/input/event10'
[16:22:14.598] event11 - HD-Audio Generic HDMI/DP,pcm=7: is tagged by udev as: Switch
[16:22:14.598] event11 - not using input device '/dev/input/event11'
[16:22:14.598] event12 - HD-Audio Generic HDMI/DP,pcm=8: is tagged by udev as: Switch
[16:22:14.598] event12 - not using input device '/dev/input/event12'
[16:22:14.599] event5 - Eee PC WMI hotkeys: is tagged by udev as: Keyboard
[16:22:14.599] event5 - Eee PC WMI hotkeys: device is a keyboard
[16:22:14.599] event4 - PC Speaker: not tagged as supported input device
[16:22:14.599] event4 - not using input device '/dev/input/event4'
[16:22:14.600] event17 - Mouse passthrough: is tagged by udev as: Mouse
[16:22:14.600] event17 - Mouse passthrough: device is a pointer
[16:22:14.600] event18 - Mouse passthrough (absolute): is tagged by udev as: Mouse
[16:22:14.600] event18 - Mouse passthrough (absolute): device is a pointer
[16:22:14.600] event19 - Keyboard passthrough: is tagged by udev as: Keyboard
[16:22:14.600] event19 - Keyboard passthrough: device is a keyboard
[16:22:14.601] event20 - solaar-keyboard: is tagged by udev as: Keyboard Mouse
[16:22:14.601] event20 - solaar-keyboard: emulating high-resolution scroll wheel events.
[16:22:14.601] event20 - solaar-keyboard: device is a pointer
[16:22:14.601] event20 - solaar-keyboard: device is a keyboard
[16:22:14.602] libinput: configuring device "Power Button".
[16:22:14.602] libinput: configuring device "Video Bus".
[16:22:14.602] libinput: configuring device "Power Button".
[16:22:14.602] libinput: configuring device "Logitech Candy".
[16:22:14.602] libinput: configuring device "Logitech G502 X LS".
[16:22:14.602] libinput: configuring device "Logitech USB Receiver".
[16:22:14.602] libinput: configuring device "Logitech USB Receiver Keyboard".
[16:22:14.602] libinput: configuring device "Cooler Master ARGB GEN-2".
[16:22:14.602] libinput: configuring device "Eee PC WMI hotkeys".
[16:22:14.602] libinput: configuring device "Mouse passthrough".
[16:22:14.602] libinput: configuring device "Mouse passthrough (absolute)".
[16:22:14.602] input device event18 has no enabled output associated (none named), skipping calibration for now.
[16:22:14.602] libinput: configuring device "Keyboard passthrough".
[16:22:14.602] libinput: configuring device "solaar-keyboard".
[16:22:14.603] DRM: head 'HDMI-A-2' found, connector 128 is disconnected.
[16:22:14.643] DRM: EDID for the following head fails conformity:
Block 1, CTA-861 Extension Block:
Colorimetry Data Block: Reserved bits MD0-MD3 must be 0.
Block 2, DisplayID Extension Block:
Padding: Contains non-zero bytes.
[16:22:14.643] DRM: head 'DP-3' found, connector 131 is connected, EDID make 'GIGA-BYTE TECHNOLOGY CO., LTD.', model 'M28U', serial '20200B000000'
Supported EOTF modes: SDR, ST2084, HLG
Supported colorimetry modes: default, BT.2020 (YCC), BT.2020 (RGB)
[16:22:14.644] DRM: head 'DP-4' found, connector 135 is disconnected.
[16:22:14.680] DRM: head 'DP-5' found, connector 139 is connected, EDID make 'PNP(AOC)', model '24G2W1G3-', serial 'QQLOAXA000859'
Supported EOTF modes: SDR
Supported colorimetry modes: default
[16:22:14.680] Registered plugin API 'weston_drm_output_api_v1' of size 40
[16:22:14.680] Registered plugin API 'weston_drm_virtual_output_api_v2' of size 48
[16:22:14.680] Color manager: no-op
protocol support: no
[16:22:14.680] Output 'DP-3' attempts EOTF mode SDR and colorimetry mode default.
[16:22:14.680] Output 'DP-3' using color profile: stock sRGB color profile
[16:22:14.680] Chosen EGL config details: id: 24 rgba: 8 8 8 0 buf: 24 dep: 0 stcl: 0 int: 0-1 type: win|pbf vis_id: XRGB8888 (0x34325258)
[16:22:14.680] Output DP-3 (crtc 81) video modes:
3840x2160@60.0, preferred, current, 567.0 MHz
3840x2160@144.0, 1288.6 MHz
3840x2160@119.9, 1186.8 MHz
3840x2160@120.0, 1097.8 MHz
3840x2160@59.9, 593.4 MHz
2560x1440@143.9, 594.9 MHz
2560x1440@119.9, 486.3 MHz
2560x1440@59.9, 235.4 MHz
1920x1080@143.9, 326.6 MHz
1920x1080@119.9, 296.7 MHz
1920x1080@60.0, 148.5 MHz
1920x1080@59.9, 148.3 MHz
1680x1050@60.0, 146.2 MHz
1280x1024@60.0, 108.0 MHz
1440x900@59.9, 106.5 MHz
1280x720@119.9, 148.3 MHz
1280x720@59.9, 74.2 MHz
1024x768@75.0, 78.8 MHz
1024x768@60.0, 65.0 MHz
800x600@75.0, 49.5 MHz
800x600@60.3, 40.0 MHz
720x480@59.9, 27.0 MHz
640x480@75.0, 31.5 MHz
640x480@59.9, 25.2 MHz
[16:22:14.680] associating input device event1 with output DP-3 (none by udev)
[16:22:14.680] associating input device event9 with output DP-3 (none by udev)
[16:22:14.680] associating input device event0 with output DP-3 (none by udev)
[16:22:14.680] associating input device event3 with output DP-3 (none by udev)
[16:22:14.680] associating input device event2 with output DP-3 (none by udev)
[16:22:14.680] associating input device event7 with output DP-3 (none by udev)
[16:22:14.680] associating input device event8 with output DP-3 (none by udev)
[16:22:14.680] associating input device event6 with output DP-3 (none by udev)
[16:22:14.680] associating input device event5 with output DP-3 (none by udev)
[16:22:14.680] associating input device event17 with output DP-3 (none by udev)
[16:22:14.680] associating input device event18 with output DP-3 (none by udev)
[16:22:14.680] associating input device event19 with output DP-3 (none by udev)
[16:22:14.680] associating input device event20 with output DP-3 (none by udev)
[16:22:14.680] Output 'DP-3' enabled with head(s) DP-3
[16:22:14.680] Output 'DP-5' attempts EOTF mode SDR and colorimetry mode default.
[16:22:14.680] Output 'DP-5' using color profile: stock sRGB color profile
[16:22:14.680] Chosen EGL config details: id: 24 rgba: 8 8 8 0 buf: 24 dep: 0 stcl: 0 int: 0-1 type: win|pbf vis_id: XRGB8888 (0x34325258)
[16:22:14.680] Output DP-5 (crtc 62) video modes:
1920x1080@60.0, preferred, current, 148.5 MHz
1920x1080@165.0, 381.0 MHz
1920x1080@144.0, 325.7 MHz
1920x1080@119.9, 296.7 MHz
1920x1080@120.0, 285.5 MHz
1920x1080@59.9, 148.3 MHz
1920x1080@50.0, 148.5 MHz
1280x1024@75.0, 135.0 MHz
1280x1024@60.0, 108.0 MHz
1280x720@59.9, 74.2 MHz
1280x720@50.0, 74.2 MHz
1024x768@120.0, 115.5 MHz
1024x768@100.0, 112.2 MHz
1024x768@75.0, 78.8 MHz
1024x768@70.1, 75.0 MHz
1024x768@60.0, 65.0 MHz
800x600@120.0, 73.2 MHz
800x600@99.7, 67.2 MHz
800x600@75.0, 49.5 MHz
800x600@72.2, 50.0 MHz
800x600@60.3, 40.0 MHz
800x600@56.2, 36.0 MHz
720x576@50.0, 27.0 MHz
720x480@59.9, 27.0 MHz
640x480@119.5, 52.5 MHz
640x480@99.8, 42.5 MHz
640x480@75.0, 31.5 MHz
640x480@72.8, 31.5 MHz
640x480@59.9, 25.2 MHz
[16:22:14.680] Output 'DP-5' enabled with head(s) DP-5
[16:22:14.680] Compositor capabilities:
arbitrary surface rotation: yes
screen capture uses y-flip: yes
cursor planes: yes
arbitrary resolutions: no
view mask clipping: yes
explicit sync: yes
color operations: no
presentation clock: CLOCK_MONOTONIC, id 1
presentation clock resolution: 0.000000001 s
[16:22:14.680] Loading module '/usr/lib64/weston/desktop-shell.so'
[16:22:14.681] launching '/usr/libexec/weston-keyboard'
[16:22:14.681] launching '/usr/libexec/weston-desktop-shell'
could not load cursor 'dnd-copy'
could not load cursor 'dnd-none'
could not load cursor 'dnd-copy'
could not load cursor 'dnd-none'
could not load cursor 'dnd-copy'
could not load cursor 'dnd-none'
Unknown parameter: ?2004
Unknown parameter: ?2004
[16:22:21.487] caught signal 15
[16:22:21.488] event1 - Power Button: device removed
[16:22:21.489] event9 - Video Bus: device removed
[16:22:21.489] event0 - Power Button: device removed
[16:22:21.489] event3 - Logitech Candy: device removed
[16:22:21.489] event2 - Logitech G502 X LS: device removed
[16:22:21.489] event7 - Logitech USB Receiver: device removed
[16:22:21.490] event8 - Logitech USB Receiver Keyboard: device removed
[16:22:21.490] event6 - Cooler Master ARGB GEN-2: device removed
[16:22:21.490] event5 - Eee PC WMI hotkeys: device removed
[16:22:21.490] event17 - Mouse passthrough: device removed
[16:22:21.490] event18 - Mouse passthrough (absolute): device removed
[16:22:21.490] event19 - Keyboard passthrough: device removed
[16:22:21.491] event20 - solaar-keyboard: device removed
[16:22:21.491] destroying output DP-3 (id 0) with a pending flip, but as we are shutting down we can't wait to destroy it when the flip completes... destroying it now
and here is what it looks like when it fails
log fail - kmscon-launch-gui weston
Date: 2025-11-15 -03
[16:15:10.899] weston 14.0.2
https://wayland.freedesktop.org
Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
Build: 14.0.2
[16:15:10.899] Command line: weston
[16:15:10.899] OS: Linux, 6.17.7-300.fc43.x86_64, #1 SMP PREEMPT_DYNAMIC Sun Nov 2 15:30:09 UTC 2025, x86_64
[16:15:10.899] Flight recorder: enabled
[16:15:10.899] Starting with no config file.
[16:15:10.899] Output repaint window is 7 ms maximum.
[16:15:10.899] Loading module '/usr/lib64/libweston-14/drm-backend.so'
[16:15:10.899] initializing drm backend
[16:15:10.899] Trying libseat launcher...
[16:15:10.899] [libseat/backend/seatd.c:64] Could not connect to socket /run/seatd.sock: No such file or directory
[16:15:10.899] [libseat/libseat.c:76] Backend 'seatd' failed to open seat, skipping
[16:15:10.899] [libseat/libseat.c:76] Backend 'logind' failed to open seat, skipping
[16:15:10.899] [libseat/libseat.c:79] No backend was able to open a seat
[16:15:10.899] libseat: could not open seat
[16:15:10.899] fatal: your system should either provide the logind D-Bus API, or use seatd.
[16:15:10.899] fatal: failed to create compositor backend
Internal warning: debug scope 'drm-backend' has not been destroyed.
Thanks for the logs.
The problem is about seat management with logind. I will check but maybe kmscon needs also to “release” the seat0 with kmscon-launch-gui.
There is a typo in the original post. autvt@.service should be autovt@.service.
I’m not able to get a custom message to display after the user has signed out when using kmscon.
The following works with the current system:
Contents of /etc/systemd/system/getty@.service.d/override.conf:
[Service]
TTYReset=no
TTYVHangup=no
TTYVTDisallocate=no
Add one line to the end of the session stack in /etc/pam.d/login:
echo '-session optional pam_exec.so /etc/security/notice' >> /etc/pam.d/login
Contents of /etc/security/notice for purpose of demonstration:
#!/usr/bin/sh
test "$PAM_TYPE" == "close_session" || exit 0
exec &>"$PAM_TTY"
export TERM="linux" # needed for the clear command
clear
echo All your base are belong to us.
Mark /etc/security/notice as executable and set the needed SELinux security context.
chmod +x /etc/security/notice
chcon -t bin_t /etc/security/notice
Don’t forget to reload systemd and, if necessary, respawn agetty.
systemctl daemon-reload
kill <pid-of-old-agetty-process>
I cannot get something equivalent to work with kmscon. It seems that it always clears all the text from the terminal when the user signs out, so there is no way to leave a status message.
I use this because I keep my home directory on an encrypted set of USB thumb drives that I carry with me. When I sign out from my workstation, I need to display a status message that my home directory has been successfully unmounted and exported so I know that it is safe to pull my USB drives from the system (I use ZFS).
Thanks.
Thanks I fixed the typo in the wiki page.
For the message after you log out, I’m a bit skeptical about the use case.
Yes kmscon make sure to clear the screen when you log out. The fact that fbcon doesn’t is concerning, that means it can leak sensitive data.
Maybe one way to achieve what you want is to restart kmscon, but with a dummy login program to launch, that will just display your message (and keep running for a minute).
kmscon -–login /etc/security/notice
Hmm, that would prevent someone from being able to sign back into the system (on that console) until the message timeout expired, but I guess it would be workable for my use. Alternatively, I might be able to just pause my logout script for a bit. I preferred the old behavior of being able to leave a permanent message on the screen on logout. Setting a timer means that the user has to be actively waiting and watching for the message before it disappears. It doesn’t seem like a good UX.
I followed the steps shown here: F44 Change Proposal: UseKmsconVTConsole [SystemWide] - #8 by jfalempe
Attempt to start labwc shows several error messages (libseat.c) about seat and backend. From this thread (which I’m not fully up to speed with) these errors appear familiar. I also saw message about patch but not sure how to apply that.
I also have heard my cpu fan rev in ways that it only does under high load so I have no doubt that it’s the same cpu usage described here.
With regards to the seat issue and running (e.g. wayland) desktop environments from command prompt, I think that systemd-logind needs notification to transfer the seat from kmscon. I think that display managers generally handle this, so however dms handle this is probably what is needed (relates to drm specifically? e.g. unlike agetty?). I’m still learning about these intricacies, so I am only sharing what I can surmise based on searching, and pardon if I’m not providing any new/helpful information.
Also interesting is that I can have two wayland sessions running simultaneosuly on separate ttys and can switch between them using Ctrl+Alt+F#. So the seat is coordinated somehow by that mechanism (systemd-logind notified by kernel?).
Happy to keep testing, e.g. if any updates or further recommendations.
I have just updated the kmscon package on my copr repository, with a fix to the “100%CPU seat” error. It also has better mouse support.
(The new version is kmscon 9.1.0^3.git85397b6c)
Regarding seats management, in most cases, you have only seat0. But when you switch VT using ctrl+alt+Fx, it uses the VT mechanism to transfer the gpu ownership to another session.
With Gnome it works well, but with sway/sddm, there are some issue the way seats and VT switching are handled, and I will need to look into that.
kmscon.x86_64 9.1.0^4.git9962f135-1.fc43 showing as available in the copr.
Yes, kmscon.x86_64 9.1.0^4.git9962f135-1.fc43 is the latest version, there is an additional fix, (on some setup, the mouse pointer was stuck at the top left corner).
Can we instead use something similar to fakekmscon, which is a barebones minimal wayland compositor with a barebones minimal terminal emulator?
I’m also doing that in parallel, so you will have the choice, if you prefer cage+foot, you will be able to install it and use that instead of kmscon:
The reason I choose kmscon in this change proposal, is that it has less dependencies, and it will have less friction to be installed also on servers.
Agree.
This is unrelated, but I have a small doubt: How do all this work without VTs enabled? OR if all devices are on some nonzero seat?