<div dir="ltr">I get an error that the device is not found even though it seems to exist with ls.<br>$ /usr/lib/systemd/system-generators/zram-generator --setup-device /dev/zram0 (base) 19:25:17<br>Error: Device /dev/zram0 not found<br>$ ls -Ah -l /dev/zram0 (base) 19:25:19<br>brw-rw----. 1 root disk 252, 0 2024-11-08 19:22 /dev/zram0<br><br>$ cat /etc/systemd/zram-generator.conf (base) 19:25:26<br>[zram0]<br>zram-size = 32G</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 7, 2024 at 7:35 PM Michal Koutný <<a href="mailto:mkoutny@suse.com">mkoutny@suse.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello Torstein.<br>
<br>
On Tue, Nov 05, 2024 at 03:51:31PM GMT, Torstein Sørnes <<a href="mailto:t.soernes@gmail.com" target="_blank">t.soernes@gmail.com</a>> wrote:<br>
> I have a Fedora 41 laptop with 32GB of ram.<br>
> <br>
> On startup, this shows in the journal:<br>
> ```<br>
> nov. 05 13:58:32 D2S3Q34 zram-generator[1059]: Error: Failed to configure<br>
> disk size into /sys/block/zram0/disksize<br>
> nov. 05 13:58:32 D2S3Q34 zram-generator[1059]: Caused by:<br>
> nov. 05 13:58:32 D2S3Q34 zram-generator[1059]: Cannot allocate memory<br>
> (os error 12)<br>
> nov. 05 13:58:32 D2S3Q34 kernel: zram-generator: vmalloc error: size<br>
> 131072000000000, exceeds total pages, mode:0xdc0(GFP_KERNEL|__GFP_ZERO),<br>
^^^^^^^^^^^^^^^<br>
This value looks suspicious.<br>
<br>
> After starting up, I can execute this series of commands, and successfully<br>
> create a 32GB swap:<br>
> ```<br>
> sudo swapoff /dev/zram0<br>
> sudo zramctl --reset /dev/zram0<br>
> sudo zramctl --find --size 32G<br>
<br>
Notice zramctl operation may differ from zram-generator,<br>
perhaps try with:<br>
/usr/lib/systemd/system-generators/zram-generator --setup-device /dev/zram0<br>
<br>
and what is in your zram-generator.conf?<br>
<br>
Thanks,<br>
Michal<br>
</blockquote></div>