23

I am running a web server at home using Ubuntu 11.4 (maybe? I can't 100% recall) on an older AMD 2400+ desktop with 1 or 2 GB of RAM. Sorry I can't recall the details 100%.

Anyway, I have a KVM hooked up to a monitor and PS2 keyboard that I use to switch between the server and my iMac (The keyboard is only hooked up so I can switch between the two easily. Many times a week, Pingdom will tell me the server is down and I can't hit the server. When I get home (it rarely happens when I am home), I hit the Ctrl key twice to switch to the server, hit the space bar and everything is now up and running again. I need to look again, but I don't believe there is any power saving features turned on in the BIOS.

Does anyone have any other suggestions of what I may have going on? I have my uncle's website running on it now and I really would like to have a better up-time than 95%

As a note, I do not have any GUI installed so everything has to be done on the console (or through WebMin) and I know my way around, but I am by no means experienced.

3
  • Does anything appear in system logs (files under /var/log)? Nov 22, 2011 at 23:34
  • Any logs I should look at in particular?
    – Mike Wills
    Nov 23, 2011 at 4:06
  • I don't know, look for log entries in any file (probably kern.log, but possibly others) created around the time the computer went to sleep. Nov 23, 2011 at 8:28

4 Answers 4

21

Add the kernel options acpi=off apm=off to the contents of GRUB_CMDLINE_LINUX_DEFAULT in file /etc/default/grub

Then run sudo update-grub

Finally reboot your computer.

12
  • Nope, I'll try that.
    – Mike Wills
    Nov 22, 2011 at 20:10
  • Well... I made the change. Only time will tell if it works.
    – Mike Wills
    Nov 23, 2011 at 4:04
  • I need to figure out why yet, but the server just "went down" again.
    – Mike Wills
    Nov 23, 2011 at 16:31
  • 1
    Those kernel options should have completely disabled automatic power management. Did you rebuild grub with the update-grub command? Nov 23, 2011 at 16:35
  • 1
    This caused USB devices to stop working with Ubuntu Server 14.04.3. Jan 21, 2016 at 17:01
17

On Ubuntu 16.04 LTS, I successfully used the following to disable suspend:

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

And this to re-enable it:

sudo systemctl unmask sleep.target suspend.target hibernate.target hybrid-sleep.target
5

Add the kernel options acpi=off apm=off to the contents of GRUB_CMDLINE_LINUX_DEFAULT in file /etc/default/grub

Then run sudo update-grub

Finally reboot your computer.

According to https://wiki.ubuntuusers.de/Bootoptionen its a bad idea to turn off acpi complete as it may cause overheating because of turning off fan control.

This is a very old question. Just for other people who may have similar issue check /etc/systemd/logind.conf if it fits to the configuration you need. It may be that IdleActionSec is set to an unusual high value and IdleAction is set to suspend.

-1

Add this to the end of your kernel parms in /boot/grub/grub.conf:

consoleblank=0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .