Graphical login broke

Hi, I’m trying to solve a puzzling problem. Last night my son did an offline-upgrade on his laptop (Fedora 39 KDE Spin, Dell XPS) and it broke graphical login. It boots up and gets to SDDM (so I guess it isn’t the graphics card?) , but if you login it goes to a black screen or back to SDDM (this behavior has varied a bit).

Things we’ve tried:

  • Login to an X11 session. No change.
  • Boot with older kernels (so probably not the kernel).
  • dnf history rollback (fails because it can’t find some of the rpms. Apparently he decided to try clearing saved rpms as part of the upgrade, since the option was offered to him. Maybe that’s why they are missing? I suspect there is a way to download older versions but I couldn’t find it.)
  • Rollback only the missing packages from the previous items. Didn’t work, they rollback to what is in fedora, not updates, so that’s much older.)
  • distro-sync --refresh . Didn’t help.

I can post logs if desired (is there a way to attach?), but I see things after a graphical login that could be relevant. These two I suspect are not (but what do I know?):

Feb 13 14:15:34 kayden sddm-helper[2375]: gkr-pam: unable to locate daemon control file

Feb 13 14:15:24 kayden wireplumber[1652]: WpPortalPermissionStorePlugin:0x564eabebd740 Failed to call Lookup: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for camera

This seems more likely:

Feb 13 14:15:34 kayden sddm-helper[2375]: Starting Wayland user session: “/etc/sddm/wayland-session” “/usr/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland”
Feb 13 14:15:34 kayden bluetoothd[1096]: Endpoint unregistered: sender=:1.77 path=/MediaEndpoint/A2DPSource/ldac
Feb 13 14:15:34 kayden sddm-helper-start-wayland[2200]: Stopping… “kwin_wayland”

Possibly the Endpoint unregistered error caused the session to shutdown immediately after it began? I’m purely guessing though.

Any suggestions?

It sounds like an issue that has been reported here before. I think one of the more common solutions ends up being to reinstall the nvidia graphics driver. I’m no expert at that though, so I’ll leave it to someone else to try to guide you through that process.

Thanks for getting back to me. It’s been weird. Late at night after I posted that I tried installing the Sway Desktop group just to test whether the problem has anything to do with KDE. Weirdly, Sway didn’t run either, but then KDE came up. I told him not to do anything to it until he had finished an exam he needs the computer for because I didn’t know why that worked and wasn’t sure it would work again. Well, I forget what happened, but he ended up rebooting it, and it didn’t work again. Also upgrading, I think. We need to have a talk (but he may have upgraded trying to fix it after he found KDE wouldn’t come up). Obviously i tried removing and re-installing the Sway group again, but that didn’t work this time.

I’ve done quite a few things, including just removing the nvidia drivers entirely. No go. I did discover a consistent behavior however, after getting the black screen at the sddm login, if I do a ctrl-alt-F3 switch to a console it goes back to cddm instead. That’s probably a large clue, but I don’t know how to interpret it. I tried reinstalling sddm, but no luck.

When I installed the Sway desktop there were a lot of version conflicts that I had to resolve with --allowerasing, which makes me think that version conflicts are the problem–at least at that time. I clearly don’t understand dnf, because before installing Sway I did distro-sync to try to make sure that things were consistent. It didn’t do anything, implying that everything was up to date, but then it wasn’t when I did the Sway install. Very confusing to me and probably indicates I need to understand Sway better.

RIght now I’m removing external repos and everything installed from them in an attempt to get back to the base Fedora system. He won’t be happy as he needs the Fedora stuff for his AI work, but we have to get it back working before doing much else.

Obviously, suggestions and cluebats welcome.

Try this if you can. dnf -y distro-sync --allowerasing --best It should get you back with all the latest updates for all packages. If you need to do this from a LiveUSB you can use the same command, just target dnf to the drive you have your install on.

1 Like

I tried it again. No luck, it only wants to upgrade the VS Code package.

I would suggest a new clean install since you have noted several problems related to installing/removing/updating software and the current status is unknown; including changes that may have occurred within config files that are not normally removed nor updated with the software packages.

Then use a controlled and documented path when installing packages so you can keep track of exactly what was done and the sequence in which performed.

Installing the nvidia drivers from rpmfusion is relatively straight forward and simple – enable the 3rd party repos during the first boot setup, then install the drivers with sudo dnf install akmod-nvidia in a terminal window. (I use the command line almost exclusively for admin). The cli has the added advantage of being able to look at the history and see what commands have been used and in what order.

Are you currently in the graphical environment? If so, did you successfully remove > then reinstall > shutdown > reboot after the Nvidia driver install? Are you back on KDE or Sway?

