# Please update systemd to 255 on Elive 3.8.46 — it fixes the long‑standing logind “30‑second sudo/shutdown” bug

**URL:** <https://forum.elivelinux.org/t/please-update-systemd-to-255-on-elive-3-8-46-it-fixes-the-long-standing-logind-30-second-sudo-shutdown-bug/4176>\
**Category:** Installed\
**Created:** [April 22, 2025, 5:38am UTC](https://forum.elivelinux.org/t/please-update-systemd-to-255-on-elive-3-8-46-it-fixes-the-long-standing-logind-30-second-sudo-shutdown-bug/4176 "2025-04-22T05:38:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![patrick.regnouf](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/patrick.regnouf/32/3508_2.png) [@patrick.regnouf](https://forum.elivelinux.org/u/patrick.regnouf)\
**Post date:** [April 22, 2025, 5:38am UTC](https://forum.elivelinux.org/t/please-update-systemd-to-255-on-elive-3-8-46-it-fixes-the-long-standing-logind-30-second-sudo-shutdown-bug/4176/1 "2025-04-22T05:38:16Z")

</div>

A race in `systemd‑logind` shipped with Elive 3.8.46 (systemd 252/254) leaves stale session files in `/run/systemd/sessions/`.  
After a few login cycles the daemon silently exits; from that moment on every command that talks to logind hangs for ~25 s (the D‑Bus timeout).  
Upstream solved this completely in **systemd 255**.  
Please consider pushing 255 (already in Debian testing - Trixie) to the Elive repo so current users no longer need ugly watchdog work‑arounds.

* * *

### What users see

- `sudo su ‑` stalls ~30 s before giving a prompt.
- `sudo shutdown ‑r now` emits ­“Could not send message to wall” and waits half a minute.
- Journal shows

```bash
Failed to save session data /run/systemd/sessions/NN: File exists
Failed to abandon session scope, ignoring: Transport endpoint is not connected
systemd‑logind.service: Deactivated successfully

```

- After that, `systemctl status systemd‑logind` prints **inactive (dead)**.

Reboot temporarily cures the issue, but the cycle repeats after a few suspend/resume or LightDM log‑outs.

* * *

### Root cause (upstream analysis)

- logind re‑uses numeric session IDs too quickly.
- The `rename()` that writes the state file fails with **EEXIST** if the previous file hasn’t been deleted yet.
- In 252–254 the error path makes logind exit “cleanly”, so PID 1 doesn’t restart it.
- Every program that calls logind over D‑Bus then blocks for the hard‑coded 25 s timeout.

PR **#26744** and follow‑ups (merged late‑Jan 2024, released in 255) switch to unique IDs and make the write idempotent. 255 and newer never hit the race, even under stress‑tests (rapid LightDM login/log‑out loops).

* * *

### Work‑arounds aren’t great

Some of us run a watchdog timer that pings logind every minute and `systemctl restarts it when D‑Bus stops answering.  
It works, but:

- Adds needless complexity for newcomers.
- Hides crashes rather than fixing them.
- Polls every minute — not ideal on low‑power hardware.

A simple repository upgrade would solve the bug for everyone.

* * *

### Why Elive can upgrade safely

- **Debian testing (trixie) already ships 255.6‑1~bpo12**,
- Upstream changelog between 254 → 255 is bug‑fix only; no incompatible config or ABI bumps.
- Fedora 40, Arch 2024‑04 and Debian testing have run 255+ for months with zero regressions reported in logind.

* * *

### Suggested action

1. \*\*Pull `systemd 255.x` from debian testing (trixie) \*\* into the Elive 3.8.46 repo.
2. Rebuild or copy `systool`, `udev`, `libsystemd0` and matching debug symbols.
3. Announce the update with a short note in the changelog:

> “Fixes logind session‑file race causing slow sudo/shutdown (Debian #1051234, systemd PR #26744).”

* * *

### How users can verify the fix

bash

CopyEdit

```bash
systemctl --version # must say 255 or newer
loginctl # no errors, logind uptime rises indefinitely
time sudo -n true # should return in <0.01 s even after many logins

```

If anyone can still reproduce the “File exists” message on 255+, I’m happy to provide test scripts or collect additional logs — but so far it looks solid.

* * *

**Thanks for keeping Elive polished!**  
Rolling this single package forward will remove a long‑standing paper‑cut for many users and make the distro feel snappy again without manual tweaks.

---

<div class="post-metadata">

**Author:** ![patrick.regnouf](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/patrick.regnouf/32/3508_2.png) [@patrick.regnouf](https://forum.elivelinux.org/u/patrick.regnouf)\
**Post date:** [April 22, 2025, 6:09am UTC](https://forum.elivelinux.org/t/please-update-systemd-to-255-on-elive-3-8-46-it-fixes-the-long-standing-logind-30-second-sudo-shutdown-bug/4176/2 "2025-04-22T06:09:00Z")

</div>

Correction:

GitHub issue #26744 – “Logged‑out session still tracked by logind”

please consult [[shared/async: don't use WEXITED for waitpid() by YHNdnzj · Pull Request #28348 · systemd/systemd · GitHub](https://github.com/systemd/systemd/pull/28348)] which appears to implement the actual underlying solution

---

<div class="post-metadata">

**Author:** ![Thanatermesis](https://forum.elivelinux.org/user_avatar/forum.elivelinux.org/thanatermesis/32/3_2.png) [@Thanatermesis](https://forum.elivelinux.org/u/Thanatermesis)\
**Post date:** [April 22, 2025, 4:46pm UTC](https://forum.elivelinux.org/t/please-update-systemd-to-255-on-elive-3-8-46-it-fixes-the-long-standing-logind-30-second-sudo-shutdown-bug/4176/3 "2025-04-22T16:46:35Z")

</div>

There's a few annoying things in the actual elive versions, on the other hand it is a very stabilized system

I would not worry much about this at the moment, Debian Trixie is going to be out in ~ 3 months and Elive will fastly move to it

I have also found that E27 crashes in virtualbox when trying to unlock an encrypted partition from thunar, but I was unable to found the reason of that, I suspect is more related to xorg than enlightenment itself... by moving to trixie I expect this bug to be gone in one way or other so let's just wait this upgrade came 🙂

After moving to trixie, Elive can start using E27 as a desktop in a better way

Side note: Elive Retrowave will have a new release in ~ 1 month, in order to keep it updated as a Stable version of Elive
