LUKS losing it over RAM upgrade

Can anyone make sense of this?:

I have an older system which I use as a homeserver and for a little tinkering.

It‘s a 7700k with 32 GB of 2666 MT/s DDR4 RAM. It runs Ubuntu server 21.10 with LUKS encryption.

Lately I have decomissioned another system and I decided to add it‘s RAM to the server. The RAM is actually the other half of a 64 GB kit with even consecutive serial numbers.

Now the catch: when I add the additional RAM LUKS won‘t accept my passphrase at boot time. I cannot unlock the boot drive.

When I remove half of the RAM it all works fine again.

This is reproducible.

And I can‘t make any sense of it.

Any ideas? Anyone?

Oh yes:

The RAM is not faulty, it works with any two of the sticks in any of the 4 slots.

Is the LUKS prompt coming from your initramfs loaded by the bootloader?

Are you able to enter something for it to try to unlock and give an error, or are you not able to enter anything at all?

Perhaps the USB driver for the keyboard is not loading - are you able to add rd.break=cmdline (dracut) or break=init (mkinitcpio) to the kernel parameters in the bootloader to get a interactive initramfs shell? does the keyboard work there? is the expected block devices showing there? can you run cryptsetup luksOpen /dev/... cryptdevname there to create the dm-crypt device? is the dm_crypt module loaded there? Any errors in dmesg?

Perhaps the drive order has changed when the hardware was changed - are you passing the block device containing the root fs as a UUID/label or a kernel device name (sda2 etc)?

There could still be a hardware fault affecting the RAM,or the timing is on the edge - did you try a memtest?

2 Likes

@xzpfzxds has voiced some good ideas. Please also check if luks, for whatever reason, might have changed the keyboard layout. I have experienced this myself in the past, since I am using a non-english layout by default. In any case I want to encourage you to file a bug report.

1 Like

Did you confirm with Memtest86? 4 sticks puts extra strain on the memory controller and may not be validated for XMP speeds in your mobo. Are your memory sticks single or dual rank? 4 sticks of dual rank is effectively quad rank and probably won’t work on a consumer board.

1 Like

Turning off XMP and check on CPU spec sheets for max supported memory speeds and turn down the clock speed accordingly. I’m running 4x dual rank myself and this configuration is usually only supported on much lower memory speeds (2666 instead of 3200 on modern Ryzen, in my case)

1 Like