agherzan / yubikey-full-disk-encryption

Use YubiKey to unlock a LUKS partition
Apache License 2.0
795 stars 50 forks source link

Suspend on ram fails when using luks on lvm #51

Closed PhotonQuantum closed 3 years ago

PhotonQuantum commented 5 years ago

We've already known that ext4 barrier prevents system from suspending, so remounting cryptdevice with nobarrier option will solve the problem.

But src/ykfde-suspend#L79 can't handle ext4 filesystems on lvm layers as is described at ArchWiki now, hanging the suspend process.

I believe that the problem can be solved by detecting ext4 filesystems running on crypted lvms and remount them accordingly, or adding a config option to allow users specify their own ext4 logic partitions.

However, I haven't figured out yet whether these approaches are feasible and how they can be implemented. Any ideas?

agherzan commented 5 years ago

I think we should probably expose a knob for this. cc @Vincent43

Vincent43 commented 4 years ago

I found something that can help fixing this: https://github.com/jrouleau/arch-luks-suspend/commit/89b075a9c7c6eaa91aedd1a03f71f280264b2b28

Vincent43 commented 3 years ago

Fixed by https://github.com/agherzan/yubikey-full-disk-encryption/commit/4fa9737d2066b3da672f4ce3715f6a7c37f7f987