Slow login to Gnome desktop F39

I recently installed Fedora39 workstation onto a brand now XPS 13 laptop. Worked great at first, but suddenly when I type my password to login I’m now waiting through 5 minutes of a frozen screen before I arrive at the desktop.

when I do systemctl-analyze, the times I’m seeing doing represent the ~5 minutes wait I’m actually sitting through:

Startup finished in 6.391s (firmware) + 2.532s (loader) + 1.763s (kernel) + 12.127s (initrd) + 6.797s (userspace) = 29.612s 
graphical.target reached after 6.759s in userspace.

Here is the blame output
Here is what journalctl -b says
Here is the critical chain
Here is the bootchart

Here seems to be the relavent point in the journalctl log:

Dec 10 08:38:52 fedora systemd[1]: realmd.service: Deactivated successfully.
Dec 10 08:38:52 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=realmd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Dec 10 08:39:48 fedora systemd[1]: virtqemud.service: Deactivated successfully.
Dec 10 08:39:48 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=virtqemud comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Dec 10 08:40:18 fedora systemd[2439]: Starting grub-boot-success.service - Mark boot as successful...
Dec 10 08:40:18 fedora systemd[2439]: Finished grub-boot-success.service - Mark boot as successful.
Dec 10 08:42:54 fedora PackageKit[1832]: daemon quit
Dec 10 08:42:54 fedora audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=packagekit comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Dec 10 08:42:54 fedora systemd[1]: packagekit.service: Deactivated successfully.
Dec 10 08:43:10 fedora /usr/libexec/gdm-wayland-session[2568]:  * Error: Problem adding; giving up
Dec 10 08:43:10 fedora systemd[2439]: Created slice background.slice - User Background Tasks Slice.

Any suggestions appreciated…

Does the login timeout also happen with a completely fresh new user? If not, some GNOME extensions could be to blame.

Does the timeout happen with both Wayland and X11 session?

I see a lot of messages like this:

Dec 10 08:37:50 fedora kernel: usb 3-10: Device not responding to setup address.
Dec 10 08:37:50 fedora kernel: usb 3-10: device not accepting address 8, error -71
Dec 10 08:37:50 fedora kernel: usb usb3-port10: unable to enumerate USB device
Dec 10 08:37:50 fedora kernel: usb 3-3: reset full-speed USB device number 2 using xhci_hcd

What’s your usb 3-10 device? Look into lsusb.

lsusb:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 2109:0103 VIA Labs, Inc. [unknown]
Bus 003 Device 003: ID 27c6:63ac Shenzhen Goodix Technology Co.,Ltd. [unknown]
Bus 003 Device 004: ID 8086:0b63 Intel Corp. [unknown]
Bus 003 Device 005: ID 8087:0033 Intel Corp. AX211 Bluetooth
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Not sure where device 3-10 is here.

When I try to log in with X11 things are even worse; black screen; indefinite wait. I haven’t successfully logged in that way.
I have logged in very quickly with KDE plasma (Weyland), and have switched to using it.
I will report back on a new user.
EDIT: I created a new user, and I logged in super fast.
I don’t really have much in the way of extensions though:

:~$ gnome-extensions list
apps-menu@gnome-shell-extensions.gcampax.github.com
background-logo@fedorahosted.org
launch-new-instance@gnome-shell-extensions.gcampax.github.com
places-menu@gnome-shell-extensions.gcampax.github.com
window-list@gnome-shell-extensions.gcampax.github.com

and only one is enabled:

:~$ gnome-extensions list --enabled
background-logo@fedorahosted.org

Ok, that means that the problem is somewhere in your user account. I don’t have a super-useful advice how to figure it out, though. I would personally start renaming config files in my home directory to figure out what causes it. So e.g. rename ~/.config to ~/.config_, try to log in, if it doesn’t help, rename it back and try a different directory/file - look at all the dotfiles in your home, the most likely culprits include .bash*, .cache, .config, .local, .profile, .X*.

Another user reported the slow shutdown of his laptop, it turned out to be the smart card reader that was timing out. The discussion is Shutdown process very slow on Fedora 39 - #8 by chrismile. I think the user was filing a BZ bug.

The issue was in my .bashrc.
The line:

eval `keychain --eval --agents ssh <mykey>`

which is frustrating. But I have now discovered this: [SOLVED] 'gnome-keyring' causes long boot delay [gdm + gnome-shell] / Applications & Desktop Environments / Arch Linux Forums
and I’m going to try it.
EDIT: it worked! (Didn’t why, but it did…)