You are not logged in.

#1 2024-03-05 23:58:39

Breizh
Member
From: France
Registered: 2018-06-11
Posts: 6
Website

Force sd-vconsole to run after KMS

Hello,

I use a systemd initramfs on my computer since I need to decrypt two disk at boot. I’m using early KMS via the kms hook, and a custom font via sd-vconsole. But since KMS is applied after the sd-vconsole, it reset the font (when I’m typing my passphrase). Later in the boot, sd-vconsole will set the custom font again.

I tried to remove the KMS hook to get late KMS, but then it’s even worse: I have the correct font to type my passphrase, but systemd-vconsole-setup is started before the late KMS, and then the font of my TTYs is the wrong one…

I could set it again after the late KMS, but I'd rather tell systemd-vconsole-setup to run *after* the KMS initialization is done, either on the system (late kms) or ideally in the initramfs (early kms).

Any idea how this could be configured? I thought about adding a delay in the service start, but it looks like a bad idea...

Last edited by Breizh (2024-03-05 23:58:48)

Offline

#2 2024-03-13 09:24:38

gcb
Member
Registered: 2014-02-12
Posts: 128

Re: Force sd-vconsole to run after KMS

I've spent countless hours on this, and in the end, I believe there are bugs in the sd-encrypt hook.

It tries to reset the terminal using the default font. So it doesn't matter the order, it will screw things up as soon as you call sd-encrypt and it wants to show a password prompt. I could not find a way around this and gave up when looking at that module code.

the order of hooks will just affect how it will screw things up. But things will be screwed always.

Also, i don't think you ever need the actual kms hook with new hardware. https://wiki.archlinux.org/title/Kernel … _KMS_start

my current setup have:

HOOKS=(systemd keyboard sd-vconsole autodetect modconf block sd-encrypt microcode lvm2 filesystems fsck)

and the glitch i get is: boot > correct font/rez > botched resolution (text shows in a small rectangle in the center of the screen, default font shows again) > password prompt > correct font/rez.

depending on your hardware you might need autodetect and modconf earlier than sd-vconsole. But it won't change the glitch.

Last edited by gcb (2024-03-13 09:36:43)

Offline

Board footer

Powered by FluxBB