Ask Your Question

How to enable zram for Fedora 22

asked 2015-06-08 06:55:51 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

I have been trying to install zram on my Fedora 22 but have had much difficulty. I have used this guide and it hasn't worked. Does anyone know how to help?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2015-06-08 09:13:19 -0600

cobra gravatar image

updated 2015-06-08 09:14:28 -0600

What do you mean 'hasn't worked'? What went wrong?

The package kmod-staging is available in rpmfusion for Fedora 22. You should have tried this process:

  1. Follow the simple guide to add their free and non-free repositories to your system
  2. Open a command prompt with root privileges (either use the su - incantation or use a regular user command prompt and add sudo before every command you issue.
  3. Install kmod-staging with yum install kmod-staging

Is there a reason you need to compress swap? I've had a swap partition but I don't seem to have used any of it for a long time. My computer has more than 2GB memory, and doesn't really need it (unless I'm running huge amounts of unnecessary software, which never happens).

Unless you have a special environment involving small amounts of memory, I'd question whether this would be of any use to you at all. Of course, you know your system better than anyone else, but this may not be needed.

edit flag offensive delete link more


I have to run sudo systemctl start zram.service after every reboot to re-enable, how can this be automatic?

snorrichinchilla gravatar imagesnorrichinchilla ( 2015-06-09 20:12:24 -0600 )edit

All you have to do is sudo systemctl enable zram.service. You can also do it the 'old fashioned' way with chkconfig zram on. While the old way is 'wrong' these days, it still works and it's shorter.

cobra gravatar imagecobra ( 2015-06-10 10:12:25 -0600 )edit

Yes, but zram doesn't start at startup

snorrichinchilla gravatar imagesnorrichinchilla ( 2015-06-10 14:45:09 -0600 )edit

Does it present any errors in the system logs? It could be trying to start it and failing.

cobra gravatar imagecobra ( 2015-06-11 05:40:51 -0600 )edit

It does present errors, and it does work but I have to restart the zram after every reboot with sudo systemctl enable zram.service

snorrichinchilla gravatar imagesnorrichinchilla ( 2015-06-11 18:22:41 -0600 )edit

It is possible for it to fail during boot and then subsequently work once the system settles. Is it attempting to start during boot up but fail? What are the errors that are being reported?

cobra gravatar imagecobra ( 2015-06-12 03:27:06 -0600 )edit

It's missing an [Install] section in the service, maybe because it was only intended to be used upon installation?


xenithorb gravatar imagexenithorb ( 2016-08-18 04:56:55 -0600 )edit

answered 2015-09-02 14:24:24 -0600

Zram is implemented by default in Fedora 22, just run $ sudo systemctl start zram

edit flag offensive delete link more


If you have 2 GB of RAM or more, you may want to change the value of MAX_RAM_ON in /usr/libexec/anaconda/zramswapon

frafra gravatar imagefrafra ( 2015-11-30 04:56:19 -0600 )edit

Question Tools

1 follower


Asked: 2015-06-08 06:55:51 -0600

Seen: 2,757 times

Last updated: Jun 08 '15