You are not logged in.

#1 2025-12-20 04:43:07

scott_fakename
Member
Registered: 2012-08-15
Posts: 129

Ideas on how to trigger systemd-vconsole-setup.service after nvidia

Recently, the hack I've been using to make my virtual consoles stay looking nice with nvidia stopped working. I had been using nvidia_drm.fbdev=0 to disable the nvidia framebuffer, just relying on simpledrm, so my virtual terminals kept looking nice after the systemd-vconsole hook went off in initramfs.

Recently that hack stopped working, so I had to remove it from my kernel command line. Now, when I boot up, after it mounts my real root but before it switchroots into it, it loads the nvidia drivers which then reset the display, and then my terminal font gets reset and my console looks riddiculous.

The *proper* fix would be to include the nvidia drivers in the MODULES section of mkinitcpio.conf so that it can load the nvidia drivers before the systemd-vconsole hook goes off, but my boot partition is too small so if I include them I won't be able to make all four of my initramfses (linux, linux-fallback, linux-lts, linux-lts-fallback)...

If I manually run:

sudo systemctl restart systemd-vconsole-setup

... Then the consoles all become normal again, Which is promising but I'm trying to think of a way to make it re-start that unit (or make a new unit that runs /usr/lib/systemd/systemd-vconsole-setup) after the display is reset.

I tried creating a new unit like this:

[Unit]
Description=Redo Virtual Console Setup
Documentation=man:systemd-vconsole-setup.service(8) man:vconsole.conf(5)

Before=multi-user.target

[Install]
WantedBy=multi-user.target

Service]
Type=oneshot
ExecStart=/usr/lib/systemd/systemd-vconsole-setup

... But it didn't work; systemd is too smart at building the dependency graph and it realized it could run it way too early, even before the display reset. I tried putting it also as a dependency of getty.target and also getty@tty1.target, to similarly little effect.

Is there a good way to figure out when the nvidia driver has finished loading and the display has been reset and only run it *then*, AFTER that has happened?

Offline

#2 2025-12-20 12:51:44

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,565

Re: Ideas on how to trigger systemd-vconsole-setup.service after nvidia

just remove the linux-fallback and linux-lts-fallback presets for mkinitcpio as is now the default on new installs .

They probably are in /etc/mkinitcpio.d .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2025-12-20 19:14:58

scott_fakename
Member
Registered: 2012-08-15
Posts: 129

Re: Ideas on how to trigger systemd-vconsole-setup.service after nvidia

Oh hey that does it, with just the two it fits the modules in.

It does now have an issue where the prompt comes up to enter the sd-encrypt password, then the screen resets and the prompt to enter the password ends up on one line, while the cursor into which you're typing ends up on another line. It's a little unsightly and I can't get it to do it in the right order. However, that's not that big a deal I guess, as long as it's looking fine by the end of the boot.

Offline

Board footer

Powered by FluxBB