How to totally disable suspend/hibernation in ubuntu (If all else fails)

This specific content was written 13 years ago. Please keep this in mind as it may be outdated and not adhering to best-practices.

Just wanted to share my own experience and the hack I found to deal with it.

If anyone else needs a temporary solution I think it may work for them if there’s a serious problem with ubuntu linux.I set up ubuntu 10.04 on an IBM thinkcenter A50…(OK, that’s what I was given so I made the best of it).Anyway, I would come back to the lab every morning and find the computer in something like sleep but it would not wake up at all. As I had installed a raid array and had a share this was not good….it was a serious problem.I disabled everything in the bios, disabled acpi in the kernel options, disabled sleep in the power options within Ubuntu to no avail after losing a few days troubleshooting.
I even tried poking the monitor off and on and various such options.At that point the following options were available that I knew of:
1) Install another linux distro (e.g. ubuntu server)
2) Install another OS e.g. Free NAS
3) if 1 and 2 failed build another pc using another motherboard.
4) Try updating the kernel…

However, being in a jam due to time pressure for other tasks I decided to try adding a cron script to write to a file every few minutes. Surprisingly the server is still up after 2 days and has stopped sleeping.

I suspect reading from a file every 20 minutes, or writing to dev/null may also stop the idle state.

Just my 2 cents about this very frustrating problem and a dirty hack which worked.
“Taking any old pc and calling it a server doesn’t make it so” .

Menelaos



Menelaos Bakopoulos

Menelaos Bakopoulos

Mr. Menelaos Bakopoulos is currently pursuing his PhD both at Center for TeleInFrastruktur (CTiF) at Aalborg University (AAU) in Denmark and Athens Information Technology (AIT) in Athens, Greece. He received a Master in Information Technology and Telecommunications Systems from Athens Information Technology and a B.Sc. in Computer Science & Management Information Systems from the American College of Thessaloniki. Since April 2008 he has been a member of the Multimedia, Knowledge, and Web Technologies Group.

More Posts