SDDM and AMD + NVIDIA GPU

Hello
I had posted for “Boot and Nvidia install problems”.
Solution was found with enable dGPU for display mode in the bios.

But it was not a very good solution : too much energy is used in this mode.

As i had a black screen WITH mouse at the screen login, i have enabled GDM with reboot and change the display mode to DYNAMIC.

Now i can have the screen login but only for Gnome.
I can’t login in KDE.
I use AMD GPU integrated in the processor and, on selecting a game (tuxracer) with right click, i have now the choice to select my Nvidia graphic card.
That work fine.

It seems it’s a problem with SDDM and i can’t log to KDE.

Has anyone a solution ?

Assuming that drivers are working etc. (which is reasonable since Gnome works), there are two ways in KDE to start a program on the discrete GPU:

  • open a terminal and issue, for instance, switcherooctl firefox
  • right click on the app icon, then “Edit Application…”, in the “Advanced” tab check “Run using dedicated graphics card” then save; from now on the app should start using the discrete GPU.

That assumes that you can at least login with SDDM to the Plasma desktop, as it does here, but I have an “Optimus” setup with Intel + Nvidia and that might make a difference.

@OrsoBruno
No, SDDM does NOT work.
That’s the problem. Why

Only GDM works

XDM, no !
SDDM, no !

Does GDM offer to login to a Plasma (Wayland) session?

@OrsoBruno

That’s the problem : no.

For your information, i’m writing the same question on KDE Discuss.
If i have an answer, i will give here the result.

Exist another login manager for KDE only ?

Back in the days lightdm logged in to them all, but desktops are becoming increasingly picky with the display manager these days…
I’m not a regular KDE user and as written a test install of mine works as described, so likely something in your “exotic” configuration is at play.

@OrsoBruno
Please let me know if I’m thinking along the wrong lines.

If everything works with GDM, that means the current graphics driver (integrated AMD) is being used correctly and isn’t conflicting with the NVIDIA driver.

Is it possible that SDDM is loading the NVIDIA driver whilst using the current graphics card (integrated AMD), and that this is causing a conflict?

And so SDDM isn’t able to find the correct graphics hardware AMD integrated ?

Could it be that SDDM is looking for the AMD graphics driver, which isn’t installed – as there’s no dedicated AMD graphics card (I assume this is the xf86-video-amdgpu package)?

However, GNOME works without this package being installed, and I don’t know which graphics driver is being used by the integrated AMD GPU.

Yes, current Gnome and GDM are pure Wayland and they don’t need any xf86- package, they don’t need any Xorg package really.
There should be a way to have SDDM running on Wayland as well, but apparently that is not yet the default option.
Wait for a regular KDE user to chime in, there should be plenty hanging around here…

There are some GDM issues with the change to dynamic user. There is an open bug report on a forum thread about GDM settings.

@OrsoBruno @malcolmlewis

On KDE Discuss, a user suggest me this :

on tumbleweed first thing I’d try is force SDDM onto X11 for a bit. drop a file in /etc/sddm.conf.d/ with:


[General]
DisplayServer=x11

reboot with DYNAMIC back on. if the greeter comes up you can still pick a Plasma Wayland session after login.

also make sure you’re on the openSUSE nvidia packages (not a random .run) and nvidia_drm.modeset=1 is on the cmdline. if X11 greeter still blacks out, check /var/log/Xorg.0.log right after for which PCI id it bound.

But this give nothing : SDDM has only option for Wayland and Gnome for me.

I suppose the reason is why X11 is not installed
Here a print screen of my myrlyn screen

But if it is needed to install X11, it’s a problem : there is no X11-video-nvidiaG07 !

I would do the following, someone else can sanity check this:

  • boot with systemd.unit=multi-user.target
  • systemctl start sshd
  • connect to the system from another computer over ssh
  • run journalctl -f and dmesg -w in two terminal windows over ssh
  • systemctl start sddm
  • observe output
  • systemctl stop sddm
  • post logs

If you don’t have a second pc, you could use journalctl -f/dmesg -w and pipe them into tee ~/journal(or dmesg)-log.txt and then do something like sudo systemctl start sddm;sleep 10; sudo systemctl stop sddm

(The idea being that if you can’t close SDDM and have to hard reset, you’ll likely lose your journal logs).

With no logs, it’s hard to diagnose anything.

@Shortwave8115
Thanks for yor help.
Buti’m not an advanced user to use ssh.
For the moment, i have a dekstop and a this laptop and no cable to connect them.

And I’m a little confused by the commands you’re giving.

So I’m going with the “no second PC” option.

Should I run the command “journalctl -f > journal-log.txt” with the BIOS display mode set to “DYNAMIC” the first time (using SDDM or GDM), and then run it again with the BIOS display mode set to “dGPU” the second time?

How do I enter this command: “sudo systemctl start sddm;sleep 10”?

The first part is simple, but what about the part after the semicolon?

At that point, I’ll have a black screen and no way to type the rest of the command.

@Shortwave8115
Solution to make simple : boot in DYNAMIC mode display with GDM.
In Gnome, in Terminal, run “systemctl isolate multi-user.target” then use your command “sudo systemctl start sddm” (but how write the second term “sleep 10” ?)

I suppose i can after this write “journalctl -f > journal-log.txt”.

Is this correct for you ?

Sorry, I wasn’t sure how comfortable you were in the terminal. The semicolon separates commands so they execute in sequence, so echo hello;sleep 2;echo goodbye will print hello to the display, wait two seconds, and then print goodbye, you can try it in Konsole and see if you like.

Can you reboot even with a black screen or do you have to hard power off? If you can reboot, this isn’t necessary and you can just reboot and type “sudo journalctl -b 1 > ~/boot-log.log” into the terminal and it will dump the last boot log to a text file.

@Shortwave8115
No only hard power off.

That’s why i suggest to use Gnome then Terminal

Also if you just want to get into plasma after logging in through TTY:

/usr/libexec/plasma-dbus-run-session-if-needed /usr/bin/startplasma-wayland

(This is the same command that SDDM executes to put you into a wayland plasma session, you can verify this by going to /usr/share/wayland-sessions/ and looking at the Exec= line in the .desktop files that are there).

@Shortwave8115

I will proof this command in TTY to see if plasma run.
But i will have a working SDDM as the laptop can be used by other user.

Please correct me if I’m wrong.

I reboot.

In the BIOS, I select DYNAMIC + F10.

I log into GNOME via GDM, then press CTRL+ALT+F4 and enter the command “sudo systemctl isolate multi-user.target”.

I log in as root, then run the command “sudo systemctl start sddm; sleep 10; sudo systemctl stop sddm.”

Back at the command line, I run “journalctl -f > journal-log.txt.”

Do you agree with this?

If you’re going to run journalctl afterwards, use -b 0 and not -f, the f flag follows the log live, so it won’t pick up what you executed before.

You don’t need to log in as root, just use your normal use with sudo.

You don’t also need to do anything with isolate and gdm, you can press e in the boot menu and add systemd.unit=multi-user.target as a kernel parameter (I assume you’re using systemd boot) and then you’ll load straight into a TTY.

@Shortwave8115

I have make 1 think : “sudo systemctl start sddm; sleep 10; sudo systemctl stop sddm.”

Surprise, SDDM displayed the login screen for 10 seconds.

However, I get a black screen with just the mouse cursor when I simply boot up.

Is SDDM even your default display manager?

systemctl show display-manager.service