# TPM2 LUKS Unlock not working

**URL:** https://discourse.nixosstag.fcio.net/t/tpm2-luks-unlock-not-working/52342
**Category:** Help
**Created:** [September 18, 2024, 5:13pm UTC](https://discourse.nixosstag.fcio.net/t/tpm2-luks-unlock-not-working/52342 "2024-09-18T17:13:59Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![dinvlad](https://discourse.nixosstag.fcio.net/letter_avatar_proxy/v4/letter/d/858c86/32.png) [@dinvlad](https://discourse.nixosstag.fcio.net/u/dinvlad)
#### Post date: [October 18, 2024, 4:17pm UTC](https://discourse.nixosstag.fcio.net/t/tpm2-luks-unlock-not-working/52342/7 "2024-10-18T16:17:18Z")

</div>

> [@FStefanni](#):
>
> `boot.initrd.systemd.enable = true;`

Just wanted to say thanks, this line was what did the trick for me. The only other things I did earlier were 1) `systemd-cryptenroll` command from above and 2) add `crypttabExtraOpts = ["tpm2-device=auto"];` in Disko. I have removed all the other tpm2\* related settings (incl. kernel modules and packages) from `configuration.nix`, and it still works now!

---

_[View the full topic](https://discourse.nixosstag.fcio.net/t/tpm2-luks-unlock-not-working/52342)._
