Package: elogind Version: 255.17-1debian2 Severity: important Dear maintainers,
I hope this bug report finds you well!
Elogind stopped working with Xorg since trixie.
The relevant line in Xorg.0.log says:
[...] (EE) systemd-logind: failed to get session: PID ... does not
belong to any known session
I managed to track the issue down to your patch
for using systemd-compatible cgroups.
The issue is due to missing logic in elogind
compared to what systemd's logind does.
In particular, when the function
"manager_get_session_by_pidref"
calls the function "cg_pidref_get_unit",
the returned hashtable is always empty.
I can confirm that Xorg works as expected
both with systemd's logind
and with elogind after removing this patch.
The problem is triggered only because Xorg
calls the dbus interface method "GetSessionByPID"
passing its own PID as argument.
If it were to call "GetSession"
or, even, call "GetSessionByPID" with an argument of zero
instead of its own PID,
the code path in elogind that calls
"manager_get_session_by_pidref" is not traversed.
After testing, I can confirm that,
if one change the source code of Xorg to pass zero as argument,
all works as expected.
Now, I can suggest to you three solutions:
(i) Stop using the patch
"Use-libsystemd0-compatible-cgroups-layout.patch"
(ii) File a bug against Xorg
to use "GetSession" instead of "GetSessionByPID"
(iii) Implement, in elogind, the missing bits that systemd has.
The easiest solution is (i),
but I guess you want to link against
libsystemd0 in Debian,
so this may not be an option.
Meanwhile, I doubt anyone could convince upstream Xorg
to make this change,
since it is not really a bug in Xorg.
So (ii) is probably only an option
if one were to add a patch to the Debian xserver-xorg package.
And (iii) seems like quite a bit of work,
though I might be able to help if you choose this option.
Yours faithfully,
B.R.S. Roso,
Abasileuton Ltd.
signature.asc
Description: This is a digitally signed message part

