Configuring SDDM where you have multiple displays/graphics cards


Pretty sure this issue here is due to having dual graphics cards. In this case it turned into an issue since my laptop has dual graphics and the SDDM login manager only displayed to the external displays via the nivida GPU. So whenever I disconnected my external displays it did not switch to the build-in display.

So what you can do to fix this is first get a list of displays. You can run the following for that.

# xrandr --listmonitors

This is output something like

Monitors: 3
0: +*eDP-1-1 1920/344x1080/193+302+1440  eDP-1-1
1: +DP-1 2560/527x1440/296+0+0  DP-1
2: +HDMI-0 2560/527x1440/296+2560+0  HDMI-0

Next find the DisplayCommand directive in /usr/local/etc/sddm.conf. In my case it is

DisplayCommand=/usr/local/share/sddm/scripts/Xsetup

Now to edit the file /usr/local/share/sddm/scripts/Xsetup using the below command

sudo vi /usr/local/share/sddm/scripts/Xsetup

What works for me is to enable the laptop display and turn off the others. You don't need to login screen on anything other than the built in display. Unless of course you run your laptop in clamshell mode, which I don't

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

xrandr --output eDP-1-1 --primary --auto
xrandr --output DP-1 --off
xrandr --output HDMI-0 --off

Now that you've updated the file you can restart sddm. First go to a virtual terminal via something like the following CTRL+ALT+F2, then

sudo service sddm restart