devcrea

How to Fix SDDM Hanging or Crashing After Logout on Manjaro Linux

Stuck on a black screen after logging out in Manjaro? Here is how to restart SDDM via TTY and permanently fix the crash using config scripts.

// The short answer

If Manjaro KDE returns to a black screen after logout, switch to a TTY with Ctrl+Alt+F3, sign in, and restart SDDM with sudo systemctl restart sddm. If the problem returns, inspect the journal and session processes before applying a permanent configuration change; a hard power-off is the last resort because it can damage an active filesystem.

Full walkthrough, edge cases and why it works
In this guide · 6 sections
  1. 01The Quick Fix: Unfreeze Without Rebooting
  2. 02Solution 1: The "Xstop" Script Method (Most Effective)
  3. 03Solution 2: Adjusting SDDM Configuration
  4. 04Solution 3: NVIDIA Driver Conflicts (Kernel Parameters)
  5. 05Solution 4: Reinstalling SDDM Correctly
  6. 06How to Analyze the Logs

It is a classic Manjaro moment: You finish your work, hit Logout to switch users or just take a break, and instead of the login screen, you are greeted by a black screen. Maybe you see a frozen mouse cursor, maybe nothing at all. The system isn't actually dead, but the Display Manager (SDDM) has failed to reload properly.

This is a common frustration, specifically for KDE Plasma users on Manjaro. It usually happens because the system fails to kill all the user processes from the previous session, causing a "race condition" where SDDM tries to launch before the old session has fully cleared. Before you reach for the power button to do a hard reset, let's look at how to unfreeze it instantly and then how to apply a permanent fix.

The Quick Fix: Unfreeze Without Rebooting

If you are currently staring at a black screen, you do not need to force a hard shutdown, which risks corrupting your filesystem. You can restart the display manager from a TTY (Teletype) terminal.

  1. Press Ctrl + Alt + F2 (or F3, F4) on your keyboard. This should drop you into a text-based login prompt.

  2. Enter your username and password.

  3. Type the following command to restart SDDM: sudo systemctl restart sddm

  4. Your graphical login screen should reappear immediately.

This gets you back in, but it doesn't solve the root cause. To stop this from happening every time you log out, we need to tweak how SDDM handles session exits.

Solution 1: The "Xstop" Script Method (Most Effective)

The most reliable fix involves forcing SDDM to kill all processes owned by the user when the session ends. This prevents the "zombie processes" that cause the hang.

We will modify the Xstop script. Since this is a system file, we will use a text editor like Nano.

  1. Open your terminal.

  2. Edit the Xstop script with this command: sudo nano /usr/share/sddm/scripts/Xstop

  3. Add the following line to the bottom of the file: killall --user $USER

  4. Press Ctrl + O to save and Ctrl + X to exit.

This command ensures that every process running under your user ID is terminated when the X server stops, clearing the way for SDDM to restart cleanly.

Solution 2: Adjusting SDDM Configuration

If the script method doesn't work, the issue might be related to how SDDM handles session reuse. We can force it to treat every login as a fresh start.

Instead of editing the main config file (which can be overwritten by updates), it is safer to create a configuration override file if it doesn't exist, or edit the main one if you prefer a direct approach.

  1. Open the configuration file: sudo nano /etc/sddm.conf

  2. Look for the [Users] section. If it doesn't exist, add it.

  3. Add or modify the ReuseSession line: ReuseSession=true

Note: Paradoxically, for some NVIDIA users, setting this to false works better. If true doesn't solve it, try switching it to false.

Solution 3: NVIDIA Driver Conflicts (Kernel Parameters)

If you are using an NVIDIA card with proprietary drivers, the black screen is often caused by a driver handoff issue. You need to enable DRM kernel mode setting.

  1. Open your GRUB configuration: sudo nano /etc/default/grub

  2. Find the line starting with GRUB_CMDLINE_LINUX_DEFAULT.

  3. Add nvidia-drm.modeset=1 inside the quotes. It should look something like this: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvidia-drm.modeset=1"

  4. Save the file and update GRUB: sudo update-grub

  5. Reboot your system.

Solution 4: Reinstalling SDDM Correctly

If you have tinkered with themes or configuration files extensively, you might have broken something fundamental. A clean reinstall of SDDM can reset everything to factory defaults.

Do not just remove it; you should clear the cache as well.

  1. Switch to a TTY (Ctrl + Alt + F2) and stop the service: sudo systemctl stop sddm

  2. Remove SDDM and its dependencies: sudo pacman -Rns sddm

  3. Reinstall it: sudo pacman -S sddm

  4. Enable and start the service: sudo systemctl enable sddm sudo systemctl start sddm

How to Analyze the Logs

If you are still facing issues, you need to see exactly what the system is complaining about. Linux logs are verbose, but using the linux tail command can help you see just the most recent errors.

After a failed logout, reboot or restart SDDM, then run: journalctl -b -1 -p 3

This command shows you the priority 3 (errors) from the previous boot (-1). Look for lines mentioning sddm, kwin, or nvidia. If you see a specific error code, that is your golden ticket to finding a specific solution on the Manjaro forums.

Also, if you are not sure where your config files are located, you can use the find command to locate any rogue SDDM configuration files that might be overriding your settings.

Quick answers

Frequently asked questions

Why does Manjaro show a black screen after logout?

This issue typically occurs due to a "race condition" where user processes from the previous session fail to terminate before SDDM tries to reload. It is particularly common in KDE Plasma environments where background services or widgets hang during the exit process, leaving the display manager stuck in limbo.

How do I restart SDDM from the terminal?

If you are stuck on a black screen, you do not need to force a hard reboot; simply press Ctrl + Alt + F2 to access a TTY terminal. After logging in with your credentials, run the command sudo systemctl restart sddm to instantly bring back your graphical login screen.

Is it safe to reinstall SDDM on Manjaro?

Yes, reinstalling the display manager is a safe troubleshooting step that can resolve issues caused by corrupted configuration files or bad updates. To do this correctly, first remove the package and its dependencies using sudo pacman -Rns sddm, then install it again to ensure a fresh start.

Where can I find SDDM error logs?

To diagnose specific crash reasons, you should check the systemd journal rather than looking for a specific text file. Run journalctl -u sddm -b -p 3 in your terminal to view only the error-level logs related to the display manager for your current boot session.

Does changing the Linux kernel fix SDDM crashes?

sometimes, switching to a different kernel (like an LTS version) can resolve graphics driver conflicts that lead to SDDM hangs. You can easily install and switch kernels using the Manjaro Settings Manager under the Kernel section to test if a driver update is the root cause.

Something wrong or out of date?

Tools change fast. Tell the editor what no longer works.