Artix Linux Forum

Artix Linux => System => Topic started by: Samueru on 13 June 2025, 23:44:34

Title: Kernel 6.15.2-artix1-1 breaks zramen
Post by: Samueru on 13 June 2025, 23:44:34
Code: [Select]
doas zramen make -s 100 -a zstd
zramen#info: zram module already loaded
zramen#info: Attempting to initialize free device
zramen#info: Attempting to initialize free device
zramen#info: Attempting to initialize free device
zramen#info: Attempting to initialize free device
zramen#info: Attempting to initialize free device
zramen#info: Attempting to initialize free device
zramen#info: Attempting to initialize free device
zramen#info: Attempting to initialize free device
zramen#info: Attempting to initialize free device
zramen#info: Attempting to initialize free device
zramen#warn: Could not get free zram device

Nothing gets created as result, rolling back to kernel 6.14.10-artix1-1 works (as well as using the lts kernel).

Also the Artix package is still on version 0.2.1 while zramen is already on version 0.7.1 👀
Title: Re: Kernel 6.15.2-artix1-1 breaks zramen
Post by: Caramon2 on 14 June 2025, 09:44:28
Here zRAM works:
Code: [Select]
$ uname -a
Linux linux 6.15.2-artix1-1 #1 SMP PREEMPT_DYNAMIC Wed, 11 Jun 2025 07:37:25 +0000 x86_64 GNU/Linux
$ zramctl
NAME       ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram0 lz4          31,3G   4K   44B    4K         [SWAP]

But I'm using it with rc.local:
Code: [Select]
$ cat /etc/rc.local 
#!/bin/sh

# zRAM-Swap (für stärkere, aber langsamere Kompression, "lz4" durch "zstd" ersetzen):
modprobe zram && echo lz4 > /sys/block/zram0/comp_algorithm && echo $(($(grep 'MemTotal:' /proc/meminfo|awk '{print $2}')*1/1))K > /sys/block/zram0/disksize && mkswap -qU clear /dev/zram0 && swapon -p100 /dev/zram0

exit 0
Title: Re: Kernel 6.15.2-artix1-1 breaks zramen
Post by: Samueru on 14 June 2025, 22:13:07
Here zRAM works:
Code: [Select]
$ uname -a
Linux linux 6.15.2-artix1-1 #1 SMP PREEMPT_DYNAMIC Wed, 11 Jun 2025 07:37:25 +0000 x86_64 GNU/Linux
$ zramctl
NAME       ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram0 lz4          31,3G   4K   44B    4K         [SWAP]

But I'm using it with rc.local:
Code: [Select]
$ cat /etc/rc.local 
#!/bin/sh

# zRAM-Swap (für stärkere, aber langsamere Kompression, "lz4" durch "zstd" ersetzen):
modprobe zram && echo lz4 > /sys/block/zram0/comp_algorithm && echo $(($(grep 'MemTotal:' /proc/meminfo|awk '{print $2}')*1/1))K > /sys/block/zram0/disksize && mkswap -qU clear /dev/zram0 && swapon -p100 /dev/zram0

exit 0


Thanks this method works,

I will report this to zramen.
Title: Re: Kernel 6.15.2-artix1-1 breaks zramen
Post by: Caramon2 on 16 June 2025, 12:11:58
Some years ago I used zramen to learn how it works, to do it my way.

So I can use zRAM for compressing RAM-Disks too:

https://forum.artixlinux.org/index.php/topic,7440.msg44869.html#msg44869
Title: Re: Kernel 6.15.2-artix1-1 breaks zramen
Post by: Samueru on 16 June 2025, 15:25:11
Update, I reported the issue and zramen fixed it:

https://github.com/atweiden/zramen/commit/e7a66d085b62f6a9ca43632328c8501a6ee568ba

Indeed it was a change in the kernel.

All that's left is updating the Artix package.
Title: Re: Kernel 6.15.2-artix1-1 breaks zramen
Post by: Ramen on 23 July 2025, 16:56:04
zramen is still outdated
Title: Re: Kernel 6.15.2-artix1-1 breaks zramen
Post by: nous on 23 July 2025, 18:01:06
Updated to latest.