Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My machine seems to wake up from suspend by itself, at irregular intervals. Causing the power to die out, and machine turn off.

It is quite the annoyance, when the machine is in my case and it wakes up. And quite unhealthy as well, I would persume. It also wakes in the middle of the night, which is why I have to remember to hook on the power supply, or else i have a flat battery in the morning.

The machine is a Lenovo X1 Carbon with Ubuntu 14.04. I use it with a OneLink dock at work, but just with the power supply and a displayport monitor at home.

Now here is what I have done so far. I have had it suspended, and after about 3 hours, it woke up, as the logs below testify to:

from pm_suspend:

Running hook /etc/pm/sleep.d/novatel_3g_suspend suspend suspend:
/etc/pm/sleep.d/novatel_3g_suspend suspend suspend: success.

Thu Jul 24 17:18:26 CEST 2014: performing suspend
Thu Jul 24 20:17:04 CEST 2014: Awake.
Thu Jul 24 20:17:04 CEST 2014: Running hooks for resume
Running hook /etc/pm/sleep.d/novatel_3g_suspend resume suspend:
/etc/pm/sleep.d/novatel_3g_suspend resume suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/99video resume suspend:
/usr/lib/pm-utils/sleep.d/99video resume suspend: success.

from syslog:

$ grep -B 5 "20:17:0" /var/log/syslog.1
Jul 24 17:18:25 lobners-biq dbus[548]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Jul 24 17:18:25 lobners-biq dbus[548]: [system] Activating service name='org.freedesktop.systemd1' (using servicehelper)
Jul 24 17:18:25 lobners-biq dbus[548]: [system] Successfully activated service 'org.freedesktop.systemd1'
Jul 24 17:18:25 lobners-biq anacron[11164]: Anacron 2.3 started on 2014-07-24
Jul 24 17:18:25 lobners-biq anacron[11164]: Normal exit (0 jobs run)
Jul 24 20:17:04 lobners-biq kernel: [ 7351.710460] PM: Syncing filesystems ... done.
Jul 24 20:17:04 lobners-biq kernel: [ 7351.720943] PM: Preparing system for mem sleep
Jul 24 20:17:04 lobners-biq kernel: [ 7351.721161] Freezing user space processes ... (elapsed 0.002 seconds) done.
Jul 24 20:17:04 lobners-biq kernel: [ 7351.723370] Freezing remaining freezable tasks ... (elapsed 0.047 seconds) done.
Jul 24 20:17:04 lobners-biq kernel: [ 7351.770482] PM: Entering mem sleep
Jul 24 20:17:04 lobners-biq kernel: [ 7351.770544] Suspending console(s) (use no_console_suspend to debug)
Jul 24 20:17:04 lobners-biq kernel: [ 7351.897854] sd 0:0:0:0: [sda] Synchronizing SCSI cache
Jul 24 20:17:04 lobners-biq kernel: [ 7351.901194] sd 0:0:0:0: [sda] Stopping disk
Jul 24 20:17:04 lobners-biq kernel: [ 7352.149522] PM: suspend of devices complete after 378.694 msecs
Jul 24 20:17:04 lobners-biq kernel: [ 7352.165538] PM: late suspend of devices complete after 16.005 msecs
Jul 24 20:17:04 lobners-biq kernel: [ 7352.181723] ehci-pci 0000:00:1d.0: System wakeup enabled by ACPI
Jul 24 20:17:04 lobners-biq kernel: [ 7352.197584] e1000e 0000:00:19.0: System wakeup enabled by ACPI
Jul 24 20:17:04 lobners-biq kernel: [ 7352.229549] xhci_hcd 0000:00:14.0: System wakeup enabled by ACPI
Jul 24 20:17:04 lobners-biq kernel: [ 7352.245757] PM: noirq suspend of devices complete after 80.176 msecs
Jul 24 20:17:04 lobners-biq kernel: [ 7352.246048] ACPI: Preparing to enter system sleep state S3
Jul 24 20:17:04 lobners-biq kernel: [ 7352.247624] PM: Saving platform NVS memory
Jul 24 20:17:04 lobners-biq kernel: [ 7352.248416] Disabling non-boot CPUs ...
Jul 24 20:17:04 lobners-biq kernel: [ 7352.249937] smpboot: CPU 1 is now offline
Jul 24 20:17:04 lobners-biq kernel: [ 7352.353589] smpboot: CPU 2 is now offline
Jul 24 20:17:04 lobners-biq kernel: [ 7352.457641] smpboot: CPU 3 is now offline
(clipped)

I know that I can disable which hardware is allowed to wake it, but I do not know which hardware is the culprit. I disabled the LID (using acpitool -W 1), but it still woke up.

$ acpitool -w
   Device   S-state   Status   Sysfs node
  ---------------------------------------
  1. LID      S4    *disabled
  2. SLPB     S3    *enabled 
  3. IGBE     S4    *disabled  pci:0000:00:19.0
  4. EXP2     S4    *disabled  pci:0000:00:1c.1
  5. XHCI     S3    *enabled   pci:0000:00:14.0
  6. EHC1     S3    *enabled   pci:0000:00:1d.0

I then disabled the two USB ones (5 & 6) but still it wakes up.

$ acpitool -w
   Device   S-state   Status   Sysfs node
  ---------------------------------------
  1. LID      S4    *disabled
  2. SLPB     S3    *enabled 
  3. IGBE     S4    *disabled  pci:0000:00:19.0
  4. EXP2     S4    *disabled  pci:0000:00:1c.1
  5. XHCI     S3    *disabled  pci:0000:00:14.0
  6. EHC1     S3    *disabled  pci:0000:00:1d.0

Again:

from pm_suspend:

Running hook /etc/pm/sleep.d/novatel_3g_suspend suspend suspend:
/etc/pm/sleep.d/novatel_3g_suspend suspend suspend: success.

Thu Jul 24 23:11:59 CEST 2014: performing suspend
Fri Jul 25 01:58:01 CEST 2014: Awake.
Fri Jul 25 01:58:01 CEST 2014: Running hooks for resume
Running hook /etc/pm/sleep.d/novatel_3g_suspend resume suspend:
/etc/pm/sleep.d/novatel_3g_suspend resume suspend: success.

Running hook /usr/lib/pm-utils/sleep.d/99video resume suspend:
/usr/lib/pm-utils/sleep.d/99video resume suspend: success.

from syslog:

$ grep -B 5 "01:58:" /var/log/syslog.1
Jul 24 23:11:58 lobners-biq dbus[548]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Jul 24 23:11:58 lobners-biq dbus[548]: [system] Activating service name='org.freedesktop.systemd1' (using servicehelper)
Jul 24 23:11:58 lobners-biq dbus[548]: [system] Successfully activated service 'org.freedesktop.systemd1'
Jul 24 23:11:58 lobners-biq anacron[16204]: Anacron 2.3 started on 2014-07-24
Jul 24 23:11:58 lobners-biq anacron[16204]: Normal exit (0 jobs run)
Jul 25 01:58:01 lobners-biq kernel: [17846.114837] PM: Syncing filesystems ... done.
Jul 25 01:58:01 lobners-biq kernel: [17846.147640] PM: Preparing system for mem sleep
Jul 25 01:58:01 lobners-biq kernel: [17846.147832] Freezing user space processes ... (elapsed 0.002 seconds) done.
Jul 25 01:58:01 lobners-biq kernel: [17846.149916] Freezing remaining freezable tasks ... (elapsed 0.090 seconds) done.
Jul 25 01:58:01 lobners-biq kernel: [17846.240249] PM: Entering mem sleep
Jul 25 01:58:01 lobners-biq kernel: [17846.240309] Suspending console(s) (use no_console_suspend to debug)
Jul 25 01:58:01 lobners-biq kernel: [17846.370439] sd 0:0:0:0: [sda] Synchronizing SCSI cache
Jul 25 01:58:01 lobners-biq kernel: [17846.373919] sd 0:0:0:0: [sda] Stopping disk
Jul 25 01:58:01 lobners-biq kernel: [17846.618053] PM: suspend of devices complete after 377.454 msecs
Jul 25 01:58:01 lobners-biq kernel: [17846.634086] PM: late suspend of devices complete after 16.022 msecs
Jul 25 01:58:01 lobners-biq kernel: [17846.666119] e1000e 0000:00:19.0: System wakeup enabled by ACPI
Jul 25 01:58:01 lobners-biq kernel: [17846.714324] PM: noirq suspend of devices complete after 80.194 msecs
Jul 25 01:58:01 lobners-biq kernel: [17846.714615] ACPI: Preparing to enter system sleep state S3
Jul 25 01:58:01 lobners-biq kernel: [17846.716223] PM: Saving platform NVS memory
Jul 25 01:58:01 lobners-biq kernel: [17846.717020] Disabling non-boot CPUs ...
Jul 25 01:58:01 lobners-biq kernel: [17846.718527] smpboot: CPU 1 is now offline
Jul 25 01:58:01 lobners-biq kernel: [17846.822120] smpboot: CPU 2 is now offline
Jul 25 01:58:01 lobners-biq kernel: [17846.822517] Broke affinity for irq 23
Jul 25 01:58:01 lobners-biq kernel: [17846.822519] Broke affinity for irq 57
Jul 25 01:58:01 lobners-biq kernel: [17846.926171] smpboot: CPU 3 is now offline
Jul 25 01:58:01 lobners-biq kernel: [17846.927621] ACPI: Low-level resume complete
Jul 25 01:58:01 lobners-biq kernel: [17846.927675] PM: Restoring platform NVS memory
Jul 25 01:58:01 lobners-biq kernel: [17846.928186] Enabling non-boot CPUs ...
Jul 25 01:58:01 lobners-biq kernel: [17846.928215] x86: Booting SMP configuration:
Jul 25 01:58:01 lobners-biq kernel: [17846.928216] smpboot: Booting Node 0 Processor 1 APIC 0x1
Jul 25 01:58:01 lobners-biq kernel: [17846.942510] CPU1 is up
Jul 25 01:58:01 lobners-biq kernel: [17846.942524] smpboot: Booting Node 0 Processor 2 APIC 0x2
Jul 25 01:58:01 lobners-biq kernel: [17846.956793] CPU2 is up
Jul 25 01:58:01 lobners-biq kernel: [17846.956806] smpboot: Booting Node 0 Processor 3 APIC 0x3
Jul 25 01:58:01 lobners-biq kernel: [17846.971073] CPU3 is up
Jul 25 01:58:01 lobners-biq kernel: [17846.974855] ACPI: Waking up from system sleep state S3
(clipped)

While the pm_suspend logs are similar, there is some discrepancy in the syslog files. I don't know what to make of that?

Does anybody have an idea as to what this might be??

NOTE: the similar question "Ubuntu 12.04 - Wakes from Suspend by itself" is NOT a duplicate. It does not seem that the scripts in the answer has any effect, and my problem is also not with it failing to suspend or wake. It fails to stay in suspend. Which is also what the question sort of is about, but the wake-on-lan option in ethtool is also 'd' in my case.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Solution!

I found a description of someone experiencing something similar. It was due to the fact that the machine goes into 'deep-sleep' mode after exactly 3 hours.

And while it had done this sometimes, for which I was glad, it sometimes somehow did not manage to 'deep-sleep' correctly.

I disabled this function entirely in the BIOS, and initial empirical analysis shows that it works :)

Quote from http://forums.lenovo.com:

As for the Intel hibernation scheme, as you noted, it requires a dedicated partition on your SSD that can't be used for any other purpose. The only setting in Windows is inside the Lenovo Settings application, in the Power section. Lenovo calls this feature "30 day standby". The only thing you can do is turn it on or off. Here's how "30 day standby" works:

  1. when you close the lid or otherwise put the system into sleep mode, the system sleeps for 3 hours.

  2. after 3 hours, the system will wake and check some things, such as AC not attached, wake-on-LAN not enabled, USB device not attached, etc. If the conditions allow, then the system will enter the 30-day standby state e.g. deep sleep. Otherwise the system goes back into normal sleep mode.

  3. Deep sleep means that the contents of memory are written to the special hibernation partition on the SSD. it is very similar to traditional hibernation except that it happens faster by using BIOS methods instead of Windows methods. But it's not anywhere near as fast as normal sleep/resume.

  4. The system comes out of deep sleep mode when the lid is opened, or when the power button is pressed.

You found the BIOS settings but actually they are ignored whenever Lenovo Settings (and Lenovo Settings Dependency Package) are installed on the system. I really don't know why this design choice was made.

Personally I don't see value in 30 day standby, at least not enough value to want to give up 8GB of my expensive SSD. I use sleep/resume exclusively. The battery will last several days. And if I'm going to be away from the computer for an extended time then I'll just shut it down.

share|improve this answer

I see this in my pm_suspend.log:

Running hook /etc/pm/sleep.d/10_unattended-upgrades-hibernate resume suspend: /etc/pm/sleep.d/10_unattended-upgrades-hibernate resume suspend: success.

This is very uncool. My Windows machine used to wake up on me by itself and I could never figure out why. It used to drive me crazy as I searched the culprit. Found it very unconfigurable and annoying.

On Ubuntu, please make this a very visible and easy to configure option. I was a bit mystified when I saw that my computer had woken up without my permission.

Was about to give it 30 lashes with a wet noodle, when I saw that it was most likely due to this 'unattended-upgrades' gremlin.

In the file /etc/apt/apt.conf.d/10periodic , I first tried setting just APT::Periodic::Unattended-Upgrade from "1" to "0". Then, within a day, my computer woke up by itself.

So, then I tried setting all four values in /etc/apt/apt.conf.d/10periodic to "0"


APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "0";

So far, it's been a couple days and I haven't experienced any spontaneous wakeups by my computer.

Gino

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.