LUKS: IO error while decrypting keyslot

After updating my laptop from Ubuntu 23.04 to 23.10 it got stuck at boot while decrypting my LUKS volume:

LUKS error message on boot

This is the first time in years I’m facing such an issue after an Ubuntu update, I wasn’t expecting the process to not complete successfully. But sure, it’s Linux after all so there should be a way to fix this.

Rebooting on the previous kernel (6.2, from 23.04) made LUKS properly decrypt my volume which is good - at least my data is recoverable. After looking up online, I saw an Arch topic about a similar issue with the kernel 6.4.11, and then a LKML thread talking about something promising too.

A change in 6.4.11 with the rtsx_pci module - a card reader - prevents the NVMe controller in various laptop models to not work properly and thus the machine from booting properly.

Impacted models seems to include (amongst others) Dell XPS 15 9560 and Dell Precision 5520.


The good news is that a workaround exists, by disabling the culprit (and thus disabling that card reader):

  1. Create /etc/modprobe.d/blacklist_rtsx_pci.conf and add he following two lines
blacklist rtsx_pci
blacklist rtsx_pci_sdmmc
  1. Re-generate your initramfs: sudo update-initramfs -c -k all
  2. Reboot

Your laptop should now boot successfully with the kernel 6.5.

This issue will likely get fixed in a future kernel update, at which point you will be able to remove /etc/modprobe.d/blacklist_rtsx_pci.conf entirely.