Override leftover SDDM drop-ins so the greeter cannot land on a black screen

This commit is contained in:
2026-09-20 07:06:23 -04:00
parent 8f124f47c2
commit 421c58fab0
8 changed files with 103 additions and 22 deletions
+3 -1
View File
@@ -86,7 +86,9 @@ It runs these steps, in this order, and every one of them is idempotent:
Step 8 is the one a plain Arch install cannot do without: SDDM's stock Wayland
greeter runs on `weston`, which Blob does not install, so the greeter is pointed
at Hyprland instead. [install.md](docs/install.md) covers each step in full.
at Hyprland instead. It also reports any leftover drop-in that autologs into a
session that is not installed, which is what a black screen with no login prompt
usually is. [install.md](docs/install.md) covers each step in full.
To back out, `./uninstall.sh` removes the session entry, the config, the user
services, and the symlink, restoring any `.bak` the installer made. The
+9
View File
@@ -0,0 +1,9 @@
misc {
disable_hyprland_logo = true
disable_splash_rendering = true
force_default_wallpaper = 0
}
animations {
enabled = false
}
-11
View File
@@ -1,11 +0,0 @@
hl.config({
misc = {
disable_hyprland_logo = true,
disable_splash_rendering = true,
force_default_wallpaper = 0,
},
animations = {
enabled = false,
},
})
@@ -2,7 +2,14 @@
DisplayServer=wayland
[Wayland]
CompositorCommand=start-hyprland -- --config /etc/sddm/hyprland-greeter.lua
CompositorCommand=start-hyprland -- --config /etc/sddm/hyprland-greeter.conf
[Theme]
Current=
[Autologin]
User=
Session=
[Users]
RememberLastUser=true
+21 -2
View File
@@ -43,14 +43,33 @@ with `--check`.
| File | Why |
| --- | --- |
| `/usr/local/share/wayland-sessions/blob.desktop` | the session SDDM offers |
| `/etc/sddm.conf.d/10-blob.conf` | Wayland greeter, run on Hyprland, remember the last session |
| `/etc/sddm/hyprland-greeter.lua` | the greeter's own tiny Hyprland config |
| `/etc/sddm.conf.d/zz-blob.conf` | Wayland greeter, run on Hyprland, stock theme, remember the last session |
| `/etc/sddm/hyprland-greeter.conf` | the greeter's own tiny Hyprland config |
The greeter config matters more than it looks: SDDM's stock Wayland greeter
runs on `weston`, which Blob does not install, so a default SDDM would fail
to draw anything. `sddm.service` is enabled and the default systemd target is
set to `graphical.target`, which an Arch install without a display manager
does not have.
The `zz-` prefix is load-bearing. SDDM reads `/etc/sddm.conf.d` in
alphabetical order and the last file wins, so a leftover `10-wayland.conf`,
`10-theme.conf` or `autologin.conf` from another desktop would otherwise
override Blob's. For the same reason `zz-blob.conf` blanks `Theme` and
`Autologin`: a greeter pointed at an uninstalled theme, or an autologin
pointed at a session entry that no longer exists, leaves SDDM on a black
screen it never falls back from, and the only way in is a TTY.
The Omarchy ISO wrote exactly such an autologin, owned by no package, so it
outlives Omarchy. The installer reports it and overrides it; deleting it stops
the warning:
```bash
sudo rm /etc/sddm.conf.d/autologin.conf
```
`--autologin` writes `zzz-blob-autologin.conf`, the only file that sorts after
`zz-blob.conf`.
9. **Launch.** When the installer was run from a console and nothing graphical
is running, it starts `sddm.service` so the desktop appears without a reboot.
`--no-launch` prints the command instead. `--autologin` writes
+1
View File
@@ -74,6 +74,7 @@ install_login_config
install_session_entry
install_autologin
enable_display_manager
report_login_conflicts
say ""
if [[ $check == true ]]; then
+58 -7
View File
@@ -1,13 +1,21 @@
session_entry_dir=/usr/local/share/wayland-sessions
greeter_compositor_config=/etc/sddm/hyprland-greeter.lua
session_entry_search_dirs=(/usr/local/share/wayland-sessions /usr/share/wayland-sessions)
greeter_config_dir=/etc/sddm.conf.d
greeter_compositor_config=/etc/sddm/hyprland-greeter.conf
# SDDM reads /etc/sddm.conf.d in alphabetical order and the last file wins, so
# Blob's drop-ins are named to sort after anything a distribution, an installer
# ISO, or a previous desktop left behind.
blob_greeter_conf="$greeter_config_dir/zz-blob.conf"
blob_autologin_conf="$greeter_config_dir/zzz-blob-autologin.conf"
# SDDM's stock Wayland greeter runs on weston, which Blob does not install.
# Point it at Hyprland with a greeter-only config instead.
install_login_config() {
install_root_file "$repo_dir/default/sddm/hyprland-greeter.lua" \
"$greeter_compositor_config" "sddm/hyprland-greeter.lua"
install_root_file "$repo_dir/default/sddm/10-blob.conf" \
/etc/sddm.conf.d/10-blob.conf "sddm.conf.d/10-blob.conf"
install_root_file "$repo_dir/default/sddm/hyprland-greeter.conf" \
"$greeter_compositor_config" "sddm/hyprland-greeter.conf"
install_root_file "$repo_dir/default/sddm/zz-blob.conf" \
"$blob_greeter_conf" "sddm.conf.d/zz-blob.conf"
}
install_session_entry() {
@@ -23,11 +31,54 @@ install_autologin() {
local generated
generated="$(mktemp)"
printf '[Autologin]\nUser=%s\nSession=blob.desktop\n' "$USER" >"$generated"
install_root_file "$generated" \
/etc/sddm.conf.d/99-blob-autologin.conf "sddm.conf.d/99-blob-autologin.conf"
install_root_file "$generated" "$blob_autologin_conf" "sddm.conf.d/zzz-blob-autologin.conf"
rm -f "$generated"
}
session_entry_exists() {
local entry="$1"
local dir
for dir in "${session_entry_search_dirs[@]}"; do
[[ -e $dir/$entry ]] && return 0
done
return 1
}
setting_value() {
local file="$1" key="$2"
sed -n "s/^[[:space:]]*$key[[:space:]]*=[[:space:]]*//p" "$file" | tail -1
}
# zz-blob.conf blanks Theme and Autologin, so a leftover drop-in cannot point the
# greeter at a theme that was uninstalled or autolog into a session that no
# longer exists. Either one leaves SDDM on a black screen it never falls back
# from. Report the leftovers anyway: the file is confusing to find later, and the
# Omarchy ISO wrote an autologin that no package owns, so it outlives Omarchy.
report_login_conflicts() {
local file session
local found=false
for file in "$greeter_config_dir"/*.conf; do
[[ -e $file ]] || continue
[[ $file == "$blob_greeter_conf" || $file == "$blob_autologin_conf" ]] && continue
session="$(setting_value "$file" Session)"
[[ -n $session ]] || continue
session_entry_exists "$session" && continue
found=true
say "WARN $file autologs into $session, which is not installed"
done
if [[ $found == true ]]; then
say " Blob's config overrides it, so the greeter still comes up."
say " Delete the file to stop it coming back."
fi
}
# Enabling sddm is not enough on a machine installed without a display manager:
# its default target is multi-user.target, which never pulls in graphical.target.
enable_display_manager() {
+3
View File
@@ -7,6 +7,9 @@ config_dir="$HOME/.config"
session_entry="/usr/local/share/wayland-sessions/blob.desktop"
root_files=(
/etc/sddm.conf.d/zz-blob.conf
/etc/sddm.conf.d/zzz-blob-autologin.conf
/etc/sddm/hyprland-greeter.conf
/etc/sddm.conf.d/10-blob.conf
/etc/sddm.conf.d/99-blob-autologin.conf
/etc/sddm/hyprland-greeter.lua