I have Ubuntu 12.10 installed on an SSD with the swap partition on the same disk. Now I want to use the swap partition only for hibernating (not for swapping memory) because the SSD don't like the type of usage required for a memory.

I can hibernate my computer, but after I restorer the system from hibernation it is using the swap partition for swapping memory. I want to disable this behavior and use the swap for hibernating ONLY.

Is it possible somehow?

  • How much RAM? Is swap used at all? If it is how much/often then? – Takkat May 21 '13 at 14:14
  • 1
    I have 8GB RAM, but after I restore the system from hibernation, the system is using 100-500MB swap although I have a few GB free RAM. – SqrtPi May 22 '13 at 17:00

I won't copy and paste the entire article, but I think this is what you want:

The first link is a succinct Debian article which should be close enough to get it working on Ubuntu. The second is an article using Kubuntu which should be closer to home but it looks like the same process as the Debian link just spanned over five pages with a bunch of fluff in between.

Pick your poison. :)

  • 2
    Setting "vm.swappiness=1" will suffice. The rest isn't completely relevant. – WhyNotHugo Aug 2 '13 at 3:08
  • 1
    I read both but seems a little outdated. Could you explayn the steps in a (now systemd) recent Ubuntu? – Joaquín Aramendía Sep 29 '17 at 12:56
  • Setting vm.swappiness=1 imo should be the answer. Default 60 is really annoying especially if you have encrypted swap partition. – lava-lava Sep 10 '20 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.