Linux 6.12 Nucleus Change Causes ZRAM Issues

Users of systems using the ZRAM mechanism to store the swapping section in compressed form collided with the problem, leading to download failure after updating the Linux kernel to version 6.12. The issue is observed in Gentoo, VOID, and other distributions that support ZRAM and provide packages with new kernel versions.

The cause of the failure was the change in the 6.12 kernel, which added the ability to choose compression algorithms dynamically. This change also affected the logic of selecting available compression algorithms during kernel assembly in Kconfig. This alteration resulted in issues with default settings in distributions and specifically did not include all available ZRAM algorithms in the Kconfig configuration for kernel 6.12.

Following the update to kernel 6.12, only a basic compression algorithm was set by default in such distributions, leaving out other supported algorithms. Therefore, attempts to enable ZRAM with algorithms different from the default one led to loading failures. For instance, selecting the LZ4 algorithm during load caused an error “Zramctl: /dev/zram0: Failed to set algorithm: Invalid Argument” as only LZO, LZ4, LZ4HC, ZSWAP, and ZSTD were supported.

The problem was resolved by including compression separately in KCONFIG (config_zram_backend_* were added in kernel 6.12).

/Reports, release notes, official announcements.