Skip to content

systemd: systemd-tmpfiles-clean.service always fails because filesystem is mounted with noatime #520485

Closed

Description

@PaulGrandperrin

Hi,

I just upgraded to unstable/26.05 and now the systemd-tmpfiles-clean.service unit keeps failing. See the logs at the end.

This is a known bug (systemd/systemd#41227) that has been fixed in the developement branch of systemd but might not make it to the 260 branch, I asked about it but didnt get answers so far: systemd/systemd#41232 (comment)

I use ZFS and work on millions of files all the time and so noatime is quite important for performance and avoiding fragmentation.

I'm using systemd's own patch on my system and it works perfectly:

  systemd.package = pkgs.systemd.overrideAttrs (oldAttrs: {
    patches = (oldAttrs.patches or []) ++ [
      (pkgs.fetchpatch {
        #url = "https://github.com/systemd/systemd/pull/41232.patch";
        url = "https://github.com/systemd/systemd/commit/df45055942330fcd2b77389e449905e7f6ca34ec.patch";
        hash = "sha256-PDh4mP9rYGCglp25346nExU2v6P0WYPfLZgu+YwzZ9c=";
      })
    ];
  });

Should I go ahead and create a PR to add this patch? @flokli @nikstur @ElvishJerricco @LordGrimmauld @aanderse @arianvp

systemctl status systemd-tmpfiles-clean.service

× systemd-tmpfiles-clean.service - Cleanup of Temporary Directories
     Loaded: loaded (/etc/systemd/system/systemd-tmpfiles-clean.service; linked; preset: ignored)
    Drop-In: /nix/store/lw991ayzcb32pqy60izkv51l102nxi1h-system-units/service.d
             └─10-failure-notification.conf
     Active: failed (Result: exit-code) since Fri 2026-05-15 16:05:20 CEST; 5min ago
 Invocation: 247589eb045b40e5b6c1ba6713089cc4
TriggeredBy: ● systemd-tmpfiles-clean.timer
       Docs: man:tmpfiles.d(5)
             man:systemd-tmpfiles(8)
    Process: 309588 ExecStart=systemd-tmpfiles --clean (code=exited, status=73)
   Main PID: 309588 (code=exited, status=73)
         IP: 0B in, 0B out
         IO: 44K read, 0B written
   Mem peak: 2M
        CPU: 48ms

May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-bluetooth.service-omhU8v/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-irqbalance.service-AHsUZ7/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-colord.service-0vxsqf/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-cups.service-kG3PAx/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-upower.service-BqKCBw/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/var/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd[1]: systemd-tmpfiles-clean.service: Main process exited, code=exited, status=73/CANTCREAT
May 15 16:05:20 nixos-xps systemd[1]: systemd-tmpfiles-clean.service: Failed with result 'exit-code'.
May 15 16:05:20 nixos-xps systemd[1]: Failed to start Cleanup of Temporary Directories.
May 15 16:05:20 nixos-xps systemd[1]: systemd-tmpfiles-clean.service: Triggering OnFailure= dependencies.

journalctl -b -u systemd-tmpfiles-clean.service

May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/nix/var/nix/b) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/var/lib/systemd/coredump) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/var/lib/systemd/ephemeral-trees) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-avahi-daemon.service-eEqrZK/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-ModemManager.service-xpRqeu/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-polkit.service-acmvhI/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-systemd-logind.service-baXMC8/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-power-profiles-daemon.service-KH8yGX/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-nscd.service-9lCxuH/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-bluetooth.service-3bhf4V/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-wpa_supplicant.service-kmKSLz/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-colord.service-vFvCCI/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-bolt.service-f2WDNM/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-cups.service-lsN7Ll/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-fwupd.service-KBbrPx/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-dbus-broker.service-gKumhq/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-ollama.service-gKU8P3/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-irqbalance.service-9jSbAu/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-upower.service-bSM0Sh/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-nscd.service-zshfik/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-systemd-logind.service-4wE4uf/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-wpa_supplicant.service-MArHur/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-ollama.service-7Yvl2F/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-power-profiles-daemon.service-Qxuhzx/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-avahi-daemon.service-Fgv3WX/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-bolt.service-Bpuwu6/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-dbus-broker.service-e2Soqt/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-ModemManager.service-Ov06mf/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-fwupd.service-wqlBlB/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-polkit.service-VmLG0K/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-bluetooth.service-omhU8v/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-irqbalance.service-AHsUZ7/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-colord.service-0vxsqf/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-cups.service-kG3PAx/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-upower.service-BqKCBw/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd-tmpfiles[309588]: statx(/var/tmp) failed: Protocol driver not attached
May 15 16:05:20 nixos-xps systemd[1]: systemd-tmpfiles-clean.service: Main process exited, code=exited, status=73/CANTCREAT
May 15 16:05:20 nixos-xps systemd[1]: systemd-tmpfiles-clean.service: Failed with result 'exit-code'.
May 15 16:05:20 nixos-xps systemd[1]: Failed to start Cleanup of Temporary Directories.
May 15 16:05:20 nixos-xps systemd[1]: systemd-tmpfiles-clean.service: Triggering OnFailure= dependencies.

