I have several displays and they can either be on or off in any combination. If a display is turned on (any display) the login and/or lock screen need to be available on it.
How can I guarantee this to the best of Plasma’s ability?
addendum: I forgot to mention, it would be nice to customize a particular displays resolution and rotation.
My genuine issue is any display can literally be the main display. I have scripts to help my users set up their displays in real time but these scripts are not accessible from the login/lock screen.
I’m using plasmalogin and it’s fine if not better and faster than SDDM and also fixes an issue SDDM was plagued with in its last days (no users to select, must type in a users name along with password).
I would just like to guarantee that if a display is connected and enabled, the login/lock will always be shown on it. I forgot to mention some displays actually have a rotation other than normal so it would be nice to address that too.
This is actually a long standing annoyance of mine that SDDM does NOT show login on every display. I’ve actually tried some various recommendations/workarounds over the years, as my pc is a small 15" laptop on the corner of my desk furthest away from me, and I use large 50" tv’s as my displays via thunderbolt dock, so when I have to change my session from x11 to wayland in testing or like, I have have to find glasses (or binoculars as I get old) to see the actual login session on the laptop itself. It’s odd as on startup for disk encryption unlock, it will start up my displays to show it on all of them mirrored, but NOT SDDM, instead the extra displays stay black.
i’ve had to add a start up script for X11 to turn off my secondary monitor so that the login only shows on the primary.
from my notes:
# to have only one monitor for login, add the following section to
/etc/sddm.conf
[XDisplay]
# Xsetup script path
# A script to execute when starting the display server
DisplayCommand=/usr/share/sddm/scripts/Xsetup
# edit/create a script file using the name and location specified to add the xrandr command
# this will turn off the portrait monitor only for SDDM login.
sudo nano /usr/share/sddm/scripts/Xsetup
# !/bin/sh
# Xsetup - run as root before the login dialog appears
xrandr --output DisplayPort-2 --off
are you sure you didn’t do this at some point and forgot?
what do you have in /usr/share/sddm/scripts (if anything)?
No, I most certainly would not have purposefully disabled them, as I said quite the contrary, and this has been across a few different arch systems now. Maybe an Arch thing, unsure.
It looks like one entry I had added here in scripts, probably at a recommendation of AI to try to get xrandr to dupe the display out to the others, but didn’t work for me (seeing your config, that might be why actually…). The rest were cookie-cutter sessions for wayland/x.
$ ls /usr/share/sddm/scripts/
wayland-session Xsession Xsetup Xstop
$ cat /etc/sddm.conf
$ cat /etc/sddm.conf.d/kde_settings.conf
[Autologin]
Relogin=false
Session=
User=
[General]
HaltCommand=/usr/bin/systemctl poweroff
RebootCommand=/usr/bin/systemctl reboot
[Theme]
Current=
[Users]
MaximumUid=60513
MinimumUid=1000
$ grep "" /usr/share/sddm/scripts/*
/usr/share/sddm/scripts/Xsetup:#!/bin/sh
/usr/share/sddm/scripts/Xsetup:# Xsetup - run as root before the login dialog appears
/usr/share/sddm/scripts/Xsetup:
/usr/share/sddm/scripts/Xsetup:# Wait for outputs to appear
/usr/share/sddm/scripts/Xsetup:sleep 1
/usr/share/sddm/scripts/Xsetup:
/usr/share/sddm/scripts/Xsetup:# Detect all connected displays and mirror them
/usr/share/sddm/scripts/Xsetup:PRIMARY=$(xrandr | awk '/ connected primary/ {print $1}')
/usr/share/sddm/scripts/Xsetup:for DISP in $(xrandr | awk '/ connected/ {print $1}'); do
/usr/share/sddm/scripts/Xsetup: if [ "$DISP" != "$PRIMARY" ]; then
/usr/share/sddm/scripts/Xsetup: xrandr --output "$DISP" --auto --same-as "$PRIMARY"
/usr/share/sddm/scripts/Xsetup: fi
/usr/share/sddm/scripts/Xsetup:done
Sorry, I just omitted the rest as they looked cookie-cutter stock arch and nothing related to enabling or disabling the displays - only that one. I can post the rest if you really want to see. No other complaints with SDDM so it works fine otherwise.
I didn’t know the script needed explicit calling (neither did ai apparently). I suppose at the time I figured anything in there got read so I didn’t question it much, and I reset infrequently to test it immediately or care enough to try something else after.
I did add your bit to a sddm.conf.d file for that, next time I reboot/update I’ll see if I’m pleasantly surprised to see it work finally. It’s a small annoyance to go out of my way to figure out, but I thought it odd others have a different default experience to mention it.
I can rely on AI or I can rely on 30 posts with 30 answers between stackoverflow, reddit, here, or in between and still not find a clear answer. These days I have better luck with AI.