SDDM Triple Monitor Setup Help

Hey guys

Relatively new to Linux, I’ve got a 3 monitor setup. And I can’t seem to figure out how to get my login on one screen only at boot and lock screen.

I’ve tried editing: /usr/share/sddm/scripts/Xsetup

to reflect my setup as follows:

#!/bin/sh
# Xsetup - run as root before the login dialog appears

xrandr --output DP-2 --primary --auto
xrandr --output DP-1 --off
xrandr --output HDMI-A-1 --off

To no avail

I’ve restarted the sddm service a few times, done multiple reboots, and have also tried rearranging the order at which the script executes the commands. (turning off my 2nd and 3rd monitor before running the primary)

But nothing seems to work. I’ve also read every suggested topic that popped up as a suggestion when I went to create this post, but again, nothing helped. In fact, this script was the fix for a few others, but doesn’t seem to work for me.

Am I missing something? Any help greatly, greatly appreciated.

Hey!

I got it fixed. Here’s what I did for anyone with a similar issue in the future.

It may be common knowledge to most, but for the newbies out there like myself, x11 and wayland see your displays differently.

When you run:

xrandr --query

or

kscreen-doctor -o

in a wayland session, it will output different names than an X11 session would.

So adjusting the script in /usr/share/sddm/scripts/Xsetup will not work because x11 won’t recognize the displays the same way.

To figure out what x11 sees, so I can adjust the script accordingly, I had the script produce a log of what x11 is seeing so I can fix the naming issue.

sudo nano /usr/share/sddm/scripts/Xsetup

Replaced whatever was there with:

#!/bin/sh
/usr/bin/xrandr > /var/log/sddm-xrandr.log 2>&1

Saved, exited, made it executable:


sudo chmod +x /usr/share/sddm/scripts/Xsetup

Rebooted

Checked the log with:

cat /var/log/sddm-xrandr.log

And noticed that 2 of my 3 monitors had entirely different names than what was showing from the earlier commands.

I then rewrote the script to reflect the correct display names as per x11 and it worked! Hope this helps anyone running into the same issue I had!

4 Likes

That’s awesome! I’ll give this a shot to see if it will fix my dock/monitor weirdness.

1 Like

Good luck! Hope it helps!

Sadly, this did not fix my unique problem. But glad it fixed yours and maybe this will help others.

1 Like

Thank you, @kickstand! It works perfectly with my dual monitor setup as well.

In my case, I don’t need to run chmod +x since the script already has the necessary permissions.

1 Like

No problem! I did realize later that when I lock the screen from the DE, it still displays on all 3 monitors. I haven’t had time to dig into it yet though since solving the SDDM issue. But atleast on boot the login is only on one now

Have you played around with the lockscreen displays yet? If you’ve got any pointers for figuring that out, you’d save me some time when I get home haha

Sorry dude!

I’m still trying to figure out why EnOS has a different login screen to the lock screen backgrounds. :smiley:

Me too. I’d like to have a package that manages both the login and lock screen. Seems a little silly to have to jump through hoops twice to solve the same issue

Found it. The SDDM setting (under Colors & Themes) controls the session log in screen wallpaper, and the KDE setting (Security & Privacy → Screen Locking → Configure Appearance) controls the lock screen wallpaper. More info here: https://discuss.kde.org/t/changing-lockscreen-and-wallpaper-on-plasma-6/12267/2

1 Like

Same here, I haven’t got a chance to look into it yet.

For whatever it is worth I might also mention that the scenario illustrated in the original post here does hinge on SDDM using the xorg backend (and that the desktop session is wayland - which could have easily been switched at login) - some systems may have configured this otherwise and/or the default may change in the future.
If SDDM is using the wayland backend then the displays should not have some sort of mismatch sue to the different graphical stack. But also then you probably would want to use something like wlr-randr rather than xrandr.

1 Like

Hm. This seems to be just to set the theme of the wallpaper. I can’t see anywhere in that section of the settings that adjusts which monitors the lock screen is displayed on.

That is correct yes.

Will look into wlr-randr

Appreciate the insight! Hope it helps anyone else seeking answers

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.