Key file not found

Yesterday I did a new installation on my laptop. With luks encrypted btrfs and a swap partition for hibernation. The installer gave me these options.

But now, when I start the laptop it says:

Failed to open key file.
ERROR: resume: hibernation device '/dev/mapper/luks.....'

Nevertheless the laptop starts and I can log in. And the free command shows that swap is on.

Any idea what is going on here? I certainly need hibernation.

No resolution found yet …

What are the contents of /etc/crypttab ?

Can you decrypt from live environment using the keyfile?

sudo cryptsetup open /dev/sdxY --key-file=[path]crypto_keyfile.bin crypt

Personally I think this is an existing issue with the new installer and btrfs on luks with swap.

swap is working just fine. The system is swapping. I checked it with the stress tool. That tells me that the key file is working. key file in crypttab is /crypto_keyfile.bin. Same file as for /.
It is just not resuming from it.

Curious. I dumped my Arch and moved to EndeavourOS to one machine and had same error on fresh install too. Same as @Moultipass fresh install.

“Failed to open key file” at boot, after GRUB

Although I can easily re-install and run my package scripts & configs to be back up and running in 15 mins…still would be curious on this :slight_smile: :male_detective:

@mbod I found a github issue that has a suggested fix and at first glance looks like it resolved this issue on my manjaro system, needs more testing though.

1 Like

should work what I give there tested by myself and this guy there too already …
But indeed needs more testing or better background information…
Best way to set up hibernation in BTRFS encrypted subvol system is to use swapfile…

I was considering a swap file on btrfs. But the documentation says it needs to be located on an uncompressed volume. Didnt want to look up how to do that. And resume_offset calculation is more complicate too. I didnt want to go that way. Too complicated. I am back to XFS + swapfile.