Why does OM create zram

Hi all,
I have tried rock, rollong and cooker all with plasma x-11.
I have an old ideapad with an i7-4710mq intergrated graphics and nvidia geforce 840m gpu.
For each install i used manual partitioning to preserve my linuxmint installation and leave empty space for adding other os for testing.
Why does Om create zram and what is it used for?
I have a 16GB swap partition but after booting into to any of the live isos it is not enabled but there is 5.8GB zram mounted as swap, is this normal behavior as i have never seen this in other distros.

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0    7:0    0   2.8G  1 loop /run/initramfs/image
sda      8:0    0 953.9G  0 disk 
├─sda1   8:1    0    16G  0 part 
├─sda2   8:2    0   600G  0 part 
├─sda3   8:3    0     1G  0 part 
├─sda4   8:4    0    50G  0 part 
├─sda5   8:5    0    40G  0 part 
└─sda6   8:6    0    60G  0 part 
sdb      8:16   1     0B  0 disk 
sdc      8:32   1  14.5G  0 disk /run/initramfs/omdv
├─sdc1   8:33   1     3G  0 part 
└─sdc2   8:34   1   6.4M  0 part 
sr0     11:0    1  1024M  0 rom  
zram0  253:0    0   5.8G  0 disk [SWAP]

this is an lsblk after booting into the rome live iso, sda1 is my swap partion

I wanted just a traditional swap partition so I enabled swap and disabled the zram using systemctl stop dev-zram0.swap before reinstallation, on reboot my swap partion is now mounted as expected but so is zram.
If i understand correctly zram uses gpu ram, could this be the source of the nvidia gpu problems
at least the problems i am experiencing (sddm loging me out after a couple of minutes before the proprietary drivers were installed and issues with suspend/resume.
To be clear disabling zram and removing related packages doesn’t solve these problems but could there be some configuration creared during install that prevents things from working correctly afterwards?

1 Like

You can uninstall zram-generator and that should get rid of it.

@richp during the install, did you tell it to swap to file?

But do we know why Zram is being created to begin with? I have it on my Rock installs as well.

1 Like

It looks like OpenMandriva has opted for zram, basically a temp file type thing, rather than a dedicated partition.
I don’t know enough about calamares, but I’m sure it could be configured to disable zram if the user makes a swap partition.

That’s why I was curious if he selected swap to file.

Iv’e just installed rome again, this time not only disabling zram but also removing zram-generator before starting the installer. After booting into the new system zram is still there. Is there a way to install without creating zram?

1 Like

Well, this is above my pay grade.

no i just enabled swap before starting the installer so that calamares would add it to the fstab. I dont even know how to select swap to file i didnt see an option for that.

I noticed somethng else strange. On the installs i have done where i enabled my swap partition and disabled vram the plasma shell crashes shortly after the actual install begins, this dosent affect the install its self but it didn’t happen before i started messing with swap and vram. On the last install i checked lsblk after the crash and my swap partition was no longer mounted. I dont know if this info is relevant or not. The install is so quick im happy to try any suggestions.

@richp You may want to check out this OMLx how-to on Zram. It includes a portion on how to uninstall it.

this how-to probably needs to be scrubbed or updated since zram is by default.

Personally, I like zram and was uber glad when I saw it was already set up… but unhappy because I had already set it up manually… and had a couple zrams! :smiley:

I had seen this but i think its out of date because none of those services were enabled and zram-init wasnt installed instead i had to use
systemctl stop dev-zram0.swap
and uninstall zram-generator
but what i want to do is install rome without creating the zram in the first place if that is possible.

I asked for a swap file and I only see one. I do see a swap partition, but I believe that is built into the BTRFS subvolumes.

┌──[wilson@heisenberg] Thu Jan 23, 08:41:19 [~] 
└──[ <$> /bin/lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0   3.7T  0 disk 
└─sda1        8:1    0   3.7T  0 part /4TB-SSD1
sdb           8:16   0   3.7T  0 disk 
└─sdb1        8:17   0   3.7T  0 part /4TB-SSD2
sdc           8:32   0   3.6T  0 disk 
└─sdc1        8:33   0   3.6T  0 part /4TB-HDD
zram0       253:0    0     8G  0 disk [SWAP]
nvme1n1     259:0    0 953.9G  0 disk 
└─nvme1n1p1 259:1    0 953.9G  0 part /backup2
nvme0n1     259:2    0 953.9G  0 disk 
└─nvme0n1p1 259:3    0 953.9G  0 part /backup1
nvme2n1     259:4    0 931.5G  0 disk 
├─nvme2n1p1 259:5    0   300M  0 part /boot/efi
└─nvme2n1p2 259:6    0 931.2G  0 part /home
                                      /var/cache
                                      /var/log
                                      /boot
                                      /swap
                                      /

Just checked my fstab and swap is not mentioned

# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=7AD8-343D  /boot/efi       vfat    umask=0077      0       1
UUID=7426beca-d71a-462b-9333-de262a770227 /data          ext4    defaults,noatime,discard 0 2
UUID=1b33e4c4-a2bf-4cfd-9ac1-567ffc5ae555 /              ext4    defaults,noatime,discard 0 1
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0

so if swap isn’t being enabled by the fstab what is?

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 953.9G  0 disk 
├─sda1   8:1    0    16G  0 part [SWAP]
├─sda2   8:2    0   600G  0 part /data
├─sda3   8:3    0     1G  0 part 
├─sda4   8:4    0    50G  0 part 
├─sda5   8:5    0    40G  0 part 
├─sda6   8:6    0    60G  0 part 
├─sda7   8:7    0    80G  0 part /
├─sda8   8:8    0     1G  0 part /boot/efi
└─sda9   8:9    0    80G  0 part 
sdb      8:16   1     0B  0 disk 
sr0     11:0    1  1024M  0 rom  

Just to be sure this is the result of lsblk and

[rich@Z710-OMrome ~]$ sudo swapon -s
Filename                                Type            Size            Used            Priority
/dev/sda1                               partition       16777212        0               -2
[rich@Z710-OMrome ~]$ cat /etc/fstab
# /etc/fstab: static file system information.

I checked the fstab because i thought maybe i needed to change the priority but obiously i cant do it there.

When you do a swapon to enable the swap, it should put the partition in fstab for you.

It was alreay enabled i used the command to to see the priority i dont understand why its -2