25

This all started happening after upgrading to 13.10, now I am running 14.04 and still have the same issue.

When I close the lid or I do sudo pm-suspend the laptop goes into suspend for 2-5 seconds and awakes by itself.

Same happens if I try to do hibernate.

I have a gut feeling that something is awaking/taking the cpu out of suspend mode but I cannot figure out what.

Any help troubleshooting this annoying issue?

Edit:

Thanks to @Fabian , I was able to figure out that it looks like the ethernet card is misbehaving and even after I set the card to not wake up on lan (either doing acpitool -W 3 or echo disabled > /sys/bus/pci/devices/0000:00:19.0/power/wakeup or echo IGBE > /proc/acpi/wakeup, the laptop keeps waking up and showing this when I do acpitool -w

Device  S-state   Status   Sysfs node
---------------------------------------
1. LID    S3    *enabled 
2. SLPB   S3    *disabled
3. IGBE   S4    *enabled   pci:0000:00:19.0
4. EXP1   S4    *disabled  pci:0000:00:1c.0
5. EXP2   S4    *disabled  pci:0000:00:1c.1
6. EXP3   S4    *disabled
7. EXP4   S4    *disabled
8. EXP5   S4    *disabled  pci:0000:00:1c.4
9. EHC1   S3    *disabled  pci:0000:00:1d.0
10. EHC2      S3    *disabled  pci:0000:00:1a.0
11. HDEF      S4    *disabled  pci:0000:00:1b.0

Any idea how to proceed from there?

The network driver that IGBE uses is e1000e

3
  • 3
    use dmesg to see the latest messages from the kernel, something there could give you a clue as to what's happening.
    – roadmr
    Apr 18, 2014 at 17:00
  • Have you disabled the Wake-On-Lan feature in the BIOS?
    – Mitch
    Apr 29, 2014 at 6:34
  • Yes, that was the first thing I tried.
    – feniix
    Apr 29, 2014 at 13:30

5 Answers 5

12

The following worked for me:

cat /proc/acpi/wakeup

Look for any items with status enabled that look like they don't belong there (for me, anything except LID0). Then disable them by saying, for example:

sudo sh -c "echo XHC0 > /proc/acpi/wakeup"

Check that the corresponding entries have indeed been disabled, send the laptop into suspend and hope for the best :)

5
  • Very good lead, now I need to find out why the integrated ethernet card keeps waking up even though I set the wake up mode for it to disabled
    – feniix
    Apr 19, 2014 at 16:46
  • 1
    Good luck with that :)
    – Fabian
    Apr 19, 2014 at 16:57
  • 1
    Have you tried rmmod the driver before suspending? (Just a shot in the dark)
    – Rmano
    May 16, 2014 at 5:04
  • 1
    Same annoying problem in Ubuntu 16.04.1. This answer didn't help unfortunately. Dec 20, 2016 at 5:50
  • +1 This is the only solution that worked for me. Jan 4, 2017 at 19:23
10

I have kernel 13.13 and Intel Z77X based motherboard, and following command works for me:

sudo sh -c "echo EHC1 > /proc/acpi/wakeup;echo EHC2 > /proc/acpi/wakeup;echo XHC > /proc/acpi/wakeup"
7

Experiencing exactly the same problem (ThinkPad T530, Ubuntu 14.04, but also 13.10 and 13.04, after couple of suspends, computer resumes immediately after suspend).

Disabling IBGE from wakeup did not help at all.

As suggested by Romano, I've tried removing the e1000e module, et voila suspend as expected.

So:

sudo rmmod e1000e

prior to suspend resolves the issue.

Interestingly, the problem reappears immediately after installing the module back (sudo modprobe e1000e) and suspending without its removal. So, it must've been something related to hardware.

To automate it, I've created two simple suspend/wakeup scripts (tested on the above mentioned hardware, Ubuntu Trusty 14.04): sudo gedit /etc/pm/sleep.d/99_e1000e_remove :

#!/bin/sh

# Remove e1000e kernel module prior to suspend
rmmod e1000e

and sudo gedit /etc/pm/power.d/99_e1000e_probe :

#!/bin/sh

# Modprobe e1000e kernel module after resume
modprobe e1000e

Scripts should be executable (sudo chmod +x /etc/pm/sleep.d/99_e1000e_remove /etc/pm/power.d/99_e1000e_probe).

Notes:

  • I assume the scripts are pretty safe to use even when it does not address your problem.
  • I'm not using LAN wakeup, so I don't know how it behaves with the fix.
3
  • The laptop has the same issue using windows (I just installed windows 7 for my wife in the computer because I got a new one) and it does exactly the same. So it may be hardware/firmware related
    – feniix
    May 26, 2014 at 22:30
  • 1
    Hi. I am using Ubuntu 14.04 LTS with a Thinkpad X201s. This solution removing e1000e with the little helper scripts helped getting suspend to work again. Thank you very much !
    – apos
    Aug 27, 2014 at 14:32
  • 1
    I can confirm the same solution works on a Thinkpad T540p and Ubuntu 14.04. Something seems to go wrong inside the e1000e module. This only happens occasionally to begin with, most of the time suspending works well. If the problem appears, I rmmod e1000e, then I can suspend successfully. However, if I then modprobe it again after resuming, the next suspend will work even with the module present. So "resetting" the e1000e module appears to do the trick for me.
    – mindriot
    Oct 11, 2016 at 19:17
1

This worked for me (taken from another thread on askubuntu):

Ubuntu 14.04 wake up immediately after suspend

You can try to disable it with a Upstart script every startup automatically:

Create a file etc/init/disable-XHC.conf

Content:

start on started dbus
stop on stopping dbus

script
   sudo -u root sh -c "echo 'XHC' > /proc/acpi/wakeup"
end script
0

The systemd solution is to create an instruction for systemd-tmpfiles to write something to a file when it is invoked.

Create a file in /etc/tmpfiles.d, e.g. /etc/tmpfiles.d/disable-network-wake.conf, with the following content, depending on what device you want to disable wakeup for.

w /proc/acpi/wakeup - - - - XHC

See also systemd-tmpfiles(8) and tmpfiles.d(5).

Ref: https://wiki.archlinux.org/index.php/Systemd#Temporary_files

You must log in to answer this question.

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