-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
systemd-udev-settle.service is overused #73095
Comments
@lheckemann Should we merge #25311 for display-manager? |
As of now... Removed from:
Added to:
|
@bqv Thanks. Is the one for xserver.nix in 20.03? |
@worldofpeace It is not, only the removal from |
Had to re-add it to GDM: f74f2f3 |
@jtojnar maybe gdm can depend on any DRI device instead of the global |
But
I would expect that to work, unless we are affected by systemd/systemd#14322. |
But the kernel module being loaded doesn't necessarily imply the device being available, does it? |
It's possible to remove it from Looking at the commit does not explain why it was added (4c6171c) @srhb |
Hello, I'm a bot and I thank you in the name of the community for opening this issue. To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human. The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it. If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them. Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel. |
Still valid… |
I think udev-settle can be removed from dhcpcd: it was introduced to compesate for #44524, but dhcpcd is not ordered
in a loop and it's always succeeding. EDIT: It seems #79532 is the reason for the success. So yes, I think the (terrible) udev-settle hack can be safely removed from networkd and dhcpcd. |
Btw, I think it's safe to say the issue now is "systemd-udev-settle" is used.
|
systemd-udev-settle is a terrible hack[1] and should never[2] ever[3] used, seriously it's very bad. It was used as a stop-gap solution for issue #39069, but thanks to PR #79532 it can be removed now. [1]: systemd/systemd#7293 (comment) [2]: #73095 [3]: #107341
We are down to
|
@prusnak the trezord service defined in NixOS pulls in udev-settle as dependency, but the upstream unit never did. Can trezord handle hardware discovery asynchronously or are there issues? |
There may be a good news: Gnome has just merged a patch that looks like it could fix the issue with gdm. Here's how I tested:
@worldofpeace @jtojnar Any change you might take a look at this? I hope I'm doing something wrong. |
I can confirm a similar issue with missing Workaround for 20.09:
|
We have a separate issue it seems. The canonical way of solving this is by using the |
Another thing that would be fun to try as I don't think it's the udev settle thing that does it - we are dealing with a race condition here (see sddm/sddm#1316) and I think that udev-settle just takes long enough for the devices to be in place. Instead of your workaround, can you try adding |
See NixOS#73095 It looks like it can finally be removed: the `Failed to open gpu '/dev/dri/card0'` error is gone and the nixosTests.gnome test is passing (checked 4 times in a row).
Finally GDM appears to be working without udev-settle.
|
Regarding
Option 1 seems like the most straight-forward option to me. |
A timer is also pretty simple to set up. Something like this should work:
The problem is that, unless the user picks up an appropriate value, it could lock the system too early. So, yes option 1 is the safest, I think. |
The problem is that, unless the user picks up an appropriate value, it could lock the system too early. So, yes option 1 is the safest, I think.
Option 1 gives us the behaviour closest to the current situation, that's for sure. I can also see a case for the timer option but if the purpose is to get rid of the warning, then option 1 is a no-brainer.
|
I marked this as stale due to inactivity. → More info |
This is still relevant, but not a big deal: the only remaining items are openvswitch and zfs. |
We could handle this by having a NixOS option that disables |
That or not installing the unit at all and adding a |
Is there any way to reduce the amount of time it waits? I'm root on ZFS (which is very nice otherwise, but otherwise makes this check futile, since the pools are obviously already mounted at that point or it wouldn't be booting) and it adds 7 seconds to my boot time, and is currently also the most time-consuming thing in my boot:
Attempting to mask it in my configuration results in this, probably due to the zfs dependency:
I will ping the other ticket on openzfs as well |
As a quick fix, how about just overriding it: {
systemd.services.zfs-import-cache = {
requires = [ "" "whatever-it-does-require.service" ];
};
} The trick is the |
@peterhoeg I mean... that might work, although it looks pretty hacky. I do use an L2ARC on an NVMe drive, would that prevent a rebuild of the L2ARC cache after reboot? (i.e., the persistence feature that was introduced relatively recently in openzfs) |
While I have zfs on 2 machines, I simply don't know enough to be able to say anything remotely intelligent about your case. You could try having |
I'm closing as zfs is the only remaining service and it up to upstream to fix it. |
Describe the bug
Related: #53446
Using systemd-udev-settle "is not recommended" (
man 8 systemd-udev-settle.service
). Nevertheless, we have quite a few services depend on it:On some systems/kernels (e.g. mobile-nixos kernels, cc @samueldr @kirelagin), this can cause boot to wait for systemd-udev-settle to time out, which is no fun.
Expected behavior
Services depend only on the devices that they need, either by waiting for them themselves or by depending on systemd's relevant
.device
unit.Metadata
"aarch64-linux"
Linux 3.18.71, NixOS, 19.09.941.27a5ddcf747 (Loris)
yes
yes
nix-env (Nix) 2.3
"nixos-19.09.941.27a5ddcf747"
/nix/var/nix/profiles/per-user/root/channels/nixos
The text was updated successfully, but these errors were encountered: