10 Comments

Summary:

Got browser tabs that don’t seem to retain their data in Chrome OS? The problem is annoying, particularly if you open and close numerous tabs during a session. This one command line is a big help to reduce the issue.

Acer C7 Chromebook

Several Google Chromebooks, particularly the lower-priced models, come with just 2 GB of memory and for some, that’s just not enough. What often happens is that as more browser tabs are opened, data on older tabs simply disappears. These tabs have to be refreshed and that’s not ideal, especially if those tabs are being used for any communications or media consumption.

The problem happens on Chromebooks with 4 GB of RAM as well, but much less often. Still, even on the Chromebook Pixel, I experience it from time to time. The good news is that regardless of your Chromebook model, one quick command line with a restart can definitely help. The solution uses zRam or compressed swap space and you can use it on a Chromebook because it’s part of Linux, which is the underlying core of a Chrome OS device.

Essentially, zRam creates a swap disk to virtually increase the amount of memory your system can use. This is a description from the zRAM / compressed cache project site:

“This project creates RAM based block device (named zram) which acts as swap disk. Pages swapped to this disk are compressed and stored in memory itself. Compressing pages and keeping them in RAM virtually increases its capacity. This allows more applications to fit in given amount of memory.”

Here are the simple steps I found in the Chromebook Central Google Group to enable it:

  1. Open up a terminal tab with the CTRL + ALT + T keys.
  2. Type “swap enable” (without the quotes).
  3. Restart your Chromebook.

That’s it! The change is persistent, meaning the swap file will stay active after each restart. If you want to disable it, just follow the same instructions but type “disable” instead of “enable.” And if you want to manage the actual size of the swap file, you can do that too: When enabling it, follow the command with a number representing the size of the swap file in megabytes.

Enable zRam

I’ve used this function on several Chromebook models and have noticed that blank tabs are mostly a thing of the past, even after opening and closing dozens of tabs during a typical day.

The nice thing is that you have nothing to lose by enabling the swap function since it can easily be disabled. Even better: As of last month, Google is experimenting to see if enabling swap by default is a viable option.

  1. Cool. Now how do I get a file out of a zipped archive?

    Share
    1. Yup, it’s pretty easy as noted above. On my Chromebook, I just downloaded a Zip file and went into the Files app. The Zip folder appears like a removable drive on the left and the contents appear on the right. You can open any of those files or move them to Google Drive, local storage, etc…

      Share
      1. Hi I’ve got the same problem as James love and did as you suggested but I’m still not able to open those files (songs). What should I do?

        Share
  2. @james: thats pretty easy. Just double click on it in the File manager

    Share
  3. So I should type
    Swap enable 2000
    Or
    Swap enable [2000]
    for an extra of 2GB?

    Share
    1. No brackets needed; just type swap enable 2000.

      Share
    2. Technically it’s swap enable 2048 to have exactly 2GB if you do 2000 it’s 1.95GB

      Share
  4. thanks

    Share
  5. Thanks for the tip, I just ordered my 1st Chromebook yesterday and I should have it by this coming Tuesday.

    Share
  6. Jack Fitzpatrick Sunday, May 5, 2013

    could you do this with a windows 7 comp

    Share

Comments have been disabled for this post