From Gentoo Wiki
Jump to: navigation, search

Simple Desktop Display Manager (SDDM) is a modern display manager that supports both the X11 server and the Wayland protocol.


USE flags

USE flags for x11-misc/sddm Simple Desktop Display Manager

consolekit Use ck-launch-session from sys-auth/consolekit by default in Xsession (no native support)
elogind Use sys-auth/elogind for session tracking.
pam Add support for PAM (Pluggable Authentication Modules)DANGEROUS to arbitrarily flip
systemd Enable use of systemd-specific libraries and features like socket activation or session tracking
test Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)


Install x11-misc/sddm:

root #emerge --ask x11-misc/sddm

If there are performance issues, it might help to add the sddm user to the video group:

root #usermod -a -G video sddm



SDDM has two configuration files: the package installed /usr/share/sddm/sddm.conf.d/00default.conf and /etc/sddm.conf which is used to override specific options. The second is not created by the package. KDE Plasma writes user changed options to /etc/sddm.conf. Both files have the same format. See comments in the file and man 5 sddm.conf for details on available options.

Prior to 0.18.0

Prior to 0.18.0 the configuration was only in /etc/sddm.conf. Some of the files may have had to be generated manually. If installing 0.18.0, skip ahead to Service section.


To select the correct keymap on the login screen, add following lines to the /etc/sddm.conf file:

FILE /etc/sddm.conf

This file is not created automatically when the package is installed so you'll need to create it if you haven't done so already.

Next create the directory /etc/sddm/scripts

root #mkdir -p /etc/sddm/scripts

and the file /etc/sddm/scripts/Xsetup.

FILE /etc/sddm/scripts/Xsetup
setxkbmap gb,us

the first country code is the default. Finally set execute permissions on the file /etc/sddm/scripts/Xsetup.

root #chmod a+x /etc/sddm/scripts/Xsetup



Set SDDM as the default display manager:

FILE /etc/conf.d/xdm

To start SDDM on boot, add xdm to the default runlevel:

The dbus service gets pulled in dynamically.
root #rc-update add xdm default

To start SDDM now:

root #/etc/init.d/xdm start

After logging in to the X session via sddm, it is a good idea to verify that ConsoleKit is working as intended. By typing ck-list-sessions all active sessions can be listed. The list should include your session, typically running on x11-display-device = '/dev/tty7'. This session should also read active = TRUE. Active being FALSE indicates an issue [1][2].


To start SDDM on boot:

root #systemctl enable sddm.service

To start SDDM now:

root #systemctl start sddm.service


Graphical configuration is integrated in Plasma 5 system settings by installing kde-plasma/sddm-kcm:

root #emerge --ask kde-plasma/sddm-kcm


Long load time before SDDM shows the greeter

A low entropy pool can cause long SDDM load time - see upstream bug report. If using systemd, the graphical target is reached and then everything appears to hang. Moving the mouse or using the keyboard will make the SDDM greeter launch (faster).

Solve the problem by using, for example, the sys-apps/haveged package to increase the entropy pool or by enabling RANDOM_TRUST_CPU kernel config option with a recent-enough CPU.

Permission denied errors in Xorg.log

The X server will not start and permission denied errors (such as the following) are present in the Xorg.log log file:

FILE /var/log/Xorg.log
/var/log/Xorg.0.log:[ 2058.998] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
/var/log/Xorg.0.log:[ 2061.229] (EE) intel(0): [drm] failed to set drm interface version: Permission denied [13].

It is likely the sddm user has not been added to the video group. Running the following command should fix the problem:

root #usermod -a -G video sddm

Missing users

If the login screen is missing some user(s) to choose from, this might be caused by /etc/sddm.conf - standard MinimumUid is 1000 and some existing users may have lower uids.

FILE /etc/sddm.conf

X11: Incorrect layout on high DPI with fractional scaling and multiple monitors

If a scaling setting such as 1.5 (150%) is used, the second monitor (and others) might display incorrectly. An example screenshot is included. Note how the second half of the screen is actually starting in the first half and the aspect ratio of this screenshot is incorrect.

2020-06-09-035925 6400x2160 scrot.png

To fix this, use a script which SDDM will run right after initializing X but before loading the login screen. The default script for this is /usr/share/sddm/scripts/Xsetup. Copy this file to, for example /etc/sddm/Xsetup, and make necessary changes.

Example script to fix using dc and xrandr a scale of 1.5 with 2 4K monitors that are oriented horizontally and placed side-by-side:

FILE /etc/sddm/Xsetup
# With a --scale 1.5 argument to xrandr, the virtual width of the left screen is 3840 / 1.5 or 2560.
# We need to use the physical width: 3840 * 1.5 or 5760 to specify the X position of the second
# screen (right of the left).
# The multiplication/division with 10 is to avoid getting fractional results (5760.0).
right_pos=$(dc -e "${scale} 10 * ${w} * 10 / p")
xrandr \
  --output DP-2 --scale "$scale" --mode "${w}x${h}" --pos 0x0 \
  --output DP-4 --scale "$scale" --mode "${w}x${h}" --pos "${right_pos}x0"

Then, configure sddm to execute this script:

FILE /etc/sddm.conf

Remember that this script must be executable (e.g. chmod +x /etc/sddm/Xsetup). DisplayCommand is a path, not a command with arguments.

If SDDM still shows the incorrect layout or reverts to prior behavior, check that the DE has not added its own settings to SDDM.

See also


  1. [SOLVED] xfce4 "shut down" "restart" button are disabled [1]
  2. Hey host, give me a new login please! [2]