# Black Screen After Login — NVIDIA + KDE

**Symptom:** User logs in (SDDM), enters password, screen goes black. No desktop appears.
TTY (Ctrl+Alt+F2) works. SSH may also hang (PAM issue).

## Most Common Cause: Wayland + NVIDIA Beta Driver

SDDM defaults to Wayland session (`plasma-wayland`). NVIDIA beta drivers
(610.x branch) often crash the KDE Wayland compositor on login.

## Fix: Force SDDM to X11

```bash
sudo mkdir -p /etc/sddm.conf.d
sudo tee /etc/sddm.conf.d/kde-settings.conf > /dev/null << 'EOF'
[Autologin]
Session=plasma-x11
EOF
```

Then reboot.

## Alternative: Check SDDM config

```bash
# See what SDDM is configured to use
cat /etc/sddm.conf 2>/dev/null
cat /etc/sddm.conf.d/*.conf 2>/dev/null

# Check available sessions
ls /usr/share/xsessions/
ls /usr/share/wayland-sessions/
```

## If Still Broken

1. **NVIDIA DKMS module not built for current kernel** — rebuild:
   ```bash
   sudo dkms install -m nvidia -v $(modinfo -F version nvidia 2>/dev/null || echo "610.43.02") -k $(uname -r)
   ```
   Note: `nvidia-open-dkms` registers as DKMS module name `nvidia`, NOT `nvidia-open`.

2. **Rollback NVIDIA driver** — if recently updated:
   ```bash
   # Check available versions in pacman cache
   ls /var/cache/pacman/pkg/nvidia* 2>/dev/null | tail -5
   # Downgrade (example)
   sudo pacman -U /var/cache/pacman/pkg/nvidia-565.77-1-x86_64.pkg.tar.zst
   ```

3. **Reset KDE/Plasma config** — corrupt user config can cause black screen:
   ```bash
   mv ~/.config ~/.config.bak
   ```
   (Log out and back in — resets all KDE settings)

## SSH PAM Hang After Black Screen

The black screen state can leave PAM in a bad state, causing SSH to hang
during authentication even though TCP port 22 responds. See
`references/http-ssh-bridge.md` for the workaround.
