Reply to comment

Supend to ram using uswsup on Ubuntu + Nvidia

Uswsusp is a program that allows you to suspend your computer to ram, to disk or even to both disk and then ram. This allows you to resume your work quickly if your battery is still working. If not, your computer will still be able to resume from disk.
Unfortunately, the Ubuntu package does not contain the s2ram binary that just suspends to ram (I don't need s2both nor s2disk on my stationary computer, I just want it to suspend to ram).

To be able to use s2ram on Ubuntu, you have to compile uswsusp by yourself.

Go to: http://prdownloads.sourceforge.net/suspend/suspend-0.8.tar.gz?download and download the sources. Then, untar and compile them.

tar -zxvf suspend-0.8.tar.gz
cd suspend-0.8
./configure && make && sudo make install

Be warned that you will probably need to resolve some dependencies using apt-get or adept (namely: build-essential, pciutils-dev, libx86-dev).

To allow you to suspend your computer without root priviledges, do the following:

sudo chown root:youUserGroup /usr/local/sbin/s2*
sudo chmod u+s /usr/local/sbin/s2*

Finally, if you use an Nvidia graphics card, your X session will probably hang when trying to resume. To make it work correctly, you have to make some changes in xorg.conf.

Open /etc/X11/xorg.conf, find the "Device" section and add the following line:

Option "NvAGP" "1"

Restart your X server (ctrl+alt+backspace) and you should have now suspend to ram working. Just type

s2ram -f

You can now put an icon on the desktop or in the K menu.
If you want, you can make it the default in Ubuntu too but I found that a shortcut in the K menu is easier to use.

Reply

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <span> <img>
  • Lines and paragraphs break automatically.
  • Images can be added to this post.
  • Image links with 'rel="lightbox"' in the <a> tag will appear in a Lightbox when clicked on.
  • Image links from G2 are formatted for use with Lightbox2
  • Image links with 'rel="lightshow"' in the <a> tag will appear in a Lightbox slideshow when clicked on.
  • Links to HTML content with 'rel="lightframe"' in the <a> tag will appear in a Lightbox when clicked on.
  • Links to video content with 'rel="lightvideo"' in the <a> tag will appear in a Lightbox when clicked on.

More information about formatting options