I keep trying to pass SDDM commands

So I’m assuming that my issue is going to be simple, and i simply do not have enough Linux beard yet.

I’m trying to configure the very first login screen after boot, and lock screens too TBH, on my desktop. I’m running KDE Plasma, X11, and SDDM.

i have two displays. on the left, a portrait mode 1440p display. on the right, a 1080p ultrawide, no rotation (Because an ultrawide on its side is a LOT of website.)

I can’t seem to get any xrandr commands to kick off.

My sddm.conf looks thus:

 [XDisplay]
 DisplayCommand=/usr/share/sddm/scripts/Xsetup
 
 [General]
 Numlock=on

and my Xsetup, thus:

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

xrandr --output HDMI-0 --mode 1440x2560 --pos 0x0 --roate l --output HDMI-1 --mode 2560x1080 --pos 1440x994 --roate normal

The xrandr command isn’t being sent, and my monitors are reversed (hdmi1 on the left, HDMI2 on the right), plus my 1440p display not in portrait mode.

For now, I’m just trying to make the login screen not sideways. Ultimately, I’d like the login and lock screens to ONLY display on HDMI1, with HDMI0 just being blank or black.

xrandr output here as well, in case it’s needed:

Screen 0: minimum 8 x 8, current 4000 x 2560, maximum 32767 x 32767
HDMI-0 connected 1440x2560+0+0 left (normal left inverted right x axis y axis) 597mm x 336mm
   2560x1440     59.95*+
   1920x1080     60.00    59.94    50.00  
   1680x1050     59.95  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    59.94    59.93  
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 connected primary 2560x1080+1440+994 (normal left inverted right x axis y axis) 690mm x 291mm
   2560x1080     60.00*+ 144.00   120.00    75.00  
   1920x1080    119.88    60.00    59.94    50.00  
   1680x1050     59.95  
   1440x900      59.89  
   1280x1080     60.00  
   1280x1024     75.02    60.02  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    59.94    59.93  
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)

If someone could help, I’d very much appreciate it.

We have a few things to comment WRT the info you have given :slightly_smiling_face: .

The xrandr command has mistakes/typos. Is it copy-pasted, or were the errors only in this post? Generally, it is a good practice to first test the command in a terminal, to verify it is working as intended, and check for error messages, so you can correct it.

Did you mean --rotate left ?? Please, read man xrandr. Also test --orientation <rotation> that might be more convenient.

SDDM works with system configuration (Xorg kernel/systemd). It is possible that monitor Xorg names and configuration change, during boot process. This is expected/known.

Typo? This section name is [X11] Read man sddm.conf.

What is the exact path of the file and did it exist already, or have you created it?
Standard/suggested path in Archlinux (and Plasma) is /etc/sddm.conf.d/*.conf (any file name with extension .conf). Any such files in this path are read and used by SDDM.

Login screen (SDDM), as explained, uses system configuration, while the Lock screen (Plasma session locker) uses user session/Plasma configuration. You might succeed with your SDDM preference, but, for the Locker, IMHO it is not possible, but I may be wrong.

About Xsetup script, it is a bash script, and any output is usually printed in the journal.
You may search the journal for xrandr error messages, using journalctl -b -g "HDMI|xrandr".
You may even add some debugging commands in the script, to help you investigate.
For example, I have added this before the actual xrandr command in my relevant script:

echo "Running: xrandr --listmonitors"
xrandr --listmonitors

More tips at Archwiki Multihead and SDDM .

An easy way to find the desired xrandr command, is to use arandr (install with pacman), set up the monitors as you like and select Save configuration to a file. That file will contain the xrandr command to apply the selected monitor configuration :wink: .

1 Like

Hi! thanks for the response! :slight_smile:

The xrandr command has mistakes/typos.

Whelp, that would by my dislexia/disphasia,and not so great vision. let me go fix that. lmao.

Please, read man xrandr.

Holy crap, that is SO much better than -help! wow!

This section name is [X11] Read man sddm.conf

That was from a website. don’t remember the exact source, thanks for the correction.
Now that i think about it, Xdisplay may have been in the SDDM.conf file to begin with. Uncertain.

What is the exact path of the file and did it exist already, or have you created it?

So i was under the impression i was working on /etc/sddm.conf.d/sddm.conf, but apparantly it was /etc/sddm.conf. it existed already. there is a /etc/sddm.conf.d/kde_settings.conf. I’ve added to that file, now, as well.

Poking around, will respond again after further experimentation. thanks for getting back to me here :smiley:

I suggest you revert the modification to that specific file and create a new file with your settings (save it in the same folder), because that specific file is modified by Plasma, when you do modifications for SDDM/Login screen in System Settings. The result is the same.

Huh. thank you, Will do.

So far, no change in monitor stupidity lol

Edit: AYY! things be going better so far. my portrait monitor is the correct orientation now.

The login screen still looks horrible on a portrait monitor, but, progress!

Suggestions for deactivating one display during boot/login, then reactivating at the desktop?