How to disable Zram?


Askarus

Forum Addict!
Joined
Sep 28, 2011
Messages
5,006
Location
Germany
I have some game which needs a little zram.

It's less than 60 MB.

The game is pretty slow so I wanted to test if there's some noticeable speed improvement with zram disabled.

What I want to do is to use the full 512 MB of RAM without compression and zram swapping.

So how can I disable zram (and enable it after my experiment)?
 
Try with the swaptool ..i don't know if it works as i have used only for enablind an SD card based swapfile, but i see a voice in list about zram.
 
sudo swapoff /dev/zram0

... then I think sudo swapon /dev/zram0 should work to re-enable it, and it is also enabled on each boot, so if all else fails reboot...
 
Doesn't the:

swapoff -a

command work?

Ah above works too, more specific if you have other swap enabled. :ph34r:
 
Last edited by a moderator:
Yeah I might have like 3 swaps (zram + one on both SDs) enabled at any one point, so swapoff -a would be overkill if I wanted to disable zram, so that is why I posted what I posted.
 
Swap is off but it's not what I need.

Now Sysinfo says:

Used = 206M

Buffer cache = 261 M

Unused = 20 M

~ 480M.

I want the full 512M for my test.
 
Probably:

sudo swapoff /dev/zram0

Will not be persistent, just reboot to re enable, or:

sudo swapon -p 5 /dev/zram0
 
 
Is there a permanent way to disable zRam? I had some bad experiences with it on my N900 and my current Android ...
 
Is there a permanent way to disable zRam? I had some bad experiences with it on my N900 and my current Android ...
In /etc/modules comment out or delete the last line (zram).

Probably best to comment out the corresponding lines in /etc/init.d/pandora-state too (mksap and swapon on /dev/zram0, line 84/85 in my version). Doesn't seem configurable otherwise.
 
Is there a permanent way to disable zRam? I had some bad experiences with it on my N900 and my current Android ...
In /etc/modules comment out or delete the last line (zram).

Probably best to comment out the corresponding lines in /etc/init.d/pandora-state too (mksap and swapon on /dev/zram0, line 84/85 in my version). Doesn't seem configurable otherwise.
Thanks a lot! Worked like a charm :)

Is there something like SuperUser from Android on the Pandora? It would be nice if a program could be granted root on request ... if there even is software that would make use of it. Fumbling around with the terminal is not my favourite cup of tea ;-)
 
You can use /etc/sudoers.d/*

Be careful to edit files with nano, otherwise permissions on these files can be changed, and sudo won't work anymore.

You can also simply use gksu or gksudo.
 
Is there a permanent way to disable zRam? I had some bad experiences with it on my N900 and my current Android ...
In /etc/modules comment out or delete the last line (zram).

Probably best to comment out the corresponding lines in /etc/init.d/pandora-state too (mksap and swapon on /dev/zram0, line 84/85 in my version). Doesn't seem configurable otherwise.
i searched hours for this! Thanks a lot.

ps. sorry for digging out this old thread :rolleyes:
 
Now that this thread has been revived, here is some potentially interesting information for those who want to have as much usable RAM as possible:
 

Here's a screenshot of Pandora System Info in xfce:
ram-xfce.png


and here is one in Openbox:
ram-openbox.png


So Openbox eats less than 50MB of RAM, while the default xfce eats over 80MB. Either way, there is still well over 400MB of RAM left for applications. You can slim down Openbox even further by disabling the tint2 taskbar and/or the wbar launcher.
This is what I got in MiniMenu:

ram-minimenu.png


I wonder why slim (the login manager) is eating that much memory. Also, why are NetworkManager and modem-manager in memory even when I disabled all wifi stuff? There's probably some room left for further memory footprint reductions. E.g. what does pndnotifyd need memory for (when it's dormant) ?
 
Why are NetworkManager and modem-manager in memory even when I disabled all wifi stuff?
Because Disabling the Wifi doesn't kill Networkmanager? Have a look, the "two screens with red X"-icon is still viewable even with disabled Wifi. On desktop systems this makes sense, because you could use ethernet or USB network instead. But maybe you are right and it would be a good idea to exit Networkmanager if wifi is disabled and restart it if Wifi is enabled again. Maybe as alternative plugin for the Toolbar application or as an optional option (I dunno, whether the toolbar plugins support options).
 
Why are NetworkManager and modem-manager in memory even when I disabled all wifi stuff?
Because Disabling the Wifi doesn't kill Networkmanager? Have a look, the "two screens with red X"-icon is still viewable even with disabled Wifi. On desktop systems this makes sense, because you could use ethernet or USB network instead. But maybe you are right and it would be a good idea to exit Networkmanager if wifi is disabled and restart it if Wifi is enabled again. Maybe as alternative plugin for the Toolbar application or as an optional option (I dunno, whether the toolbar plugins support options).
In OpenBox I can kill the nm-applet which is the tray icon you're referring to.

On the Pandora you can in principle also use USB/ethernet networking, but I don't think lots of people do that, and if they do, it's not a huge problem that they have to activate wifi to make it work.
 
Why are NetworkManager and modem-manager in memory even when I disabled all wifi stuff?
Because Disabling the Wifi doesn't kill Networkmanager? Have a look, the "two screens with red X"-icon is still viewable even with disabled Wifi. On desktop systems this makes sense, because you could use ethernet or USB network instead. But maybe you are right and it would be a good idea to exit Networkmanager if wifi is disabled and restart it if Wifi is enabled again. Maybe as alternative plugin for the Toolbar application or as an optional option (I dunno, whether the toolbar plugins support options).
 In OpenBox I can kill the nm-applet which is the tray icon you're referring to.

On the Pandora you can in principle also use USB/ethernet networking, but I don't think lots of people do that, and if they do, it's not a huge problem that they have to activate wifi to make it work.
As said: Make it an option and everything should be fine. :)
 
I think that external wifi dongles (USB) would also need the networkmanager. So it is not a good idea to disable the nm-applet alongside with the internal wifi.

ps sorry for my bad english it became a little bit rusty over time :ph34r:
 
I think that external wifi dongles (USB) would also need the networkmanager. So it is not a good idea to disable the nm-applet alongside with the internal wifi.

ps sorry for my bad english it became a little bit rusty over time :ph34r:
Yes. So... Let's make this optional! :D
 
Back
Top