systemd-tmpfiles --clean

statx(/nix/var/nix/b) failed: Protocol driver not attached
statx(/var/lib/systemd/coredump) failed: Protocol driver not attached
statx(/var/lib/systemd/ephemeral-trees) failed: Protocol driver not attached
statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-avahi-daemon.service-eEqrZK/tmp) failed: Protocol driver not attached
statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-ModemManager.service-xpRqeu/tmp) failed: Protocol driver not attached
statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-polkit.service-acmvhI/tmp) failed: Protocol driver not attached
statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-systemd-logind.service-baXMC8/tmp) failed: Protocol driver not attached
statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-power-profiles-daemon.service-KH8yGX/tmp) failed: Protocol driver not attached
statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-nscd.service-9lCxuH/tmp) failed: Protocol driver not attached
statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-bluetooth.service-3bhf4V/tmp) failed: Protocol driver not attached
statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-wpa_supplicant.service-kmKSLz/tmp) failed: Protocol driver not attached
statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-colord.service-vFvCCI/tmp) failed: Protocol driver not attached
statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-bolt.service-f2WDNM/tmp) failed: Protocol driver not attached
statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-cups.service-lsN7Ll/tmp) failed: Protocol driver not attached
statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-fwupd.service-KBbrPx/tmp) failed: Protocol driver not attached
statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-dbus-broker.service-gKumhq/tmp) failed: Protocol driver not attached
statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-ollama.service-gKU8P3/tmp) failed: Protocol driver not attached
statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-irqbalance.service-9jSbAu/tmp) failed: Protocol driver not attached
statx(/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-upower.service-bSM0Sh/tmp) failed: Protocol driver not attached
statx(/tmp) failed: Protocol driver not attached
statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-nscd.service-zshfik/tmp) failed: Protocol driver not attached
statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-systemd-logind.service-4wE4uf/tmp) failed: Protocol driver not attached
statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-wpa_supplicant.service-MArHur/tmp) failed: Protocol driver not attached
statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-ollama.service-7Yvl2F/tmp) failed: Protocol driver not attached
statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-power-profiles-daemon.service-Qxuhzx/tmp) failed: Protocol driver not attached
statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-avahi-daemon.service-Fgv3WX/tmp) failed: Protocol driver not attached
statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-bolt.service-Bpuwu6/tmp) failed: Protocol driver not attached
statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-dbus-broker.service-e2Soqt/tmp) failed: Protocol driver not attached
statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-ModemManager.service-Ov06mf/tmp) failed: Protocol driver not attached
statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-fwupd.service-wqlBlB/tmp) failed: Protocol driver not attached
statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-polkit.service-VmLG0K/tmp) failed: Protocol driver not attached
statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-bluetooth.service-omhU8v/tmp) failed: Protocol driver not attached
statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-irqbalance.service-AHsUZ7/tmp) failed: Protocol driver not attached
statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-colord.service-0vxsqf/tmp) failed: Protocol driver not attached
statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-cups.service-kG3PAx/tmp) failed: Protocol driver not attached
statx(/var/tmp/systemd-private-0f70133b8af7457fba3c704a6d1b9bca-upower.service-BqKCBw/tmp) failed: Protocol driver not attached
statx(/var/tmp) failed: Protocol driver not attached
``

Activity

  1. GrimmTheShrimp commented on May 15, 2026

    @GrimmTheShrimp
    Contributor

    I just ran into the very same thing on my server (aarch64) and applied that patch, the patch does indeed seem to fix it

  2. nikstur commented on May 18, 2026

    @nikstur
    Contributor

    Since this was merged upstream I'd be fine with applying this patch. It should just be accompanied by a comment that it should be removed on the next release.

  3. added 3 commits that reference this issue on May 22, 2026
    c2a79c3
    7044fa2
    d28f57c
  4. nixos-discourse commented on Jun 7, 2026

    @nixos-discourse
  5. added a commit that references this issue on Jun 10, 2026
    6c3ff74
  6. added a commit that references this issue on Jun 23, 2026
    a7d2d59
  7. added a commit that references this issue on Jun 26, 2026
    781d85d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions