You are not logged in.
When I do the following:
1. sshfs -o allow_other [some server] /mnt/server
2. sudo cryptsetup open /mnt/server/some_luks_container.img cryptcontainer
3. sudo mount /dev/mapper/cryptcontainer /mnt/container
then I can access the files in the container etc..., no problem
but if I close my laptop, something goes wrong at that point: normally the laptop's LED light starts slowly pulsing when it's closed, but now it stays fully on
if I then open my laptop, the screen is black, and everything is frozen, the only way to use it again is to reboot
I could reproduce this many times. if I umount /mnt/container before closing it, this doesn't happen, but obviously I don't want to have to think about that every single time I close my laptop to stop a freeze
It's also only the 3th step that causes the actual freeze. If I do the sshfs, and the cryptsetup open, but not the mount in step 3, the freeze doesn't happen (even though step 1 also already opens some remote filesystem locally)
What could be causing this freeze?
How can I fix this issue? The expected behavior is that closing the laptop suspends it, opening makes it work again without rebooting, no matter what I have mounted and if it's remote or not
Thanks!
EDIT:
one clue is that when closing lid in normal circumstances without hang, there's "Filesystems sync: 0.001 seconds" in the log. When the hang does happen, an entry like that is completely missing from the log.
When it hangs, multiple "lid opened" "list closed" events are logged in the log from each of my attempts though so it's not truly hanging, something is still able to write stuff to the log. But no login screen, just unresponsive black screen
So I think the 'Filesystems sync' is what's making the suspend and login screen fail due to hanging... would that be fixable?
Last edited by aardwolf (2025-01-10 21:08:20)
Offline
Since you (root) mount the remote container manually and over a user session, the system can't know how to disassemble it. You either need to automate the mount via fstab/crypttab, or create custom units to unmount it on suspend.
One thing you can try prior:
$ systemctl soft-reboot
If this succeeds and returns to login, you can close the lid and it will suspend but obviously the active session is ended (unsaved data lost).
Offline