Gnome GDM login often hangs

Hello

For the last couple of months, when I log in to my Tumbleweed install via GDM most of the time it does not work. Instead if either displays a black/blank screen or it displays what was on the screen before GDM was loaded (i.e. some startup terminal text).

When this happens the system has not hung however. My workaround is to switch to a terminal (CTRL+ALT+F1), log in, and restart display-manager (systemctl restart display-manager.service). The computer then displays the graphical login screen again, and if I’m lucky when I log in it works. If it doesn’t work, I have to keep switch back and forth and restarting display-manager until it works. It usually works after about 7 or so retries.

Things I’ve tried:

  • editing gdm’s custom.conf file to set WaylandEnable=false
  • using lightdm (switched to using update-alternatives)
  • using xdm (switched to using update-alternatives)
  • using gdm systemd service
  • auto-login via GDM

Below is the output of

journalctl -u display-manager -b

The actions that took place for this output are:

  • the computer is started with auto-login enabled
  • the login fails and the screen is black, so I switch to a terminal and restart display manager
  • display manager restarts and the login happens automatically

Any tips for what is going wrong, why a login being successful appears to be random, or how I can diagnose further?

-- Journal begins at Mon 2021-06-28 05:26:58 AEST, ends at Sun 2021-09-12 13:17:49 AEST. --Sep 12 13:16:28 localhost systemd[1]: Starting X Display Manager...
Sep 12 13:16:28 localhost display-manager[971]: /etc/vconsole.conf available
Sep 12 13:16:28 localhost display-manager[971]: KEYMAP: us
Sep 12 13:16:28 localhost display-manager[971]: Command: localectl set-keymap us
Sep 12 13:16:28 localhost display-manager[971]: I: Using systemd /usr/share/systemd/kbd-model-map mapping
Sep 12 13:16:28 localhost gdm[1057]: Gdm: gdm_session_handle_secret_info_query: assertion 'self->user_verifier_interface != NULL' failed
Sep 12 13:16:28 localhost gdm-autologin][1121]: gkr-pam: couldn't get the password from user: Conversation error
Sep 12 13:16:29 localhost systemd[1]: Started X Display Manager.
Sep 12 13:16:29 localhost gdm[1057]: Gdm: GdmDisplay: Session never registered, failing
Sep 12 13:16:30 localhost gdm[1057]: Gdm: GdmDisplay: Session never registered, failing
Sep 12 13:16:30 localhost gdm[1057]: Gdm: Child process -1290 was already dead.
Sep 12 13:16:30 localhost gdm[1057]: Gdm: Child process -1290 was already dead.
Sep 12 13:16:30 localhost gdm[1057]: Gdm: gdm_session_handle_secret_info_query: assertion 'self->user_verifier_interface != NULL' failed
Sep 12 13:16:30 localhost gdm-autologin][1310]: gkr-pam: couldn't get the password from user: Conversation error
Sep 12 13:17:18 localhost.localdomain gdm[1057]: Gdm: Child process -2271 was already dead.
Sep 12 13:17:23 localhost.localdomain systemd[1]: Stopping X Display Manager...
Sep 12 13:17:23 localhost.localdomain gdm[1057]: GLib: g_hash_table_foreach: assertion 'version == hash_table->version' failed
Sep 12 13:17:23 localhost.localdomain systemd[1]: display-manager.service: Deactivated successfully.
Sep 12 13:17:23 localhost.localdomain systemd[1]: display-manager.service: Unit process 2607 (bash) remains running after unit stopped.
Sep 12 13:17:23 localhost.localdomain systemd[1]: Stopped X Display Manager.
Sep 12 13:17:23 localhost.localdomain systemd[1]: display-manager.service: Found left-over process 2607 (bash) in control group while starting unit. Ignoring.
Sep 12 13:17:23 localhost.localdomain systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Sep 12 13:17:23 localhost.localdomain systemd[1]: display-manager.service: Found left-over process 2608 (bash) in control group while starting unit. Ignoring.
Sep 12 13:17:23 localhost.localdomain systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Sep 12 13:17:23 localhost.localdomain systemd[1]: Starting X Display Manager...
Sep 12 13:17:23 localhost.localdomain display-manager[2612]: /etc/vconsole.conf available
Sep 12 13:17:23 localhost.localdomain display-manager[2612]: KEYMAP: us
Sep 12 13:17:23 localhost.localdomain display-manager[2612]: Command: localectl set-keymap us
Sep 12 13:17:23 localhost.localdomain display-manager[2612]: I: Using systemd /usr/share/systemd/kbd-model-map mapping
Sep 12 13:17:23 localhost.localdomain echo[2620]: Switch to tty1 Successfully
Sep 12 13:17:23 localhost.localdomain display-manager[958]: Starting service gdm
Sep 12 13:17:23 localhost.localdomain gdm[2624]: Gdm: gdm_session_handle_secret_info_query: assertion 'self->user_verifier_interface != NULL' failed
Sep 12 13:17:23 localhost.localdomain gdm-autologin][2628]: gkr-pam: couldn't get the password from user: Conversation error
Sep 12 13:17:24 localhost.localdomain systemd[1]: Started X Display Manager.

Thanks for your help!

It looks like the NVIDIA driver sometimes wasn’t being loaded early enough. My solution was to create a dracut file to load the driver earlier.

New file

/etc/dracut.conf.d/60-nvidia-default.conf

Contents of new file

add_drivers+=" nvidia nvidia-drm nvidia-modeset nvidia-uvm"

After adding the file, run the following command and reboot.

sudo dracut -f