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.

derobert
  • 107,579
  • 20
  • 231
  • 279
Mike Wills
  • 484
  • 1
  • 6
  • 15

4 Answers4

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.

ndemou
  • 2,659
  • 1
  • 20
  • 27
jamesallman
  • 1,235
  • 11
  • 12
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
Dustin Kirkland
  • 2,543
  • 2
  • 17
  • 15
6

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.

user3111065
  • 61
  • 1
  • 1
-1

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

consoleblank=0
rahmu
  • 19,673
  • 28
  • 87
  • 128
helper
  • 1