SDDM Login Multi Screen

NOTE: This config was created under Linux KDE Neon:

Operating System: KDE neon User Edition
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.1
Kernel Version: 6.14.0-27-generic (64-bit)
Graphics Platform: Wayland
Processors: 20 × 12th Gen Intel® Core™ i7-12700H
Memory: 64 GiB of RAM (62.5 GiB usable)
Graphics Processor 1: Intel® Iris® Xe Graphics
Graphics Processor 2: NVIDIA GeForce RTX 3050 Laptop GPU
Manufacturer: Dell Inc.
Product Name: XPS 15 9520

For this setup, I will have the Laptop screen, plus two additional 34” screens, with the second one positioned vertically.

Extract the Details

  1. First of all, switch to Xorg log in from SDDM, and run the following commands to extract the details (Don’t run them from the Wayland session because from this one, the details won’t be correct):
xrandr | grep -w connected
xrandr --listmonitors

NOTE: More information in the following link at Login session appears on an unexpected display session:

Xsetup Config File

  1. From KDE System SettingsDisplay Configuration, click on Edit Arrangement, to position the screens. Move them as expected.

  1. Click and hold each of them one by one to extract its final position. In this case, the exact position for the laptop screen is 0x1203as shown in the following image.

  1. Use the above details to create the lines for the config file, and add them to the file /usr/share/sddm/scripts/Xsetup
# SDDM Login session
intern=eDP-1
extern1=DP-2-1
extern2=DP-2-2

xrandr --output $intern --primary --mode 1920x1200 --pos 0x1203 --rotate normal \
       --output $extern1 --noprimary --mode 3440x1440 --pos 1920x1122 --rotate normal \
       --output $extern2 --noprimary --mode 3440x1440 --pos 5360x0 --rotate right
  1. Finally, restart SDDM or reboot the machine to confirm the changes.

SDDM Login Only on One Screen

With the above fix, we could see the SDDM log in correctly positioned with all three screens. Also, if you want to see the log in only in one of them, you could use the following example instead:

# SDDM Login session
intern=eDP-1
extern1=DP-2-1
extern2=DP-2-2

xrandr --output $intern --primary --mode 1920x1200 --pos 0x0 --rotate normal \
       --output $extern1 --noprimary --off \
       --output $extern2 --noprimary --off

I hope all the above helps others! :smiling_face_with_sunglasses:

4 Likes

You should be able to do similar things with SDDM, if this is running using a Wayland session itself, and using kscreen-doctor, perhaps even in x11 as well.

I only have two monitors, in a plain generic setup, and I got SDDM to show only on the right-side screen by simply setting things up by temporarily disabling my left screen, then using the “apply plasma settings” option.

I’d have assumed it was editing/creating the sddm startup scripts, but I don’t see evidence of this, or rather I am not looking at the correct files.

I had success in the past iirc by editing /usr/share/sddm/scripts/wayland-session (or was it the files in /etc?) in the past, but I am not 100% sure – it was a while ago, and I don’t have that machine any longer.

The same thing that i would had suggested, but that maybe only works if you (or your distro) set up SDDM to use wayland and not X11. The wayland /etc/sddm.conf.d/10-wayland.conf section of the mentioned SDDM Archwiki.
At least for me as I tried different stuff mentioned in the Archwiki when setting up my machine roundabout a year ago xrandr had done exactly nothing anymore and “apply plasma settings” was my only way to go after switching SDDM itself to wayland.

I forgot to mention in my initial post that if we want to continue using the Wayland platform, we will need to switch back to it from the SDDM login that we already configured with that procedure.

I use Wayland in Neon, and I just set SDDM scripts “Xsetup” to turn off the other monitors so the login screen is only on the visible screen. After login Wayland handles the screens. Seems to work and is a lot simpler than messing with wayland.conf.

Thank you very much.

Really useful.

Now I have just my main monitor to login.