If using Sway is a reasonable workaround (at least in the short term), you can launch that directly from your console login (what you get with Ctrl-Alt-F3, etc.). You don’t have to start it from a desktop manager such as SDDM, GDM, LXDM, etc.

I put the following in ~/.bashrc.d/99-sway-on-tty1. But since you are only doing this as a workaround, you might want to change tty1 to, e.g., tty5. You might also opt to not start SDDM while you are using the workaround, but I don’t think that would be necessary.

# Run Sway on TTY1
if [[ -x /usr/bin/sway ]] && [[ $(tty) == /dev/tty1 ]]; then
    SSH_AGENT=()
    if [[ -x /usr/bin/ssh-agent ]] && [[ -e $XDG_RUNTIME_DIR ]]; then
       SSH_AGENT=(
          /usr/bin/ssh-agent -a "$XDG_RUNTIME_DIR/ssh.socket"
       ) 
    fi

    printf 'launching sway ...\n'
    exec 0<&- &> /dev/null
    exec "${SSH_AGENT[@]}" /usr/bin/sway
fi

No graphical environment starts. The system boots fine, though, so I have been using a virtual terminal to work on this. After any change to the system I reboot before retrying a graphical login to make sure things are in a consistent state.

I may soon be at the point of doing the fresh install, yes. I would prefer he be able to just use a browser on the system to do his exam first, but that’s rapidly looking like it won’t happen. Fortunately, I have a large USB drive for backups, so I can back up his entire home directory before a fresh install.

If the /home is on it’s own partition, you can actually keep it as is, from the installer.

Another thing that might work, but at the “cost” of not having advanced video features such as video acceleration for encoding/decoding video (YouTube playback might require more CPU, Zoom might not work, etc.) or 3D graphics (games might not work) is to add nomodeset to the list of kernel parameters (you can usually change the parameters temporarily at boot time via the bootloader).

That’s a very Interesting idea, I will do that as soon as I’ve finished what I’m trying so it’s in a consistent state. Even more interesting would be to try starting KDE that way, since I currently have no indication that KDE is the problem. I would imagine it’s basically the same script with /usr/bin/ replacing /usr/bin/sway. I guessed kdeinit5, but that looks like it’s an application launcher and not the launcher for the whole desktop.

It’s been a very long time since I did that, but the command used to be startx and it would determine which DE (desktop environment) to start based on a setting in a file under /etc/sysconfig (I’ve forgotten the name of the file though).

Edit: It was /etc/sysconfig/desktop and in that file you would put PREFERRED=KDE

True. But it’s not. I kept the install simple, for better or worse. Fedora has it’s own 2Tb SSD all to itself.

That’s a nice idea too. Early in my testing I edited the command line to not blacklist nouveau to see if nvidia was the problem, so I can easily do it again.

Honestly, I feel like I’ve probably passed into the “quest for knowledge” phase where ultimately I’ll have to do the fresh install just to trust the system.

In the spirit of questing for knowledge, why is dnf unable to rollback commits with various “can’t find rpm XXX” errors? Are rollbacks expected to work with the default settings?

Sorry, I don’t know. I rarely use that feature. More often I either use dnf downgrade ... which often reverts the version of the package to the “initial” version that was released with whatever version of Fedora Linux you are running (i.e. the package that is in the fedora repo, not the one that is in the updates repo). Or, sometimes I rollback my entire root file system (I have my system set to make automatic snapshots whenever I reboot and a new kernel has been installed, so I usually have a not-too-old snapshot available to rollback to. I use ZFS).

So this is really interesting. Sway started. I have no idea how to do anything with Sway so I don’t know if it’s fully functional, but pictures were drawn. Which reinforces my guess that it’s something with sddm or something sddm calls, not the DE itself.

Even more interesting, startx actually started KDE as well. I have dim memories of startx from back when distros only installed a console-based system because you were going to have a fun couple of hours editing the XFree mode line and other entertaining stuff before you got X working, but it’s been so long since I ran it that it didn’t even come to mind.

The default hotkey to launch things is Mod-D. Or Mod-Enter should launch a terminal window from which you could launch other programs.

The Mod key can be either the “Start” key or sometimes the “Alt” key. Most of Sway’s configuration can be found in ~/.config/sway/config.

Interesting. Since I’ve started using KDE’s simplistic tiling feature I have considered trying a dedicated tiling WM, but haven’t been motivated enough to try to learn the whole paradigm that comes with it. I didn’t know enough to pick one for any other reason than that I knew Sway s supposed to run correctly under Wayland.