On 28/02/2023 17:25, Christoph Brinkhaus wrote:
I will just inform about the status. Everything is fine now. A word
about systemd-networkd-wait-online: With this service running there
has been even a delay of 1-2 seconds when switching from one console
to a different one (the consoles when X is not running). I have no
idea about that side effect.
Does it happen each time or it is getty startup time? In the latter case
you may try (for various console numbers)
systemd-analyze critical-chain [email protected]
Now I have disabled systemd-networkd-wait-online and I have add a
comment in the last line of /usr/lib/systemd/system//systemd-networkd.service
which is now
# 28.2.2023 Also=systemd-networkd-wait-online.service
Ideally the root cause of strange behavior should be debugged. Perhaps
some dependency should be removed from e.g. multi-user.target or
network-online.target. Probably "systemd-analyze critical-chain" may
give some hints.
Any case I would not touch files in /usr/lib/systemd. It should confuse
tools like systemd-delta. It is possible to override specific properties
by creating of drop-in snippets in
/etc/systemd/system/systemd-networkd.service.d/. See systemd.unit(5),
e.g. run
systemctl edit systemd-networkd.service
[Install]
# Clear
Also=
# Add other values from the original file
Also=systemd-networkd.socket
Check result
systemd-analyze verify systemd-networkd.service
I hope, it is a better way to apply your workaround. I can not suggest a
better solution for tty delay issue, but I think it exists. "Also="
should affect "systemctl enable systemd-networkd.service" and "disable"
commands, so I puzzled why it helps at all.