You are not logged in.
## Problem Description
I'm experiencing a shutdown hang issue specifically when rebooting from within a KDE desktop session on an Arch Linux system with ZFS root filesystem. The system hangs during shutdown with failed unmounting errors.
## System Information
- **OS**: Arch Linux
- **Desktop Environment**: KDE Plasma with SDDM
- **Filesystem**: ZFS (zroot pool with separate datasets)
- **Kernel**: Linux 6.12.45-1-lts
## ZFS Layout
```
NAME USED AVAIL REFER MOUNTPOINT
zroot 189G 680G 96K none
zroot/ROOT 9.78G 680G 96K none
zroot/ROOT/root 9.78G 680G 8.72G /
zroot/docker 396K 680G 396K /var/lib/docker
zroot/games 149G 680G 149G /games
zroot/home 18.3G 680G 18.2G /home
zroot/share 6.38G 680G 6.38G /share
zroot/tmp 31.2M 680G 31.2M /tmp
zroot/var 5.34G 680G 190M /var
zroot/var/cache 5.14G 680G 5.14G /var/cache
zroot/var/log 608K 680G 372K /var/log
```
## Symptoms
### What Works:
- KDE's built-in restart function (GUI restart button)
- `sudo systemctl reboot` from TTY (without logging into KDE)
- `sudo systemctl reboot` before logging into KDE through SDDM
### What Fails:
- `sudo systemctl reboot` executed from terminal **after** logging into KDE desktop environment
## Error Details
Screenshot during shutdown hang is here:
Screenshots
When the system hangs, I see these errors:
- `failed unmounting home.mount`
- `failed unmounting /var/cache`
- `failed unmounting /var`
- `systemd-shutdown[1]: waiting for process: 1474 (kded6)`
Has anyone else encountered similar ZFS + KDE shutdown issues on Arch Linux? Is there any reasonable fix for this?
Any insights or suggestions would be greatly appreciated. This seems like it could be a common issue for ZFS + KDE users, but I haven't found much documentation about it.
Offline
To follow up, I would like to provide some new findings about the problem.
# Additional Findings
- Linger: `loginctl show-user $USER` reports `Linger=no`.
- Inhibitors: `systemd-inhibit --list` shows only sleep/power-related inhibitors (e.g., NetworkManager, UPower, PowerDevil, screen lock); no explicit shutdown inhibitors.
- Processes holding mounts: `lsof`/`fuser` indicate multiple user processes mapped to `/home` and `/var/cache` at shutdown time, including `kded6`, `plasmashell`, `kwin_wayland`, `DiscoverNotifier`, `code`, `firefox`, `thunderbird`, `steam`, `fcitx5`, `kioworker`, etc.
- PackageKit: not installed/disabled (so Discover/PackageKit is unlikely to be the `/var/cache` holder here).
- Diagnostic confirmation: If I end the user manager first and then reboot, the reboot completes cleanly. This strongly suggests a user-session termination ordering/timing issue rather than a ZFS core service fault.
# Repro Steps
1) Log into KDE (Wayland session via SDDM).
2) Use the session normally (apps like Firefox, Code, etc.).
3) Run `sudo systemctl reboot` from a terminal inside KDE.
4) During shutdown, it often hangs with unmount failures and `systemd-shutdown[1]: waiting for process: kded6`.
# Maybe a working solution?
`systemctl --user exit && sudo systemctl reboot`: logout first, then reboot.
Offline