!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

81 Members
systemd in NixOs's stage 1, replacing the current bash tooling https://github.com/NixOS/nixpkgs/projects/5126 Servers

Load older messages


SenderMessageTime
25 Jan 2023
@gdamjan:spodeli.org@gdamjan:spodeli.orgactually, I'm confused what 'device' is there?11:20:13
@elvishjerricco:matrix.org@elvishjerricco:matrix.org gdamjan: As I understand it, there's a bunch of different ${tpm2-tss}/lib/libtss2-tcti-*.so drivers for various TPMs. The issue was that systemd got a patch that made it so it doesn't check the correct locations to find these on NixOS. So if you had tpm2-device=auto, it would find your TPM device in /dev and determine which driver to load, but fail to properly find that driver 11:29:43
@elvishjerricco:matrix.org@elvishjerricco:matrix.org one of them just happens to have a weird name device 11:30:05
@gdamjan:spodeli.org@gdamjan:spodeli.org👍️11:31:52
@lily:lily.flowers@lily:lily.flowers Does anyone have any thoughts on whether changing the ACTION="add" to ACTION="add|change" is a good idea here? https://github.com/systemd/systemd/blob/f2592ef0e113aef0e8e7141cab2b17521760b064/rules.d/90-vconsole.rules.in#L12
It fixes my issue with the vconsole settings racing in initrd and sometimes causing the vconsole settings to get reverted when vtcon initializes (and udev rule fires) before drm/modesetting/i915/something else does (idk where exactly it's getting reset but it only happens after the udev rule like 1 in 10 boots)
17:54:18
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Lily Foster: I just realized we don't actually add systemd-vconsole-setup.service to initrd... Do you add that in your config yourself? 18:14:47
@lily:lily.flowers@lily:lily.flowersI do not. It didn't seem to help anything when I tried to add it so I removed it again18:15:19
@lily:lily.flowers@lily:lily.flowersThe systemd-vconsole-setup seems to get run only from the udev rule, not from the .service18:15:40
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgAh I see18:15:47
@lily:lily.flowers@lily:lily.flowers* The systemd-vconsole-setup binary seems to get run only from the udev rule, not from the .service18:15:48
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Lily Foster: Weird, systemctl list-dependencies --reverse systemd-vconsole-setup.service only lists plymout-start.service. Not even any transitive reverse deps 18:18:24
@lily:lily.flowers@lily:lily.flowersOh yeah I don't use plymouth, so that may be why adding it did nothing for me18:18:54
@lily:lily.flowers@lily:lily.flowers(And also why vconsole settings matter a little more for my ability to type luks password)18:19:19
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgI guess plymouth-start isn't wanted by anything in stage 218:19:20
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgbut yea, maybe add the unit to the upstream units list and make it wanted by initrd.target or something?18:19:45
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgnot that it would necessarily matter; the udev stuff should probably do the trick18:20:06
@lily:lily.flowers@lily:lily.flowers
In reply to @elvishjerricco:matrix.org
but yea, maybe add the unit to the upstream units list and make it wanted by initrd.target or something?
I'll try that and see if it helps then. I'm not sure if it'll just continue racing like that or not (does modesetting reset vtcon settings or something?)
18:21:11
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgI know absolutely nothing about the vconsole stuff18:21:51
@lily:lily.flowers@lily:lily.flowersHey same18:22:34
@lily:lily.flowers@lily:lily.flowersWhich is why debugging this for me has mostly been trying random seemingly-related changed18:22:53
@lily:lily.flowers@lily:lily.flowers* Which is why debugging this for me has mostly been trying random seemingly-related changes18:23:00
26 Jan 2023
@viktor:kleen.org@viktor:kleen.org joined the room.17:06:51
@lily:lily.flowers@lily:lily.flowers
In reply to @elvishjerricco:matrix.org
but yea, maybe add the unit to the upstream units list and make it wanted by initrd.target or something?
So it does look like dracut actually manually adds Wants for the service to stuff: https://github.com/dracutdevs/dracut/blob/3c16c76fb51683cd70c3643b122685b7cdb4178c/modules.d/00systemd/module-setup.sh#L249-L256
23:29:27
@lily:lily.flowers@lily:lily.flowersMaybe we need to do that too?23:29:37
@lily:lily.flowers@lily:lily.flowers(I have made the change you suggested locally and I've just been waiting to see in the next week if it happens again during boot or if your suggestion fixed it)23:30:43
@lily:lily.flowers@lily:lily.flowersIt actually looks like mkinitcpio doesn't even install that .service anymore (and they used to have a module load hack to fix the problem I'm having): https://github.com/archlinux/mkinitcpio/commit/8d1d5cce87cec6038dfc42c93e1c65b486bff16f23:43:52
27 Jan 2023
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgHm yea according to https://github.com/systemd/systemd/issues/4699, it sounds like the udev rule is all that's expected to be needed00:10:37
@lily:lily.flowers@lily:lily.flowers
In reply to @elvishjerricco:matrix.org
Hm yea according to https://github.com/systemd/systemd/issues/4699, it sounds like the udev rule is all that's expected to be needed
We don't even seem to be doing anything different from mkinitcpio for vconsole stuff that I saw, and I've not seen anyone else say they've had an issue like this for NixOS. So I'm worried I may be the only one with this issue (and it's not show-stopping, it's just mildly annoying when my vconsole settings get reverted before I type my luks password)
00:14:03
@lily:lily.flowers@lily:lily.flowers(granted not many people on NixOS are using stage 1 systemd)00:14:19
@lily:lily.flowers@lily:lily.flowers

So it seems the issue happens when fb0 switches from efifb to i915drmfb, which resets the fbcon on vtcon0 (presumably indicated by the log item kernel: Console: switching to colour frame buffer device 282x94). So depending on what events trigger the "change" event for vtconsoles, setting that udev rule could cause later setfonts to be overriden by the default vconsole settings

I'm trying a few kernel params to attempt to prevent the switches during initrd for further testing in confirming the cause

14:58:52

Show newer messages


Back to Room ListRoom Version: 6