Score:0

gdm.service randomly stopping on its own

si flag

Some background:

  • Devices are running a mix of Ubuntu 20.04 and 22.04 with GNOME.
  • The issue has occurred on multiple machines.

Randomly, after a few minutes of normal operation (boot up and login are fine), the gdm.service will stop and user will be kicked to the tty.

This is a very rare occurrence (once every few months) but, I've seen it on multiple machines.

When it happens, it ALWAYS occurs within the first 5 minutes of reaching the login screen. It has occurred both before and after logging in. The strange thing is, gdm.service seemingly stops gracefully, as though it was asked to by another process.

Jan 23 09:05:16 example-host systemd[1]: Starting GNOME Display Manager...
Jan 23 09:05:16 example-host systemd[1]: Started GNOME Display Manager.
Jan 23 09:05:17 example-host gdm-launch-environment][2189]: pam_unix(gdm-launch-environment:session): session opened for user gdm by (uid=0)
Jan 23 09:05:28 example-host gdm-password][2914]: pam_unix(gdm-password:auth): authentication failure; logname= uid=0 euid=0 tty=/dev/tty1 ruser= rhost=  user=****
Jan 23 09:05:28 example-host gdm-password][2914]: pam_sss(gdm-password:auth): authentication success; logname= uid=0 euid=0 tty=/dev/tty1 ruser= rhost= user=****
Jan 23 09:05:28 example-host gdm-password][2914]: gkr-pam: unable to locate daemon control file
Jan 23 09:05:28 example-host gdm-password][2914]: gkr-pam: stashed password to try later in open session
Jan 23 09:05:28 example-host gdm-password][2914]: pam_unix(gdm-password:session): session opened for user erb by (uid=0)
Jan 23 09:05:29 example-host gdm-password][2914]: gkr-pam: gnome-keyring-daemon started properly and unlocked keyring
Jan 23 09:05:35 example-host gdm3[2172]: Child process -2476 was already dead.
Jan 23 09:06:38 example-host systemd[1]: Stopping GNOME Display Manager...
Jan 23 09:06:39 example-host gdm3[2172]: GLib: g_hash_table_foreach: assertion 'version == hash_table->version' failed
Jan 23 09:06:39 example-host systemd[1]: gdm.service: Succeeded.
Jan 23 09:06:39 example-host systemd[1]: Stopped GNOME Display Manager.

After a reboot, everything works as expected.

Any ideas here? Since the process isn't failing, maybe there's a way I can find out which process is calling for gdm.service to stop?

EDIT

Checking the gdm.service unit-file, I can see it has the value Restart=always, but the service does not automatically restart in this situation.

So the service must indeed be being stopped gracefully by some process.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.