Unmount FUSE filesystems before suspend/hibernate to prevent silent failures

This commit is contained in:
Alan Sikora
2026-03-08 20:39:33 -03:00
parent 524b4415fb
commit f92712541d
3 changed files with 21 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
# Lazy-unmount all FUSE filesystems before suspend/hibernate to prevent the
# kernel's process freeze from timing out. FUSE daemons (like gvfsd-fuse from
# Nautilus) can block in uninterruptible sleep during freeze, causing suspend
# to silently fail. The FUSE daemons restart automatically on wake.
if [[ $1 == "pre" ]]; then
while IFS=' ' read -r _ mountpoint _ fstype _; do
if [[ $fstype == fuse.* ]]; then
fusermount3 -uz "$mountpoint" 2>/dev/null || fusermount -uz "$mountpoint" 2>/dev/null || true
fi
done < /proc/mounts
fi