Jump to content

SDDM: Difference between revisions

From Official NixOS Wiki
Phobos (talk | contribs)
mNo edit summary
m Arch is the best moved page Sddm to SDDM: Misspelled title
 
(3 intermediate revisions by 2 users not shown)
Line 38: Line 38:


=== Disable/Enable fprint ===
=== Disable/Enable fprint ===
With fprint enabled on the system, SDDM will expect a fingerprint after entering any password. SDDM does not show any prompt for this and this will time out after some time and SDDM will attempt to use your entered password. If you have your fingerprints enrolled, you can press enter and use your fingerprint reader. Find additional options for fprint on the [[Fingerprint scanner]] page.
With fprint enabled on the system, SDDM will expect a fingerprint after entering any password. SDDM does not show any prompt for this and this will time out after some time and SDDM will attempt to use your entered password. If you have your fingerprints enrolled, you can press enter and use your fingerprint reader. You may find additional options for fprint as well as information on enrolling fingerprints on the [[Fingerprint scanner]] page.
 
KWallet cannot be unlocked using fprint.


==== Enable fprint system wide ====
==== Enable fprint system wide ====
You can enable this behavior by enabling fprint. You will need to use a method to enroll your fingerprints, desktop environments such as KDE have GUI for doing so.
You can enable this behavior by enabling fprint.
{{File|3=services.fprintd.enable = true;|name=/etc/nixos/configuration.nix|lang=nix}}
{{File|3=services.fprintd.enable = true;|name=/etc/nixos/configuration.nix|lang=nix}}


