Hello Everyone,
I am running Kubuntu (KDE Wayland Session) and am experiencing some unexpected behavior with the login screen. Namely, when I try to login, both monitors have a duplicated login screen and the option for text is always in the incorrect secondary monitor. What I am trying to do is disable the secondary monitor on login.
I’ve tried a few things to fix this. The most common suggestion that I see is trying to fix this through Xsetup following the suggestions mentioned in this topic…
I tried first just adding some prompts to the Xsetup file located for me here…
/usr/share/sddm/scripts/Xsetup
For me, xrandr | grep " connected " | awk ‘{ print$1 }’ returns the following for my monitors…
DP-1 (This is the primary monitor.)
HDMI-A-2 (This is the secondary monitor.)
So the start of my Xsetup file looks like this…
#!/bin/bash
#Xsetup - run as root before the login dialog appears
xrandr --output DP-1 --primary
xrandr --output HDMI-A-2 --off
I tried this and nothing changes when restarting the Desktop. I have also tried adding --auto to the DP-1 part of the xrandr command, but no luck.
Referring again to…
The solution appeared to be to fill out /etc/sddm.conf. This was done via doing what is described here.
So I figured it out finally–for some reason,
/etc/sddm.conf
was completely empty. Even with applying plasma settings and whatnot, it just wasn’t getting written over. What I had to do instead was generate an example config usingsddm --example-config
, paste that into the previously mentioned conf file, then go to/etc/sddm.conf.d/kde_settings.conf
and copy its settings manually into the/etc/sddm.conf
. So it turns out that my initial script actually does work, it’s just that since the conf was blank for seemingly no reason, there was no “DisplayCommand
” to be had, making SDDM ignore it and every other thing I tried to set up.
Perhaps most relevantly, this needed to be present inside /etc/sddm.conf…
[X11]
#Path to a script to execute when starting the display server
DisplayCommand=/usr/share/sddm/scripts/Xsetup
So I set up the /etc/sddm.conf as described…and nothing changes. The secondary monitor still is on and the option for text is still in the secondary monitor.
I am not sure what I am doing incorrectly. Maybe or maybe not Wayland has a different solution for this different than xrandr, although I haven’t found any luck looking into this. Does anyone have any ideas for how to get the secondary monitor to not be open at the login screen?