What steps do I have to take to have start into KDE on boot?

After upgrading to 9.3 I had issues that KDE won’t work anymore. I got that solved. But now when Rocky boots I end up with just a blinking cursor. I can switch to a console via Alt-F2, login and start KDE with startx.
So I know that KDE is working. I can also access the system remotely via cockpit. My question is now: What needs to be done to boot directly to the KDE login screen? I’m not totally new to Linux, but it’s been quiet a while that I played with the penguin. :wink:
Thanks for any and all replies.

Good morning, from the console try sudo systemctl set-default graphical.target as long as you have a display manager installed such as sddm or gdm you will be able to login to a graphical interface, otherwise try sudo dnf install gdm and select your favourite desktop environment, such as KDE Plasma. It would normally remember your choice so if Plasma is the only DE installed or is it the one you used last it will always preselect that one for your user.

You can also check your current settings with this command:

 sudo systemctl | grep -i display; sudo systemctl get-default

And if successful it should return something like this:

 gdm.service         loaded active running   GNOME Display Manager
graphical.target

The system should start a display manager. The default is GDM, but there are some alternatives (lightdm, sddm) in EPEL.

The dm is graphical, shows “login dialog”, and then starts a session for user.
The session could be, GNOME, GNOME Classic, KDE, MATE … depending on what is installed.
The session might use Wayland or X11 to render the windows.

Obviously, the dm GUI is drawn too, probably with Wayland or X11.
The “black screen with cursor” means that even drawing the dm fails.
Quite often the update has not included matching drivers for the GPU, or fails to load them.

You wrote that you had issues, but got them “solved”. Yet you still have issue …
Perhaps, if you tell what you had and what you did, then somebody can help more.


Disclaimer: I don’t use KDE.

First I want to thank y’all for the input.

that will bring this result:
sddm.service loaded active running Simple Desktop Display Manager graphical.target

so it looks like sddm is loaded and running, but I still don’t have the grafical login screen on “F1”
console on “F2” works and when I login there I can start KDE via startx.
So I think it’s caused by an unmatched or not loaded driver. I run an Nvidia board and got the latest Linux drivers from the Nvidia website.
Before I get to the “black screen with cursor” I do have a “grafical screen” with three little squares in the center of the screen. So it seems that Rocky tries to load the DM but fails to load the driver or that it loads the wrong driver fore the grafics board.
On the other hand when I switch with F2 to the console, login and startx it starts now gdm since I executed sudo dnf install gdm.

But there I can open the Nvidia Settings and they tell me under System Information the OS: Linux-x86_64, the NVIDIA Driver Version: 545.29.02 and the NVML Version: 12.545.29.02
The GPU is a Quadro K2200.

This could be the problem. It’s recommended not to use the drivers direct from NVidia. Better is to use the rpmfusion repositories to install the drivers for NVidia.

https://rpmfusion.org/Howto/NVIDIA#Current_GeForce.2FQuadro.2FTesla

NVidia offers drivers in two formats: the *.run executable, and the RPM packages (via their CUDA repo).
The *.run is definitely not recommended as it bypasses package management,
but does the recommendation really cover the RPM version too?

I don’t personally use them, I don’t have an nvidia card, but the team have seen a lot of problems and usually recommend the rpmforge ones because they just seem to work. Whether nvidia’s rpm versions are different, no idea.

IME, they don’t have huge issues. We do use CUDA too and ignoring driver packages that are in same repo as the CUDA packages would be more hassle (although in el7 era we did use driver packages from ELRepo …).

It is possible that RPMFusion packages (at least used to) are “better” at install, e.g. in update of kernel options, etc. However, repackaging the binary blob from NVidia can hardly make a better kmod binary.


If it does not show up, then it does not run correctly. One can see more about a service with:

sudo systemctl status sddm.service
sudo journalctl -u sddm.service

Hi there! Thank you for the feedback!

I’d recommend that you use only one display manager. If you want to keep gdm,
do

sudo systemctl disable sddm; sudo systemctl stop sddm; sudo systemctl enable gdm; sudo systemctl start gdm

As per the NVIDIA driver it could very well be the case.

I’d suggest a few things but do them at your own risk:

  1. Check you do not have nouveau driver blacklisted
cd /etc/modprobe.d/ 

Look for any of the present configs if there is any one related to nouveau and remove them so the default graphic driver is not disabled anymore.

Then add the rpmfusion and EPEL repositories to your distro if you haven’t

sudo dnf install --nogpgcheck https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm -E %rhel).noarch.rpm
sudo dnf install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %rhel).noarch.rpm

Notice EPEL is required for RPMFusion to work, and it includes free and non-free releases.
PS: I don’t like the --nogpgcheck argument but its taken from their official page instructions
HERE: Configuration - RPM Fusion
Their driver seems to be the best choice for All of these systems.
Instructions to install NVIDIA drivers from RPMFusion: https://rpmfusion.org/Howto/NVIDIA#Installing_the_drivers

Once you are done, do blacklist nouveau since you won’t need it anymore.

Please let us know if you have any questions so we can guide you further!

Regards,

Alexia.

Ok, I did first what jlehtone recommended:
sudo systemctl status sddm.service
sudo journalctl -u sddm.service
it showed that sddm was running.
Then I tried alexias recommendation to switch to gdm.
Now I get the grafical login screen BUT after login I end up in GNOME. :smiley:
I do see in the Application listing of GNOME the KDE programs and they start just fine.
So it seems that I have a “mixed reality” of GNOME and KDE and GNOME is dominant.
I do had my Rocky boot into the KDE login screen and would like to get to that point again.
The drivers seem to work, for now, since I can open the NVIDIA settings via the shortcut in the applications.
Y’all are awesome :+1:

On a side note I installed the NVIDIA drivers via the .run script

When you are at the login screen and have entered/selected your username – but before typing password – there should be a cog-wheel somewhere and that opens a list of desktop managers.

If you select non-default DE there (e.g. KDE, Gnome with X11, etc), then system should remember the choice also on following logins.


Yes, that is bad practice.

When we install RPM package, the system knows what files are involved. It also knows whether install would overwrite (or removal delete) files needed by other packages. The .run script does not tell package manager what it does, nor care if other files are overwritten.

For example, script replaces a file that is from package. That might be ok, if only the NVidia driver uses that file. Later, that package is updated, which overwrites the NVidia version of file as package manager does not know about the NVidia stuff. Then driver would fail, as “its” file was replaced.


Rocky does provide package epel-release that you can install with

sudo dnf install epel-release

That is good not to like. EPEL does have a package that contains various GPG keys, including the RPMFusion keys. One could install package and import the key. Then DNF can verify the very first packages from RPMFusion.