#!/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.
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.
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
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
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.
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.