Bug 2429626 - systemd presets request - kmsconvt
Summary: systemd presets request - kmsconvt
Keywords:
Status: MODIFIED
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-release
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Zbigniew Jędrzejewski-Szmek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-01-14 16:45 UTC by Jocelyn Falempe
Modified: 2026-05-07 15:24 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jocelyn Falempe 2026-01-14 16:45:45 UTC
* Does the service require post-rpm-installation configuration in order to be useful (for example, does it need manual edits to a configuration file)?

No

* Does the service listen on a network socket for connections originating on a separate physical or virtual machine?

No

* Is the service non-persistent (i.e. run once at startup and exit)?

No

* What is the exact name (or names) of the systemd unit files to be enabled?

The kmscon service should replace agetty on all tty. The recommended way is to link autovt to kmsconvt, like this:
sudo ln -s /usr/lib/systemd/system/kmsconvt@.service /etc/systemd/system/autovt@.service

* Is this request for all Fedora deliverables or only for some Editions (list them)?

Yes, this request is for all Fedora deliverables, as they all have VT.

Comment 1 Stephen Gallagher 2026-01-19 19:01:50 UTC
(In reply to Jocelyn Falempe from comment #0)
> * What is the exact name (or names) of the systemd unit files to be enabled?
> 
> The kmscon service should replace agetty on all tty. The recommended way is
> to link autovt to kmsconvt, like this:
> sudo ln -s /usr/lib/systemd/system/kmsconvt@.service
> /etc/systemd/system/autovt@.service

This doesn't really make sense. What you're suggesting here is that the `ksmconvt@.service` should PRETEND to be the `autovt@.service`. First of all, that's not something that can be done with a preset, so far as I know. Secondly, that would be violating the user's trust. If they have `autovt@.service` enabled, *that is what they expect will be running*.

Is this your way of trying to "upgrade" the users to `kmsconvt@.service`? If so, it's not the right way to go about it. Also, is it safe (and desirable) to migrate all users to the new service, or might some users want to remain on `autovt@.service` for any reason?

Can both services be enabled at the same time on one system, or will they conflict? If they conflict, what happens? Does the first one to start "own" the virtual terminals? Does it become impossible to bring up a VT at all?

I think this needs more thought before we enable it by default.

Comment 2 Jocelyn Falempe 2026-01-20 08:04:05 UTC
Thanks for looking into this.

The goal is to disable fbcon/fbdev in the kernel, so the userspace has to be ready before that.

You're right, the link in /etc is for user configuration. But on a default Fedora installation,
there is already a link /usr/lib/systemd/system/autovt@.service which points to getty@.service

ll /usr/lib/systemd/system/autovt@.service
lrwxrwxrwx@ - root 13 oct.   2025 /usr/lib/systemd/system/autovt@.service -> getty@.service

So is it possible to change this link to point to kmsconvt instead?

There is a fallback to getty in kmsconvt service:

Before=getty.target
Conflicts=getty@%i.service
OnFailure=getty@%i.service

So normally, if kmsconvt doesn't start on some configuration, getty should take the VT.
That happens when I develop kmscon, and it segfaults, I always get a getty on the same VT a few seconds later.

If some users want to go back to getty/fbcon, it should be possible to override this with a link in /etc/systemd/system/autovt@.service. This should be properly documented in the F44 release note.

The cases where we don't want kmscon for F44 (but we will need to support, before disabling fbcon) are:
- disk encryption password (if not using plymouth).
- early ramdisk failure.
- installation ISO. (I should check with anaconda team first, if the text install works in kmscon).

Comment 3 Jocelyn Falempe 2026-01-23 11:43:42 UTC
Looking a bit more, the link /usr/lib/systemd/system/autovt@.service belongs to the systemd package.

So what can be possible is to make systemd depends on kmscon, and change the link in the systemd package?

Comment 4 Zbigniew Jędrzejewski-Szmek 2026-01-23 13:22:10 UTC
autovt@.service is a symlink because it is an alias. It is a static symlink because until now there was no reason to ever change it. What we want to do is
1. change the systemd unit to use [Install]Alias= instead of the static symlink
2. change kmsconvt@.service to have the same [Install] section
3. add a preset to disable getty@.service and a preset to enable kmsconvt@.service

https://github.com/systemd/systemd/pull/40440 for the first item.

Comment 5 Jocelyn Falempe 2026-01-23 22:03:11 UTC
Thanks a lot, that's much better than what I proposed.

Comment 6 Jocelyn Falempe 2026-01-27 13:42:19 UTC
So, in order to be on-time for the F44 schedule, I will submit a new version of kmscon package with https://github.com/kmscon/kmscon/pull/245 included.
I think we also need a systemd package update with https://github.com/systemd/systemd/pull/40440 ?
And then adding the preset.

if I understand correctly the F44 schedule, it should be done by February 3, which is next week ?

Comment 7 Zbigniew Jędrzejewski-Szmek 2026-01-27 14:37:44 UTC
https://src.fedoraproject.org/rpms/fedora-release/pull-request/395

Comment 8 Fedora Update System 2026-01-27 17:45:18 UTC
FEDORA-2026-0b2b8265d2 (fedora-release-44-0.12) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-0b2b8265d2

Comment 9 Jocelyn Falempe 2026-02-03 08:59:48 UTC
This update breaks on non-graphical setup, it looks like neither agetty nor kmscon is started on the tty.

Maybe it's because I put kmscon as "default" in https://pagure.io/fork/jfalempe/fedora-comps/c/294d8e2a05e35010cb365dfe7a76061136d8ad8a and I should put "mandatory" ?

Comment 10 Zbigniew Jędrzejewski-Szmek 2026-02-03 11:32:36 UTC
I don't think that is the cause, because there was already a problem with the systemd update that changed to use [Install] for getty@.service. (That update predated the fedora-release changes.)  I'm looking into it, but didn't figure it out yet. (I was at FOSDEM, so I didn't have any time to do anything properly.)

