SDDM: Difference between revisions

From ArchWiki
m (→‎SDDM loads only US keyboard layout: examples are provided elsewhere)
(An important parameter is missing in the configuration. Without specifying DisplayServer=wayland − SDDM works under X11.)
 
(111 intermediate revisions by 51 users not shown)
Line 1: Line 1:
[[Category:KDE]]
[[Category:KDE]]
[[Category:Display managers]]
[[Category:Display managers]]
[[de:Login-Manager#SDDM]]
[[fr:SDDM]]
[[fr:SDDM]]
[[ja:SDDM]]
[[ja:SDDM]]
Line 9: Line 10:
{{Related|KDE}}
{{Related|KDE}}
{{Related articles end}}
{{Related articles end}}
The [https://github.com/sddm/sddm/ Simple Desktop Display Manager] (SDDM) is the preferred [[display manager]] for [[KDE]] Plasma desktop.  
The [https://github.com/sddm/sddm/ Simple Desktop Display Manager] (SDDM) is a [[display manager]]. It is the recommended display manager for the [[KDE]] Plasma and [[LXQt]] desktop environments.


From [[Wikipedia:Simple Desktop Display Manager]]:
From [[Wikipedia:Simple Desktop Display Manager]]:


:Simple Desktop Display Manager (SDDM) is a display manager (a graphical login program) for X11 and Wayland windowing systems. SDDM was written from scratch in C++11 and supports theming via QML. KDE chose SDDM to be the successor of the KDE Display Manager for KDE Plasma 5.
:Simple Desktop Display Manager (SDDM) is a display manager (a graphical login program and session manager) for the X11 and Wayland windowing systems. SDDM was written from scratch in C++11 and supports theming via QML.


{{Note|The Wayland windowing system is not yet fully supported [https://github.com/sddm/sddm/issues/440]. Wayland sessions are listed, but SDDM runs on X11.}}
The [[KDE]] development team has [https://invent.kde.org/plasma/plasma-desktop/-/issues/91 accepted a proposal] to incorporate the SDDM project into the Plasma Desktop project. SDDM will be an official part of Plasma and updates will likely be pushed alongside Plasma Desktop updates.
 
{{Note|As of SDDM version 0.20, [[Wayland]] sessions are listed and can be started from SDDM, but the SDDM greeter itself still runs in X11 mode by default, although an experimental Wayland greeter [[#Wayland|can be enabled]].}}


== Installation ==
== Installation ==


[[Install]] the {{Pkg|sddm}} package. Optionally install {{Pkg|sddm-kcm}} for the [[KDE#KCM|KDE Config Module]].
[[Install]] the {{Pkg|sddm}} package. Optionally install {{Pkg|sddm-kcm}} for the [[KDE#KCM|KConfig Module]].


Follow [[Display manager#Loading the display manager]] to start SDDM at boot.
Follow [[Display manager#Loading the display manager]] to start SDDM at boot.
Line 27: Line 30:
The default configuration file for SDDM can be found at {{ic|/usr/lib/sddm/sddm.conf.d/default.conf}}. For any changes, create configuration file(s) in {{ic|/etc/sddm.conf.d/}}. See {{man|5|sddm.conf}} for all options.
The default configuration file for SDDM can be found at {{ic|/usr/lib/sddm/sddm.conf.d/default.conf}}. For any changes, create configuration file(s) in {{ic|/etc/sddm.conf.d/}}. See {{man|5|sddm.conf}} for all options.


The  {{pkg|sddm-kcm}} package (included in the {{grp|plasma}} group) provides a GUI to configure SDDM in Plasma's system settings. There is also a [[Qt]]-based {{AUR|sddm-config-editor-git}} available in the [[AUR]].
The  {{pkg|sddm-kcm}} package (included in the {{grp|plasma}} group) provides a GUI to configure SDDM in Plasma's system settings. There is also a [[Qt]]-based {{AUR|sddm-conf-git}} available.


Everything should work out of the box, since Arch Linux uses [[systemd]] and SDDM defaults to using {{ic|systemd-logind}} for session management.
Everything should work out of the box, since Arch Linux uses [[systemd]] and SDDM defaults to using {{ic|systemd-logind}} for session management.
Line 38: Line 41:
[Autologin]
[Autologin]
User=john
User=john
Session=plasma.desktop
Session=plasma
}}
}}


Line 45: Line 48:
An option to autologin into KDE Plasma while simultaneously locking the session is not available [https://github.com/sddm/sddm/issues/306]
An option to autologin into KDE Plasma while simultaneously locking the session is not available [https://github.com/sddm/sddm/issues/306]


You can add a script that activates the screensaver of KDE to the autostart as a workaround:
You can add a script that activates the screensaver of Plasma to the autostart as a workaround:


  #!/bin/sh
  #!/bin/sh
  /usr/bin/dbus-send --session --type=method_call --dest=org.freedesktop.ScreenSaver /ScreenSaver org.freedesktop.ScreenSaver.Lock &
  /usr/bin/dbus-send --session --type=method_call --dest=org.freedesktop.ScreenSaver /ScreenSaver org.freedesktop.ScreenSaver.Lock &
=== Passwordless login ===
It is possible to configure SDDM to allow logging into some accounts without a password. This differs from automatic login in that the user still has to choose which account to log into, and it differs from simply setting the account password to the empty string in that it only allows interactive users to log in (and not, for example, remote users logged in via [[SSH]]).
To set this up you can follow the [[LightDM#Enabling interactive passwordless login|instructions for LightDM]], except you will need to change {{ic|/etc/pam.d/sddm}} instead of {{ic|/etc/pam.d/lightdm}}.


=== Unlock KDE Wallet automatically on login ===
=== Unlock KDE Wallet automatically on login ===
Line 69: Line 78:


The default SDDM theme directory is {{ic|/usr/share/sddm/themes/}}. You can add your custom made themes to that directory under a separate subdirectory. Note that SDDM requires these subdirectory names to be the same as the theme names. Study the files installed to modify or create your own theme.
The default SDDM theme directory is {{ic|/usr/share/sddm/themes/}}. You can add your custom made themes to that directory under a separate subdirectory. Note that SDDM requires these subdirectory names to be the same as the theme names. Study the files installed to modify or create your own theme.
==== Customizing a theme ====
To override settings in the {{ic|theme.conf}} configuration file, create a custom {{ic|theme.conf.user}} file in the same directory. For example, to change the theme's background:
{{hc|head=/usr/share/sddm/themes/''name''/theme.conf.user|output=
[General]
background=''/path/to/background.png''
}}


==== Testing (previewing) a theme ====
==== Testing (previewing) a theme ====
Line 74: Line 92:
You can preview an SDDM theme if needed. This is especially helpful if you are not sure how the theme would look if selected or just edited a theme and want to see how it would look without logging out. You can run something like this:
You can preview an SDDM theme if needed. This is especially helpful if you are not sure how the theme would look if selected or just edited a theme and want to see how it would look without logging out. You can run something like this:


  $ sddm-greeter --test-mode --theme /usr/share/sddm/themes/breeze
  $ sddm-greeter-qt6 --test-mode --theme /usr/share/sddm/themes/breeze


This should open a new window for every monitor you have connected and show a preview of the theme.
This should open a new window for every monitor you have connected and show a preview of the theme.
Line 87: Line 105:


==== User icon (avatar) ====
==== User icon (avatar) ====
{{Out of date|SDDM detects icons in {{ic|/var/lib/AccountsService/icons/}} without configuration and Plasma no longer creates the files in {{ic|$HOME/}}.}}


SDDM reads the user icon (a.k.a. "avatar") as a PNG image from either {{ic|~/.face.icon}} for each user, or the common location for all users specified by {{ic|FacesDir}} in an SDDM configuration file. The configuration setting can be placed in either {{ic|/etc/sddm.conf}} directly, or, better, a file under {{ic|/etc/sddm.conf.d/}} such as {{ic|/etc/sddm.conf.d/avatar.conf}}.
SDDM reads the user icon (a.k.a. "avatar") as a PNG image from either {{ic|~/.face.icon}} for each user, or the common location for all users specified by {{ic|FacesDir}} in an SDDM configuration file. The configuration setting can be placed in either {{ic|/etc/sddm.conf}} directly, or, better, a file under {{ic|/etc/sddm.conf.d/}} such as {{ic|/etc/sddm.conf.d/avatar.conf}}.
Line 115: Line 135:
=== Numlock ===
=== Numlock ===


If you want to enforce Numlock to be enabled, set {{ic|1=Numlock=on}} in the {{ic|[General]}} section.
If you want to enforce numlock to be enabled, set {{ic|1=Numlock=on}} in the {{ic|[General]}} section.
 
If SDDM is running under Wayland, the numlock setting currently does not work. You may need to change KWin settings to enable it, see [https://github.com/sddm/sddm/issues/1830#issuecomment-1859339401 this issue].


=== Rotate display ===
=== Rotate display ===
Line 131: Line 153:


=== Enable HiDPI ===
=== Enable HiDPI ===
{{Note|Since sddm version 0.20.0, HiDPI support is enabled by default, and the following step is not neccesary.}}


Create the following file:
Create the following file:
Line 140: Line 164:
[X11]
[X11]
EnableHiDPI=true
EnableHiDPI=true
}}
When using Wayland, the HiDPI scaling depends on the greeter used.[https://github.com/sddm/sddm/issues/1704] For instance, when using a Qt-based greeter such as Breeze, add the following configuration:
{{bc|1=
[General]
GreeterEnvironment=QT_SCREEN_SCALE_FACTORS=2,QT_FONT_DPI=192
}}
}}


Line 159: Line 190:
{{Note|Make sure that your fingerprint is registered before making these changes. Fingerprint support is not completely working properly yet, and it seems logging in with only a password no longer works using this method.}}
{{Note|Make sure that your fingerprint is registered before making these changes. Fingerprint support is not completely working properly yet, and it seems logging in with only a password no longer works using this method.}}


SDDM works with a fingerprint reader when using [[fprint]]. After installing fprint and adding fingerprint signatures, add the line {{ic|auth       sufficient   pam_fprintd.so}} at the beginning of {{ic|/etc/pam.d/sddm}}.
SDDM works with a fingerprint reader when using [[fprint]]. After installing fprint and adding fingerprint signatures, add the following to the top of {{ic|/etc/pam.d/sddm}}:
 
{{hc|/etc/pam.d/sddm|
auth sufficient pam_fprintd.so}}
 
In order to use either a password or a fingerprint, you can instead add the following to the top of the file:
 
{{hc|1=/etc/pam.d/sddm|2=
auth [success=1 new_authtok_reqd=1 default=ignore]  pam_unix.so try_first_pass likeauth nullok
auth sufficient  pam_fprintd.so}}


{{Tip|To make it work in KDE's lock screen, also add the same line at the beginning of {{ic|/etc/pam.d/kde}}.
Note that KWallet cannot be unlocked using a fingerprint reader (see [[KDE Wallet#Unlock KDE Wallet automatically on login]]), but the first line ensures that a password login will automatically unlock KWallet.
In KDE's lock screen it is also possible to use '''either''' password or fingerprint, this can be done by adding the following to the top of the auth section:
 
{{Tip|To make this work in KDE's lock screen, you can add the following lines at the beginning of {{ic|/etc/pam.d/kde}}:


{{hc|/etc/pam.d/kde|
{{hc|/etc/pam.d/kde|
Line 168: Line 209:
auth sufficient  pam_fprintd.so}}
auth sufficient  pam_fprintd.so}}


The above also works with SDDM ({{ic|/etc/pam.d/sddm}}) but seems to require KWallet to be unlocked separately.
The first line looks different from the corresponding {{ic|/etc/pam.d/sddm}} configuration because the KDE lock screen does not need to run the KWallet pam module.
}}
}}


If you now press enter in the empty password field, the fingerprint reader should start working.
If you now press enter in the empty password field, the fingerprint reader should start working.
=== Rootless ===
Traditionally, the [[X11]] display server has been run with root privileges by default. This rootful mode allows X11 to have unrestricted access to system resources, which was necessary for its operation in environments where direct hardware access and management were common. However, with the increasing emphasis on security in modern computing environments, efforts have been made to transition to rootless modes, which is also why [[Wayland]] by default runs in rootless mode.
Starting unprivileged X11 (and Wayland) sessions has been supported since {{Pkg|sddm}} 0.20.0.[https://github.com/sddm/sddm/blob/v0.20.0/ChangeLog]
To enable rootless mode: create a new configuration file under {{ic|/etc/sddm.conf.d/}}, name it something meaningful, and add the following to it, replacing {{ic|x11-user}} with {{ic|wayland}} if necessary.
{{hc|/etc/sddm.conf.d/rootless-x11.conf|2=
[General]
DisplayServer=x11-user}}
To confirm whether you are running in rootless mode check which user owns the compositor process (e.g. {{ic|kwin_wayland}})
{{Note|
* SDDM considers its Wayland support experimental.
* By default {{ic|DisplayServer{{=}}wayland}} attempts to use the [[weston]] compositor, even if it's not installed, to use a different Wayland compositor, enter the program and relevant arguments to the {{ic|CompositorCommand}} option as described in [[#KDE / KWin]], see also {{man|5|sddm.conf}} for more.
}}
=== Wayland ===
==== KDE / KWin ====
{{Warning|By default, KWin starts up with global shortcuts enabled. This could be dangerous for a login screen, since it becomes possible to bypass the login prompt using default key bindings. Specifying {{ic|--no-global-shortcuts}} fixes this.[https://invent.kde.org/plasma/plasma-workspace/-/commit/7e4159e46f816dc65ac62eae37b15c882f0c8064]}}
Adding the following lines to your configuration file sets the Wayland compositor to KWin and enables the [https://wayland.app/protocols/wlr-layer-shell-unstable-v1 wlr_layer_shell] Wayland protocol extension. This layer shell is included in {{Pkg|layer-shell-qt}} and {{Pkg|layer-shell-qt5}}. The latter package is needed until SDDM drops Qt5, otherwise you will get a black screen. [https://bbs.archlinux.org/viewtopic.php?id=293540]
{{hc|/etc/sddm.conf.d/10-wayland.conf|2=
[General]
DisplayServer=wayland
GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell
[Wayland]
CompositorCommand=kwin_wayland --drm --no-lockscreen --no-global-shortcuts --locale1}}
===== Virtual keyboards =====
To enable virtual keyboard support (e.g. using {{pkg|qt5-virtualkeyboard}} or {{pkg|maliit-keyboard}}), append the {{ic|--inputmethod}} flag with the appropriate keyboard to the {{ic|kwin_wayland}} command as shown below. Do not set the option {{ic|InputMethod}} in the section {{ic|General}}, since this will cause the virtual keyboard to no longer be shown.
{{hc|/etc/sddm.conf.d/10-wayland.conf|2=
[Wayland]
CompositorCommand=kwin_wayland --drm --no-lockscreen --no-global-shortcuts --locale1 --inputmethod maliit-keyboard}}
===== Match KDE display configuration =====
Changes to your display configuration made in KDE Wayland (e.g. monitor layout, resolution, etc) will not persist to SDDM. To make them persist open KDE's ''System Settings'' and navigate to ''Startup and Shutdown> Login Screen (SDDM)'' and click "''Apply Plasma Settings...''". You will need to have permission to perform this action.
The same can be achieved manually with the following:
To enable correct display & monitor handling in SDDM (scaling, monitor resolution, hz,...), you can copy or modify the appropriate configuration file from your home directory to the one of SDDM:
# cp ~/.config/kwinoutputconfig.json /var/lib/sddm/.config/
# chown sddm:sddm /var/lib/sddm/.config/kwinoutputconfig.json
To also enable correct input handling in SDDM (tap-to-click, touchscreen mapping,...), you can copy the appropriate configuration file from your home directory to the one of SDDM:
# cp ~/.config/kcminputrc /var/lib/sddm/.config/
# chown sddm:sddm /var/lib/sddm/.config/kcminputrc


== Troubleshooting ==
== Troubleshooting ==
Line 177: Line 275:
=== Blank screen with cursor, but no greeter shows ===
=== Blank screen with cursor, but no greeter shows ===


Check your disk space with {{ic|df -h}}. If no available space, greeter will crash.
Greeter crashes if there is no available disk space. Check your disk space with {{ic|df -h}}.


If disk space is not the issue, it may be due to [https://github.com/sddm/sddm/issues/1179 a bug.] Switch [[Getty#Installation|to another TTY]] to [[restart]] SDDM.
If disk space is not the issue, it may be due to [https://github.com/sddm/sddm/issues/1179 a bug]. Switch [[Getty#Installation|to another TTY]], and then try {{ic|loginctl unlock-session ''session_id''}} or to [[restart]] SDDM.


=== Long load time before SDDM shows the greeter ===
=== Long load time before SDDM shows the greeter ===
Line 191: Line 289:
=== SDDM starts on tty1 instead of tty7 ===
=== SDDM starts on tty1 instead of tty7 ===


SDDM follows the [http://0pointer.de/blog/projects/serial-console.html systemd convention] of starting the first graphical session on tty1. If you prefer the old convention where tty1 through tty6 are reserved for text consoles, change the default value of {{ic|MinimumVT}} variable, which comes under the {{ic|[X11]}} section:
SDDM follows the [http://0pointer.de/blog/projects/serial-console.html systemd convention] of starting the first graphical session on tty1.


{{hc|/etc/sddm.conf.d/tty.conf|2=
Note that the config file still has the option {{ic|MinimumVT}} but is ignored since SDDM version 0.20: {{man|5|sddm.conf|MinimumVT{{=}}}}.
[X11]
MinimumVT=7
}}


=== One or more users do not show up on the greeter ===
=== One or more users do not show up on the greeter ===


{{Warning|Users set with a lower or higher {{ic|UID}} range should generally not be exposed to a [[Display manager]].}}
{{Warning|Users set with a [https://systemd.io/UIDS-GIDS/ UID lower than 1000 or higher than 60513] should generally not be exposed to a [[display manager]].}}


SDDM only displays users with a UID in the range of 1000 to 65000 by default, if the UIDs of the desired users are below this value then you will have to modify this range. For example, for a UID of 501, say:
By default, SDDM is configured to displays only users with a UID in the range of 1000 to 60513. If the UIDs of the desired users are outside this range then you will have to modify the range.
 
For example, for a UID of 501, set {{ic|MinimumUid}} and hide those with shells used by system users:


{{hc|/etc/sddm.conf.d/uid.conf|2=
{{hc|/etc/sddm.conf.d/uid.conf|2=
[Users]
[Users]
HideShells=/sbin/nologin,/bin/false
HideShells=/usr/bin/nologin,/sbin/nologin,/bin/false,/usr/bin/git-shell
# Hidden users, this is if any system users fall within your range, see /etc/passwd on your system.
MinimumUid=500
HideUsers=git,sddm,systemd-journal-remote,systemd-journal-upload
}}


# Maximum user id for displayed users
For users with a higher UIDs, set {{ic|MaximumUid}} to the appropriate value.
MaximumUid=65000
 
# Minimum user id for displayed users
MinimumUid=500 #My UID is 501
}}


=== User avatars do not show up on the greeter ===
=== User avatars do not show up on the greeter ===


User avatars are not shown on the greeter if the number of users exceeds DisableAvatarsThreshold parameter or if avatars are not enabled at all as controlled by EnableAvatars parameter. To circumvent this add the following lines to your sddm configuration:
User avatars are not shown on the greeter if the number of users exceeds {{ic|DisableAvatarsThreshold}} parameter or if avatars are not enabled at all as controlled by {{ic|EnableAvatars}} parameter. To circumvent this add the following lines to your sddm configuration:
{{hc|/etc/sddm.conf.d/avatars.conf|2=
{{hc|/etc/sddm.conf.d/avatars.conf|2=
[Theme]
[Theme]
Line 232: Line 324:
An alternative way of setting the keyboard layout that will only set it in SDDM and not subsequent sessions is to invoke a ''setxkbmap'' command in the startup script of SDDM, located at {{ic|/usr/share/sddm/scripts/Xsetup}}. See [[Xorg/Keyboard configuration#Using setxkbmap]] for examples.
An alternative way of setting the keyboard layout that will only set it in SDDM and not subsequent sessions is to invoke a ''setxkbmap'' command in the startup script of SDDM, located at {{ic|/usr/share/sddm/scripts/Xsetup}}. See [[Xorg/Keyboard configuration#Using setxkbmap]] for examples.


SDDM may also incorrectly display the layout as US but will immediately change to the correct layout after you start typing your password [https://github.com/sddm/sddm/issues/202#issuecomment-76001543]. This seems to not be a bug in SDDM but in {{Pkg|libxcb}} (version 1.13-1 as of 2018) [https://github.com/sddm/sddm/issues/202#issuecomment-133628462].
SDDM may also incorrectly display the layout as US but will immediately change to the correct layout after you start typing your password [https://github.com/sddm/sddm/issues/202#issuecomment-76001543]. This seems to not be a bug in SDDM but in [[X server]].[https://gitlab.freedesktop.org/xorg/xserver/-/issues/257]


=== Screen resolution is too low ===
=== Screen resolution is too low ===
Line 251: Line 343:
SDDM by default tries to display avatars of users by accessing {{ic|~/.face.icon}} file. If your home directory is an ''autofs'', for example if you use [[dm-crypt]], this will make it wait for 60 seconds, until autofs reports that the directory cannot be mounted.
SDDM by default tries to display avatars of users by accessing {{ic|~/.face.icon}} file. If your home directory is an ''autofs'', for example if you use [[dm-crypt]], this will make it wait for 60 seconds, until autofs reports that the directory cannot be mounted.


You can disable avatars by editing {{ic|/etc/sddm.conf}}:
You can disable avatars by creating the following configuration file:


{{hc|/etc/sddm.conf|2=
{{hc|/etc/sddm.conf.d/avatar.conf|2=
[Theme]
[Theme]
EnableAvatars=false
EnableAvatars=false
}}
}}
=== X authority (aka MIT-MAGIC-COOKIE) file ===
SDDM uses a random fresh UUID for the auth file as described in details at [https://github.com/sddm/sddm/issues/622]. So in order to find that file one may use a script:
# find /var/run/sddm/ -type f
This may be needed if one needs to start [[x11vnc]] when there is no user logged in. For example:
# x11vnc -display :0 -auth "$( find /var/run/sddm/ -type f )"
=== Overlapping greeters on multiscreen setup ===
It happens that the X monitor layout is not setup correctly on multiscreen setup leading to overlapping greeters. To solve this add the following lines to order your sddm greeter layout from left to right:
{{hc|/usr/share/sddm/scripts/Xsetup|2=
for next in $(xrandr --listmonitors {{!}} grep -E " *[0-9]+:.*" {{!}} cut -d" " -f6); do
  [ -z "$current" ] && current=$next && continue
  xrandr --output $current --auto --output $next --auto --right-of $current
  current=$next
done
}}
=== Login session appears on an unexpected display ===
It can happen that the SDDM login session appears on a different display than your primary display if multiple displays are connected. This problem can be annoying if the secondary display is rotated and the primary display is not. A simple fix to this problem is to use ''xrandr'' to configure the displays before the login session using ''Xsetup'' script. E.g. here ''xrandr'' reports that there are two connected displays where the secondary display (DP-2) is left of the primary display (DP-4).
# xrandr | grep -w connected
DP-2 connected 2160x3840+0+0 left (normal left inverted right x axis y axis) 597mm x 336mm
DP-4 connected primary 3840x2160+2160+0 (normal left inverted right x axis y axis) 697mm x 392mm
The following ''Xsetup'' recreates the above setup for the login window:
{{hc|/usr/share/sddm/scripts/Xsetup|2=
#!/bin/sh
# Xsetup - run as root before the login dialog appears
xrandr --output DP-4 --auto --primary
xrandr --output DP-2 --left-of DP-4 --rotate left --noprimary
}}
=== Black screen after logout with NVIDIA graphics card ===
One may encounter a complete black screen or with only cursor/display device logo on it after the logout of any user. This happens because {{ic|sddm.service}} starts faster than the NVIDIA drivers. Consider using [[NVIDIA#Early loading|early KMS]].
=== Failing first password attempt results in text clearing itself after a few keystrolkes on subsequent attempts ===
Use a different theme than the default.
=== Screen out of sync on hybrid graphics with Wayland ===
If you set up SDDM with {{ic|kwin_wayland}} compositor, one may encounter a screen out of sync when booting. If returning back to X11 works well, and you're using {{ic|mesa-amber}} drivers, chances are Wayland will work well by just replacing your current {{ic|mesa-amber}} drivers with {{ic|mesa}}. You can find more details about this issue at [https://bugs.kde.org/show_bug.cgi?id=483804 KDE Bug 483804].

Latest revision as of 22:23, 7 April 2024

The Simple Desktop Display Manager (SDDM) is a display manager. It is the recommended display manager for the KDE Plasma and LXQt desktop environments.

From Wikipedia:Simple Desktop Display Manager:

Simple Desktop Display Manager (SDDM) is a display manager (a graphical login program and session manager) for the X11 and Wayland windowing systems. SDDM was written from scratch in C++11 and supports theming via QML.

The KDE development team has accepted a proposal to incorporate the SDDM project into the Plasma Desktop project. SDDM will be an official part of Plasma and updates will likely be pushed alongside Plasma Desktop updates.

Note: As of SDDM version 0.20, Wayland sessions are listed and can be started from SDDM, but the SDDM greeter itself still runs in X11 mode by default, although an experimental Wayland greeter can be enabled.

Installation

Install the sddm package. Optionally install sddm-kcm for the KConfig Module.

Follow Display manager#Loading the display manager to start SDDM at boot.

Configuration

The default configuration file for SDDM can be found at /usr/lib/sddm/sddm.conf.d/default.conf. For any changes, create configuration file(s) in /etc/sddm.conf.d/. See sddm.conf(5) for all options.

The sddm-kcm package (included in the plasma group) provides a GUI to configure SDDM in Plasma's system settings. There is also a Qt-based sddm-conf-gitAUR available.

Everything should work out of the box, since Arch Linux uses systemd and SDDM defaults to using systemd-logind for session management.

Autologin

SDDM supports automatic login through its configuration file, for example:

/etc/sddm.conf.d/autologin.conf
[Autologin]
User=john
Session=plasma

This configuration causes a KDE Plasma session to be started for user john when the system is booted. Available session types can be found in /usr/share/xsessions/ for X and in /usr/share/wayland-sessions/ for Wayland.

An option to autologin into KDE Plasma while simultaneously locking the session is not available [1]

You can add a script that activates the screensaver of Plasma to the autostart as a workaround:

#!/bin/sh
/usr/bin/dbus-send --session --type=method_call --dest=org.freedesktop.ScreenSaver /ScreenSaver org.freedesktop.ScreenSaver.Lock &

Passwordless login

It is possible to configure SDDM to allow logging into some accounts without a password. This differs from automatic login in that the user still has to choose which account to log into, and it differs from simply setting the account password to the empty string in that it only allows interactive users to log in (and not, for example, remote users logged in via SSH).

To set this up you can follow the instructions for LightDM, except you will need to change /etc/pam.d/sddm instead of /etc/pam.d/lightdm.

Unlock KDE Wallet automatically on login

See KDE Wallet#Unlock KDE Wallet automatically on login.

Theme settings

Theme settings can be changed in the [Theme] section. If you use Plasma's system settings, themes may show previews.

Set to breeze for the default Plasma theme.

Some themes are available in the AUR, for example archlinux-themes-sddmAUR.

Current theme

Set the current theme through the Current value, e.g. Current=archlinux-simplyblack.

Editing themes

The default SDDM theme directory is /usr/share/sddm/themes/. You can add your custom made themes to that directory under a separate subdirectory. Note that SDDM requires these subdirectory names to be the same as the theme names. Study the files installed to modify or create your own theme.

Customizing a theme

To override settings in the theme.conf configuration file, create a custom theme.conf.user file in the same directory. For example, to change the theme's background:

/usr/share/sddm/themes/name/theme.conf.user
[General]
background=/path/to/background.png

Testing (previewing) a theme

You can preview an SDDM theme if needed. This is especially helpful if you are not sure how the theme would look if selected or just edited a theme and want to see how it would look without logging out. You can run something like this:

$ sddm-greeter-qt6 --test-mode --theme /usr/share/sddm/themes/breeze

This should open a new window for every monitor you have connected and show a preview of the theme.

Note: This is just a preview. In this mode, some actions like shutdown, suspend or login will have no effect.

Mouse cursor

To set the mouse cursor theme, set CursorTheme to your preferred cursor theme.

Valid Plasma mouse cursor theme names are breeze_cursors, Breeze_Snow and breeze-dark.

User icon (avatar)

This article or section is out of date.

Reason: SDDM detects icons in /var/lib/AccountsService/icons/ without configuration and Plasma no longer creates the files in $HOME/. (Discuss in Talk:SDDM)

SDDM reads the user icon (a.k.a. "avatar") as a PNG image from either ~/.face.icon for each user, or the common location for all users specified by FacesDir in an SDDM configuration file. The configuration setting can be placed in either /etc/sddm.conf directly, or, better, a file under /etc/sddm.conf.d/ such as /etc/sddm.conf.d/avatar.conf.

To use the FacesDir location option, place a PNG image for each user named username.face.icon at the location specified by the FacesDir key in the configuration file. The default location for FacesDir is /usr/share/sddm/faces/. You can change the default FacesDir location to suit your needs. Here is an example:

/etc/sddm.conf.d/avatar.conf
[Theme]
FacesDir=/var/lib/AccountsService/icons/

The other option is to put a PNG image named .face.icon at the root of your home directory. In this case, no changes to any SDDM configuration file is required. However, you need to make sure that sddm user can read the PNG image file(s) for the user icon(s).

Note: In many KDE versions, the user icon image file is ~/.face and ~/.face.icon is a symlink to that file. If the user icon images are symlinks, you need to set proper file permissions to the target files.

To set proper permissions run:

$ setfacl -m u:sddm:x ~/
$ setfacl -m u:sddm:r ~/.face.icon

You can check permissions with:

$ getfacl ~/
$ getfacl ~/.face.icon

See SDDM README: No User Icon.

Numlock

If you want to enforce numlock to be enabled, set Numlock=on in the [General] section.

If SDDM is running under Wayland, the numlock setting currently does not work. You may need to change KWin settings to enable it, see this issue.

Rotate display

See Xrandr#Configuration.

DPI settings

Sometimes it is useful to set up the correct monitor's PPI settings on a "Display Manager" level.[2] To do so you need to add to ServerArguments the parameter -dpi your_dpi at the end of the string. For example:

/etc/sddm.conf.d/dpi.conf
[X11]
ServerArguments=-nolisten tcp -dpi 94

Enable HiDPI

Note: Since sddm version 0.20.0, HiDPI support is enabled by default, and the following step is not neccesary.

Create the following file:

/etc/sddm.conf.d/hidpi.conf
[Wayland]
EnableHiDPI=true

[X11]
EnableHiDPI=true

When using Wayland, the HiDPI scaling depends on the greeter used.[3] For instance, when using a Qt-based greeter such as Breeze, add the following configuration:

[General]
GreeterEnvironment=QT_SCREEN_SCALE_FACTORS=2,QT_FONT_DPI=192

Enable virtual keyboard

Install qt5-virtualkeyboard.

Create the following file:

/etc/sddm.conf.d/virtualkbd.conf
[General]
InputMethod=qtvirtualkeyboard

SDDM now displays a button in lower-left corner of login screen to open the virtual keyboard.

Using a fingerprint reader

Note: Make sure that your fingerprint is registered before making these changes. Fingerprint support is not completely working properly yet, and it seems logging in with only a password no longer works using this method.

SDDM works with a fingerprint reader when using fprint. After installing fprint and adding fingerprint signatures, add the following to the top of /etc/pam.d/sddm:

/etc/pam.d/sddm
auth 			sufficient  	pam_fprintd.so

In order to use either a password or a fingerprint, you can instead add the following to the top of the file:

/etc/pam.d/sddm
auth 			[success=1 new_authtok_reqd=1 default=ignore]  	pam_unix.so try_first_pass likeauth nullok
auth 			sufficient  	pam_fprintd.so

Note that KWallet cannot be unlocked using a fingerprint reader (see KDE Wallet#Unlock KDE Wallet automatically on login), but the first line ensures that a password login will automatically unlock KWallet.

Tip: To make this work in KDE's lock screen, you can add the following lines at the beginning of /etc/pam.d/kde:
/etc/pam.d/kde
auth 			sufficient  	pam_unix.so try_first_pass likeauth nullok
auth 			sufficient  	pam_fprintd.so

The first line looks different from the corresponding /etc/pam.d/sddm configuration because the KDE lock screen does not need to run the KWallet pam module.

If you now press enter in the empty password field, the fingerprint reader should start working.

Rootless

Traditionally, the X11 display server has been run with root privileges by default. This rootful mode allows X11 to have unrestricted access to system resources, which was necessary for its operation in environments where direct hardware access and management were common. However, with the increasing emphasis on security in modern computing environments, efforts have been made to transition to rootless modes, which is also why Wayland by default runs in rootless mode.

Starting unprivileged X11 (and Wayland) sessions has been supported since sddm 0.20.0.[4]

To enable rootless mode: create a new configuration file under /etc/sddm.conf.d/, name it something meaningful, and add the following to it, replacing x11-user with wayland if necessary.

/etc/sddm.conf.d/rootless-x11.conf
[General]
DisplayServer=x11-user

To confirm whether you are running in rootless mode check which user owns the compositor process (e.g. kwin_wayland)

Note:
  • SDDM considers its Wayland support experimental.
  • By default DisplayServer=wayland attempts to use the weston compositor, even if it's not installed, to use a different Wayland compositor, enter the program and relevant arguments to the CompositorCommand option as described in #KDE / KWin, see also sddm.conf(5) for more.

Wayland

KDE / KWin

Warning: By default, KWin starts up with global shortcuts enabled. This could be dangerous for a login screen, since it becomes possible to bypass the login prompt using default key bindings. Specifying --no-global-shortcuts fixes this.[5]

Adding the following lines to your configuration file sets the Wayland compositor to KWin and enables the wlr_layer_shell Wayland protocol extension. This layer shell is included in layer-shell-qt and layer-shell-qt5. The latter package is needed until SDDM drops Qt5, otherwise you will get a black screen. [6]

/etc/sddm.conf.d/10-wayland.conf
[General]
DisplayServer=wayland
GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell

[Wayland]
CompositorCommand=kwin_wayland --drm --no-lockscreen --no-global-shortcuts --locale1
Virtual keyboards

To enable virtual keyboard support (e.g. using qt5-virtualkeyboard or maliit-keyboard), append the --inputmethod flag with the appropriate keyboard to the kwin_wayland command as shown below. Do not set the option InputMethod in the section General, since this will cause the virtual keyboard to no longer be shown.

/etc/sddm.conf.d/10-wayland.conf
[Wayland]
CompositorCommand=kwin_wayland --drm --no-lockscreen --no-global-shortcuts --locale1 --inputmethod maliit-keyboard
Match KDE display configuration

Changes to your display configuration made in KDE Wayland (e.g. monitor layout, resolution, etc) will not persist to SDDM. To make them persist open KDE's System Settings and navigate to Startup and Shutdown> Login Screen (SDDM) and click "Apply Plasma Settings...". You will need to have permission to perform this action.

The same can be achieved manually with the following:

To enable correct display & monitor handling in SDDM (scaling, monitor resolution, hz,...), you can copy or modify the appropriate configuration file from your home directory to the one of SDDM:

# cp ~/.config/kwinoutputconfig.json /var/lib/sddm/.config/
# chown sddm:sddm /var/lib/sddm/.config/kwinoutputconfig.json

To also enable correct input handling in SDDM (tap-to-click, touchscreen mapping,...), you can copy the appropriate configuration file from your home directory to the one of SDDM:

# cp ~/.config/kcminputrc /var/lib/sddm/.config/
# chown sddm:sddm /var/lib/sddm/.config/kcminputrc

Troubleshooting

Blank screen with cursor, but no greeter shows

Greeter crashes if there is no available disk space. Check your disk space with df -h.

If disk space is not the issue, it may be due to a bug. Switch to another TTY, and then try loginctl unlock-session session_id or to restart SDDM.

Long load time before SDDM shows the greeter

A low entropy pool can cause long SDDM load time (Bug report). See Random number generation for suggestions to increase the entropy pool.

Hangs after login

Try removing ~/.Xauthority and logging in again without rebooting. Rebooting without logging in creates the file again and the problem will persist.

SDDM starts on tty1 instead of tty7

SDDM follows the systemd convention of starting the first graphical session on tty1.

Note that the config file still has the option MinimumVT but is ignored since SDDM version 0.20: sddm.conf(5) § MinimumVT=.

One or more users do not show up on the greeter

Warning: Users set with a UID lower than 1000 or higher than 60513 should generally not be exposed to a display manager.

By default, SDDM is configured to displays only users with a UID in the range of 1000 to 60513. If the UIDs of the desired users are outside this range then you will have to modify the range.

For example, for a UID of 501, set MinimumUid and hide those with shells used by system users:

/etc/sddm.conf.d/uid.conf
[Users]
HideShells=/usr/bin/nologin,/sbin/nologin,/bin/false,/usr/bin/git-shell
MinimumUid=500

For users with a higher UIDs, set MaximumUid to the appropriate value.

User avatars do not show up on the greeter

User avatars are not shown on the greeter if the number of users exceeds DisableAvatarsThreshold parameter or if avatars are not enabled at all as controlled by EnableAvatars parameter. To circumvent this add the following lines to your sddm configuration:

/etc/sddm.conf.d/avatars.conf
[Theme]
EnableAvatars=true # enable avatars
DisableAvatarsThreshold=7 # set the threshold for the number of users. Avatars are not shown if this threshold is exceeded.

SDDM loads only US keyboard layout

SDDM loads the keyboard layout specified in /etc/X11/xorg.conf.d/00-keyboard.conf. You can generate this configuration file by localectl set-x11-keymap command. See Keyboard configuration in Xorg for more information.

An alternative way of setting the keyboard layout that will only set it in SDDM and not subsequent sessions is to invoke a setxkbmap command in the startup script of SDDM, located at /usr/share/sddm/scripts/Xsetup. See Xorg/Keyboard configuration#Using setxkbmap for examples.

SDDM may also incorrectly display the layout as US but will immediately change to the correct layout after you start typing your password [7]. This seems to not be a bug in SDDM but in X server.[8]

Screen resolution is too low

Issue may be caused by HiDPI usage for monitors with corrupted EDID [9]. If you have enabled HiDPI, try to disable it.

If even the above fails, you can try setting your screen size in a Xorg configuration file:

/etc/X11/xorg.conf.d/90-monitor.conf
Section "Monitor"
        Identifier      "<default monitor>"
        DisplaySize     345 194 # in millimeters
EndSection

Long load time on autofs home directory

SDDM by default tries to display avatars of users by accessing ~/.face.icon file. If your home directory is an autofs, for example if you use dm-crypt, this will make it wait for 60 seconds, until autofs reports that the directory cannot be mounted.

You can disable avatars by creating the following configuration file:

/etc/sddm.conf.d/avatar.conf
[Theme]
EnableAvatars=false

X authority (aka MIT-MAGIC-COOKIE) file

SDDM uses a random fresh UUID for the auth file as described in details at [10]. So in order to find that file one may use a script:

# find /var/run/sddm/ -type f

This may be needed if one needs to start x11vnc when there is no user logged in. For example:

# x11vnc -display :0 -auth "$( find /var/run/sddm/ -type f )"

Overlapping greeters on multiscreen setup

It happens that the X monitor layout is not setup correctly on multiscreen setup leading to overlapping greeters. To solve this add the following lines to order your sddm greeter layout from left to right:

/usr/share/sddm/scripts/Xsetup
for next in $(xrandr --listmonitors | grep -E " *[0-9]+:.*" | cut -d" " -f6); do
  [ -z "$current" ] && current=$next && continue
  xrandr --output $current --auto --output $next --auto --right-of $current
  current=$next
done

Login session appears on an unexpected display

It can happen that the SDDM login session appears on a different display than your primary display if multiple displays are connected. This problem can be annoying if the secondary display is rotated and the primary display is not. A simple fix to this problem is to use xrandr to configure the displays before the login session using Xsetup script. E.g. here xrandr reports that there are two connected displays where the secondary display (DP-2) is left of the primary display (DP-4).

# xrandr | grep -w connected
DP-2 connected 2160x3840+0+0 left (normal left inverted right x axis y axis) 597mm x 336mm
DP-4 connected primary 3840x2160+2160+0 (normal left inverted right x axis y axis) 697mm x 392mm

The following Xsetup recreates the above setup for the login window:

/usr/share/sddm/scripts/Xsetup
#!/bin/sh
# Xsetup - run as root before the login dialog appears

xrandr --output DP-4 --auto --primary
xrandr --output DP-2 --left-of DP-4 --rotate left --noprimary

Black screen after logout with NVIDIA graphics card

One may encounter a complete black screen or with only cursor/display device logo on it after the logout of any user. This happens because sddm.service starts faster than the NVIDIA drivers. Consider using early KMS.

Failing first password attempt results in text clearing itself after a few keystrolkes on subsequent attempts

Use a different theme than the default.

Screen out of sync on hybrid graphics with Wayland

If you set up SDDM with kwin_wayland compositor, one may encounter a screen out of sync when booting. If returning back to X11 works well, and you're using mesa-amber drivers, chances are Wayland will work well by just replacing your current mesa-amber drivers with mesa. You can find more details about this issue at KDE Bug 483804.