Users of systems utilizing the zRAM mechanism for compressed swap space in memory faced a boot failure issue after upgrading the Linux kernel to version 6.12. The problem occurs in Gentoo, Void, and other distributions that support zRAM and provide packages with the new kernel versions.
The cause of the failure was a change included in kernel 6.12 that adds the ability to configure compression algorithms at runtime. Additionally, the logic for selecting available compression algorithms was altered in Kconfig during the kernel build stage. This change led to issues in distributions that relied on default settings and did not separately enable all available zRAM algorithms in their Kconfig for kernel 6.12.
After upgrading to kernel 6.12, the only selectable compression algorithm available in such distributions was the default basic algorithm, instead of all supported algorithms. Consequently, attempting to enable zRAM with algorithms that did not match the default algorithm resulted in a boot failure. For instance, selecting the lz4 algorithm during boot produced the error 'zramctl: /dev/zram0: failed to set algorithm: Invalid argument' since only lzo support remained, instead of the previously supported lzo, lz4, lz4hc, 842, and zstd.
The issue can be resolved by enabling each compression backend individually in Kconfig (the CONFIG_ZRAM_BACKEND_* settings were added in kernel 6.12): CONFIG_ZRAM_BACKEND_LZ4=y CONFIG_ZRAM_BACKEND_LZ4HC=y CONFIG_ZRAM_BACKEND_ZSTD=y CONFIG_ZRAM_BACKEND_842=y CONFIG_ZRAM_DEF_COMP_LZO=y CONFIG_ZRAM_DEF_COMP="lzo"
Source: opennet.ru
