Problems suspending in Ubuntu

I have a relatively old desktop computer using an Asus motherboard M2NPV-VM and the function to suspend never worked properly in Ubuntu. The symptom of this problem is very simple: to suspend, the computer immediately back to normal, as if something had turned back, taking the suspension.

Researching enough about the subject (which was very difficult, because suspend / hibernate has many different types of problems, or maybe my case is very specific), I understand that the root of the problem was related to something I said in the previous paragraph:

“immediately back to normal, as if something had turned back”

So the solution was to see how to disable the system who does “wake up” from sleep mode. Even setting in bios, The computer never kept suspended, then the solution was to tell the system. I looked like I was my configuration on Linux:

% cat /proc/acpi/wakeup
Device S-state Status Sysfs node
HUB0 S5 *disabled pci:0000:00:10.0
XVRA S5 *disabled pci:0000:00:04.0
XVRB S5 *disabled
XVRC S5 *disabled
UAR1 S5 *disabled pnp:00:06
UAR2 S5 *disabled pnp:00:07
PS2K S4 *enabled pnp:00:09
USB0 S4 *enabled pci:0000:00:0b.0
USB2 S4 *enabled pci:0000:00:0b.1
AZAD S5 *disabled pci:0000:00:10.1
MMAC S5 *disabled pci:0000:00:14.0
MMCI S5 *disabled

In my case, devices USB They were “waking up” the system. Disabling it that way:

% ECHO USB0 | tee /proc/acpi/wakeup
% echo USB2 | tee /proc/acpi/wakeup

Checking:

% cat /proc/acpi/wakeup 
Device S-state Status Sysfs node
HUB0 S5 *disabled pci:0000:00:10.0
XVRA S5 *disabled pci:0000:00:04.0
XVRB S5 *disabled
XVRC S5 *disabled
UAR1 S5 *disabled pnp:00:06
UAR2 S5 *disabled pnp:00:07
PS2K S4 *enabled pnp:00:09
USB0 S4 *disabled pci:0000:00:0b.0
USB2 S4 *disabled pci:0000:00:0b.1
AZAD S5 *disabled pci:0000:00:10.1
MMAC S5 *disabled pci:0000:00:14.0
MMCI S5 *disabled

And testing:

% pm-suspend

Worked!

There was only put somewhere to automatically rise with the system. I put the two lines in /etc/rc.local that disable USB to wake up the system:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
ECHO USB0 | tee /proc/acpi/wakeup
echo USB2 | tee /proc/acpi/wakeup
exit 0

And voilá!

(each case is unique, but so is likely that something works for other systems!)

Ok, three years to solve that little problem is a long time, admit! 😛

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.