Comment 11 Jocelyn Falempe 2026-02-09 15:15:37 UTC
I'm wondering how to move forward on this topic.

Should I add something like this in systemd.spec, but that looks a bit hacky:

%install
%meson_install
ln -fs kmsconvt@.service %{buildroot}/usr/lib/systemd/system/autovt@.service

On the other hand, I can't overwrite this link in kmscon package, as it will be reset each time systemd is updated?

Comment 12 Zbigniew Jędrzejewski-Szmek 2026-03-04 14:21:10 UTC
I think the problems in systemd have been fixed. The latest updates use presets for getty@.service.

So we should try to reintroduce the changes to switch to kmsconvt@.service again.

Comment 13 Jocelyn Falempe 2026-03-10 09:44:25 UTC
Yes, we can try to enable it again, but I think there are still issues with autovt and kmscon.

For getty, it's not a problem if it's started on the same tty as a DE, because it will disable itself if it's not drm master, and won't prevent a DE to be started.

But for kmscon, it will fail to start if it can't take the drm master, and it will prevent any application to become drm master on the same tty.

I think that autovt was made to avoid wasting resources by not starting getty on tty that are not active, but may lack feature to avoid conflicts between kmscon and DE?

Comment 14 Zbigniew Jędrzejewski-Szmek 2026-03-10 14:33:46 UTC
In general systemd will start getty@.service in two cases:
- upon switch to a virtual console that was previously idle
- unconditionally for a fixed number of vts.

IIRC, this unconditional starting is done so that something is displayed on the console in all cases. If it was blank, this could be confusing to users.

Systemd doesn't do anything to avoid confict… It's possible that some changes are needed here to work properly with kmscon. It'd probably be better to discuss this upstream if so.

Comment 15 Jocelyn Falempe 2026-03-11 16:34:33 UTC
Ok, thanks for the details.

I've made more testing with the F44 kde installer image that has the preset enabled, and had issues.

The problem is that kmscon is started on tty1, and prevent kwin/installer to run.
after a while kmscon got somewhat killed and the installer finally appear.

On the installed system, it works fine.

So a simple solution would be to mask kmsconvt@tty1 on the installer?

Comment 16 Jocelyn Falempe 2026-03-13 08:23:17 UTC
After more tests, sometime kmscon can run on the same tty as gdm, or sddm, leading to strange things.
But I didn't find a reliable way to reproduce it.
I also found that most desktop environment systemd services have getty@tty1 hardcoded in them

eg: gdm
https://github.com/GNOME/gdm/blob/main/data/gdm.service.in

sddm:
https://github.com/sddm/sddm/blob/develop/services/sddm.service.in

So they both Conflicts with getty

Should we patch all this services, and add Conflicts:kmsconvt and After:kmsconvt too ?

Or maybe this can be done in kmsconvt@service using Conflicts: and Before: with every login manager available.

Or should I open an issue in upstream systemd to have something more generic like Conflicts:any_tty ?

So if there is another thing like kmscon in the future, we won't need to add it to every DE service ?

Comment 17 Jocelyn Falempe 2026-03-13 09:19:54 UTC
I opened this issue on systemd upstream: https://github.com/systemd/systemd/issues/41087

Comment 18 Jocelyn Falempe 2026-04-07 08:46:43 UTC
I've pushed this 3 PR, that should solve the conflicts with kmsconvt.

https://src.fedoraproject.org/rpms/gdm/pull-request/42
https://src.fedoraproject.org/rpms/plasma-login-manager/pull-request/1
https://src.fedoraproject.org/rpms/sddm/pull-request/13

So when they are merged we can make another try?

Comment 19 Jocelyn Falempe 2026-05-07 14:19:40 UTC
The 3 PR are now merged, so we can try again to enable the preset.

Comment 20 Jocelyn Falempe 2026-05-07 15:24:46 UTC
I opened the following PR:

https://src.fedoraproject.org/rpms/redhat-systemd-presets/pull-request/3

presets have moved to redhat-systemd-presets.


Note You need to log in before you can comment on or make changes to this bug.