Bug#1059245: gdm3: GDM3 fails to start on Wayland, maybe due to org.freedesktop.systemd1 failing to activate

Jindrich Makovicka makovick at gmail.com
Mon Oct 5 19:48:19 BST 2026


I think I finally found the culprit. In my case, I had nscd installed
from long time ago. After removing nscd, gdm3 seems to start reliably,
although it still needs more testing.

I have a strong suspicion it is this piece of code looking for a free
UID. When gdm finds a suitable UID in its range, it also requests it
from NSS, expecting a negative answer, to ensure it is available
globally. Unfortunately, nscd caches the negative lookup so the
following operations relying on this newly created UID fail.

static gboolean
pick_uid (GdmDynamicUserStore  *store,
          const char           *username,
          uid_t                *ret_uid,
          GError              **error)
{
        gboolean already_used;
        uid_t start;

        start = store->next_alloc;

        do {
                already_used = g_hash_table_contains (store->by_uid,
&store->next_alloc) ||
                               gdm_get_pwent_for_uid (store-
>next_alloc, NULL);

                               ^^^ calls getpwuid

        
                if (!already_used)
                        *ret_uid = store->next_alloc;

          ....

Regards,
-- 
Jindřich Makovička



More information about the pkg-gnome-maintainers mailing list