[From nobody Mon Aug 31 11:35:08 2026
Received: (at submit) by bugs.debian.org; 29 Aug 2026 11:13:18 +0000
X-Spam-Checker-Version: SpamAssassin 4.0.1-bugs.debian.org_2005_01_02
 (2024-03-25) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-20.2 required=4.0 tests=BAYES_00,
 BODY_INCLUDES_PACKAGE,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,
 DKIM_VALID_EF,HAS_PACKAGE,PGPSIGNATURE,SPF_HELO_NONE,SPF_PASS
 autolearn=ham autolearn_force=no
 version=4.0.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 43; hammy, 116; neutral, 71; spammy,
 4. spammytokens:1.000-2--H*Ad:N*Ltd, 1.000-2--H*F:N*Ltd,
 0.955-+--faithfully, 0.940-+--H*r:bugs.debian.org
 hammytokens:0.000-+--H*ct:pgp-sha256, 0.000-+--trixie,
 0.000-+--H*u:Evolution, 0.000-+--H*ct:application,
 0.000-+--H*ct:protocol
Return-path: &lt;contact@abasileuton.com&gt;
Received: from mx.roso93.net ([88.97.61.70]:60548)
 by buxtehude.debian.org with esmtps
 (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
 (Exim 4.96) (envelope-from &lt;contact@abasileuton.com&gt;)
 id 1x0Gzu-000Msa-20 for submit@bugs.debian.org;
 Sat, 29 Aug 2026 11:13:18 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=abasileuton.com; s=1;
 t=1788001656; bh=TWtVE+mFb+byBQCGxV4Xe85M4+U6bDfiEdv8FRDOKng=;
 h=Subject:From:To:Date:From;
 b=J1qBkUw3Zqwd1aelN9oxaJSfBWzR62gfxX7NyqosomLveW4ww7a1/leGkDylD3bdB
 8kTkvFdHQ3f+GDa+Mjmv8i//b1MnkWQp4LCwrf379o5BYfvRpswcjEo9FMDyhriXW4
 bOjMrwM9CZjwvcaE2t9OdjWyi9N31ofPRMw/gYPXZf6HhxWBlo0nPiCOR5lCsFoXL6
 LfEjmR1iM+POK8WAo/6oyjZb8SKXtDyjSUIrIsCtE1O6DZ3yv+tnSfuJqwW0nl71oF
 VqA1P3bv/0d5i5K7zcgzBc0QniiCfv0IAyJhpxrSSW43Z7qnZ+5jtaWC1230bqOsW2
 I6v21ZSP206ig==
Message-ID: &lt;8bc8153208d4c60b69493c178e1aca9d51c1cc24.camel@abasileuton.com&gt;
Subject: Xorg fails to get its own session
From: Abasileuton Ltd &lt;contact@abasileuton.com&gt;
To: submit@bugs.debian.org
Date: Sat, 29 Aug 2026 12:07:30 +0100
Content-Type: multipart/signed; micalg=&quot;pgp-sha256&quot;;
 protocol=&quot;application/pgp-signature&quot;; boundary=&quot;=-FrVyBZ2Hf+kLjOxTEUdh&quot;
User-Agent: Evolution 3.46.4-2+deb12u1 
MIME-Version: 1.0
X-Greylist: delayed 338 seconds by postgrey-1.37 at buxtehude;
 Sat, 29 Aug 2026 11:13:18 UTC
Delivered-To: submit@bugs.debian.org


--=-FrVyBZ2Hf+kLjOxTEUdh
Content-Type: text/plain; charset=&quot;UTF-8&quot;
Content-Transfer-Encoding: quoted-printable

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
&quot;manager_get_session_by_pidref&quot;
calls the function &quot;cg_pidref_get_unit&quot;,
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 &quot;GetSessionByPID&quot;
passing its own PID as argument.
If it were to call &quot;GetSession&quot;
or, even, call &quot;GetSessionByPID&quot; with an argument of zero
instead of its own PID,
the code path in elogind that calls
&quot;manager_get_session_by_pidref&quot; 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
	&quot;Use-libsystemd0-compatible-cgroups-layout.patch&quot;
(ii)	File a bug against Xorg=20
	to use &quot;GetSession&quot; instead of &quot;GetSessionByPID&quot;
(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.


--=-FrVyBZ2Hf+kLjOxTEUdh
Content-Type: application/pgp-signature; name=&quot;signature.asc&quot;
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----

iI4EABYIADYWIQRh75PDXqGkb4yAHTczJEIf5bvu3wUCapK9chgcY29udGFjdEBh
YmFzaWxldXRvbi5jb20ACgkQMyRCH+W77t8ilAEA9TBhVV7c5h3qDsjlaj1cT18f
0SnY2qdZWerOIBd6kOMBAIRM4RuzVYuHePwFT2ETENNcxrau9GqKW7+WoSyxKkAM
=orAi
-----END PGP SIGNATURE-----

--=-FrVyBZ2Hf+kLjOxTEUdh--
]