Line 52: Line 54:
=== SDDM Hangs after entering password ===
=== SDDM Hangs after entering password ===
With fprint enabled, SDDM will expect a fingerprint after entering any password. SDDM is likely waiting for a fingerprint without a prompt. You can disable this behavior by seeing the fprint configuration section of this article.
With fprint enabled, SDDM will expect a fingerprint after entering any password. SDDM is likely waiting for a fingerprint without a prompt. You can disable this behavior by seeing the fprint configuration section of this article.
=== SDDM does not unlock KWallet on KDE ===
This may be related to fprint. Using fprint to login cannot unlock KWallet since KWallet unlocks using the same password as your user, and does not support fingerprints to do so.
=== Session freezes/leads to black screen after logging out ===
Some Desktop Sessions may rely on [[Systemd/logind|logind]] to terminate themselves (e.g.: [[UWSM]], <code>loginctl</code>, …), but SDDM currently fails at correctly handling signals from [[Systemd/logind|logind]], leaving it in a limbo state where it can't restart the greeter[https://github.com/sddm/sddm/issues/1908]. If it ever happens, SDDM can be manually restarted by logging into another TTY, and restarting the <code>display-manager.service</code> system service.
However, there are workarounds to avoid doing this altogether.
==== Killing the session instead of terminating ====
If you are using <code>loginctl</code> to log out, use the <code>kill-session</code> command instead of the <code>terminate-session</code>. This will force the greeter to restart. Some reports[https://github.com/Vladimir-csp/uwsm/issues/194#issue-3779478721] say that <code>uwsm stop</code> may work as well.
==== Patch SDDM to correctly handle signals from <code>logind</code> ====
An [https://patch-diff.githubusercontent.com/raw/sddm/sddm/pull/2103.patch upstream PR] fixing this issue is currently pending review. You can apply it by overriding SDDM to include the PR as a patch:
{{File|3={ pkgs, ... }:
{
  services.displayManager.sddm.package = pkgs.kdePackages.sddm.override {
    unwrapped = (
      pkgs.kdePackages.sddm.unwrapped.overrideAttrs (old: {
        patches = (old.patches or [ ]) ++ [
          (pkgs.fetchpatch {
            url = "https://patch-diff.githubusercontent.com/raw/sddm/sddm/pull/2103.patch";
            hash = "sha256-HxsurSuGJjkGnC8fAiwipadAgcTUhs7n6fQ1SmvMMGc=";
          })
        ];
      })
    );
  };
}|name=/etc/nixos/configuration.nix|lang=nix}}


== Installing themes ==
== Installing themes ==

Latest revision as of 00:21, 21 April 2026

Simple Desktop Display Manager (SDDM) is a modern display manager for X11 and Wayland sessions.

Installation

SDDM can be enabled as the display manager with these lines.

❄︎ /etc/nixos/configuration.nix
services.displayManager.sddm = {
  enable = true;

  # Enables experimental Wayland support
  wayland.enable = true;
};

Configuration

Wayland

❄︎ /etc/nixos/configuration.nix
services.displayManager.sddm = {
  enable = true;

  wayland = {
    enable = true;

    # default compositor is "weston", you can optionally change it to kwin
    #compositor = "kwin";
    };
  };
};

Autologin

❄︎ /etc/nixos/configuration.nix
services.displayManager = {
  sddm = {
    enable = true;
    wayland.enable = true;
  };
  autoLogin = {
    enable = true;    
    user = "user"; # Replace with the desired user
  };
};

Disable/Enable fprint

With fprint enabled on the system, SDDM will expect a fingerprint after entering any password. SDDM does not show any prompt for this and this will time out after some time and SDDM will attempt to use your entered password. If you have your fingerprints enrolled, you can press enter and use your fingerprint reader. You may find additional options for fprint as well as information on enrolling fingerprints on the Fingerprint scanner page.

KWallet cannot be unlocked using fprint.

Enable fprint system wide

You can enable this behavior by enabling fprint.

❄︎ /etc/nixos/configuration.nix
services.fprintd.enable = true;

Disable fprint for login

Stops SDDM from prompting for fingerprint.

❄︎ /etc/nixos/configuration.nix
security.pam.services.login.fprintAuth = false;

Troubleshooting

SDDM Hangs after entering password

With fprint enabled, SDDM will expect a fingerprint after entering any password. SDDM is likely waiting for a fingerprint without a prompt. You can disable this behavior by seeing the fprint configuration section of this article.

SDDM does not unlock KWallet on KDE

This may be related to fprint. Using fprint to login cannot unlock KWallet since KWallet unlocks using the same password as your user, and does not support fingerprints to do so.

Session freezes/leads to black screen after logging out

Some Desktop Sessions may rely on logind to terminate themselves (e.g.: UWSM, loginctl, …), but SDDM currently fails at correctly handling signals from logind, leaving it in a limbo state where it can't restart the greeter[1]. If it ever happens, SDDM can be manually restarted by logging into another TTY, and restarting the display-manager.service system service.

However, there are workarounds to avoid doing this altogether.

Killing the session instead of terminating

If you are using loginctl to log out, use the kill-session command instead of the terminate-session. This will force the greeter to restart. Some reports[2] say that uwsm stop may work as well.

Patch SDDM to correctly handle signals from logind

An upstream PR fixing this issue is currently pending review. You can apply it by overriding SDDM to include the PR as a patch:

❄︎ /etc/nixos/configuration.nix
{ pkgs, ... }:

{
  services.displayManager.sddm.package = pkgs.kdePackages.sddm.override {
    unwrapped = (
      pkgs.kdePackages.sddm.unwrapped.overrideAttrs (old: {
        patches = (old.patches or [ ]) ++ [
          (pkgs.fetchpatch {
            url = "https://patch-diff.githubusercontent.com/raw/sddm/sddm/pull/2103.patch";
            hash = "sha256-HxsurSuGJjkGnC8fAiwipadAgcTUhs7n6fQ1SmvMMGc=";
          })
        ];
      })
    );
  };
}

Installing themes

You can install and configure a theme like so

❄︎ /etc/nixos/configuration.nix
{ pkgs, ... }:
{
  services.displayManager.sddm = {
    enable = true;
    theme = "catppuccin-mocha-mauve";
  };

  environment.systemPackages = [ 
    (pkgs.catppuccin-sddm.override {
      flavor = "mocha";
      accent = "mauve";
    })
  ];
}