XPS 13 wakes up from suspend spontaneously

Bug #1161962 reported by Erik Lindqvist on 2013-03-29
116
This bug affects 21 people
Affects Status Importance Assigned to Milestone
Dell Sputnik
Undecided
Kamal Mostafa
linux (Ubuntu)
Undecided
Unassigned

Bug Description

My XPS 13 wakes up from suspend by itself. This is very annoying and potentially dangerous since it happens while the computer is its sleeve/bag.
Can't tell from the pm-suspend and dmesg what causes the behavior so please let me know what logs you need to investigate it and I will provide them.

Further note: It seems like the spontaneous wake up is happening around 40 minutes after suspend every time it occurs. However, the spontaneous wake up does not occur every time.

Running Xubuntu 12.10 with the following Sputnik Kernel:
3.5.0-26-generic #42+kamal15~DellXPS-Ubuntu

Erik Lindqvist (eriksmejl) wrote :
Erik Lindqvist (eriksmejl) wrote :

Can you copy the current BIOS settings and disk layout to this bug report?

Erik Lindqvist (eriksmejl) wrote :

Yes, of course. In what format do you want them?

Erik Lindqvist (eriksmejl) wrote :
Erik Lindqvist (eriksmejl) wrote :

A picture of the BIOS settings would be fine. For the disk layout, "sudo parted /dev/sda print" would be ideal.

Also, I noticed that you're running in EFI mode, which isn't what is used or tested for factory installs.

Erik Lindqvist (eriksmejl) wrote :

I think I need to run in EFI mode to be able to dual boot W8 and Linux successfully, right?
Just out of curiosity. How could EFI and/or disk partioning trigger a wake up?

Attached pictures of BIOS settings and parted printout.

Erik Lindqvist (eriksmejl) wrote :
Erik Lindqvist (eriksmejl) wrote :
Erik Lindqvist (eriksmejl) wrote :
Erik Lindqvist (eriksmejl) wrote :

Thanks. Can you try disabling Smart Connect in the BIOS and see if the problem persists? Note that this will also disable Smart Connect for Windows, which I assume that you have installed based on your partition table.

Erik Lindqvist (eriksmejl) wrote :

I will try that. I don't use W8 actively (need it for some banking) so if I lose a feature or two in W8 does not matter to me.

Will try your fix and get back in a day or two when I have done some test runs.

Thank you for your swift response!

Erik Lindqvist (eriksmejl) wrote :

Think it happened again, even though Smart-Connect is disabled. When I came home and took out my laptop from its sleeve it was running even though it was suspended when I put it in the sleeve. However, it did not happen earlier during the day.

From pm-suspend:
Tue Apr 9 16:09:28 CEST 2013: performing suspend
Tue Apr 9 16:56:35 CEST 2013: Awake.

I am using lid-sensing suspend but I doubt that the laptop lid opened while in the sleeve. Maybe the sensor is to sensitive?

Jan (sub+launchpad) wrote :

I've had this issue too. Disabling Smart-connect did not help.

Has occurred even when the laptop was just sitting on the table, in suspend, with the lid closed.

Dirk Theis (dotjimdot) wrote :

I have the same problem on an HP EliteBook Folio 9470m.

Fábio Ramon (framon) wrote :

I've had this issue too. Disabling Intel SmartConnect did not help.

I'm using Linux "3.8.0-17-generic #27-Ubuntu SMP" beacuse the 3.8.0-19-generic is failing to adjust the screen brightness.

Erik Lindqvist (eriksmejl) wrote :

After disabling both Intel Smart Connect and Intel Rapid Start in BIOS I have not experienced any wake-ups. Currently running:
3.5.0-28-generic #48+kamal16~DellXPS-Ubuntu SMP Wed Apr 24 20:56:29 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

I'm experiencing this as well. One time I opened the lid after the system had woken up and immediately closed it again and the system didn't suspend any more.
Even worse: I couldn't power it down. At all. I held the power button for 30 seconds yet nothing happened. I had to unplug the power cord and let it sit there during the night until the battery was empty. The next day I was able to start it again.

Stefano Maffulli (smaffulli) wrote :

I have similar issues. from pm-suspend.log

Thu Jun 20 08:59:47 PDT 2013: performing suspend
Thu Jun 20 11:00:18 PDT 2013: Awake.
Thu Jun 20 11:00:18 PDT 2013: Running hooks for resume

from syslog at the same time:

Jun 20 08:59:47 sputacchio kernel: [28423.044067] psmouse serio1: Trackpad at is a0060/serio1/input0 lost sync at byte 1
Jun 20 08:59:47 sputacchio kernel: [28423.045743] psmouse serio1: Trackpad at is a0060/serio1/input0 - driver resynced.
Jun 20 11:00:18 sputacchio acpid: client 1669[0:0] has disconnected
Jun 20 11:00:18 sputacchio kernel: [28423.074982] psmouse serio1: Trackpad at is a0060/serio1/input0 lost sync at byte 1

Notice that the first message at resume is acpid: client 1669[0:0] has disconnected.

Running stock kernel

# uname -a
Linux sputacchio 3.8.0-25-generic #37-Ubuntu SMP Thu Jun 6 20:47:07 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

I never touched the BIOS, it's the stock configuration stuff (smart connect and rapid start are enabled). What are the disadvantages for Ubuntu if I disable them?

Stefano Maffulli (smaffulli) wrote :

I disabled Smart Connect but the laptop resumed last night without a reason (lid closed, sitting on the desk)

Wed Jun 26 00:12:46 CEST 2013: performing suspend
Wed Jun 26 01:53:10 CEST 2013: Awake.
Wed Jun 26 01:53:10 CEST 2013: Running hooks for resume

Strangely there is no sign of activity on syslog around that time, so I'm assuming whatever wakes the system up is not the kernel. Any other clues on things to disable?

Everyone who is having this problem, please report ALL of the following:
- The full output of running "sudo parted /dev/sda print" from the commandline.
- Whether the boot mode is UEFI or BIOS.
- Under the "Advanced" tab in the BIOS setup, whether "Intel (R) Smart Connect Technology" is enabled.
- Under the "Advanced" tab in the BIOS setup, whether "Intel (R) Rapid Start Technology" is enabled.
- Under the "Security" tab in the BIOS setup, whether "TPM Security" is enabled.
- Under the "Security" tab in the BIOS setup, the value of "TPM Activation"
- Under the "Security" tab in the BIOS setup, whether "The Physical Presence ACPI Support" is enabled.

Fábio Ramon (framon) wrote :

This is my configuration:

$ sudo LANG=C parted /dev/sda print
Model: ATA SAMSUNG SSD PM83 (scsi)
Disk /dev/sda: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
 1 1049kB 525MB 524MB fat32 EFI system partition boot
 2 525MB 733MB 208MB ext4 Boot partition
 3 733MB 247GB 247GB btrfs System partition
 6 247GB 256GB 8596MB Basic data partition

"Intel (R) Smart Connect Technology" is disabled.
"Intel (R) Rapid Start Technology" is enabled.
"TPM Security" is enabled.
"TPM Activation" is deactivate
"The Physical Presence ACPI Support" is enabled.

Thanks, Fabio. How did you configure sda6? Can you also give the output of "cat /proc/swaps" as well as "mount"?

Assuming you have not manually configured your system to use the TPM, can you disable "TPM Security" in the BIOS setup and let me know if the problem persists?

Fábio Ramon (framon) wrote :

I bought a Windows version and removed all partitions, except the first one (EFI) and the last one, used by Rapid Start. So, it is factory made. And I don't like swap :)

"Intel Rapid Start" and "Intel Smart Connect" had been disabled as these options were draining the battery. I enabled "Rapid Start" yesterday for tests purpose, but since then, the laptop didn't wake up.

I will monitor the system and do tests with "TPM Security". I will answer you as soon as I get results.

Thank you in advance

Fábio Ramon (framon) wrote :
Fábio Ramon (framon) wrote :

FYI. Just after answer, I closed the lid but the system had not suspended. Some minutes later, I reopened it but there is no response.

Since power button also don't work, there is no solution except wait for battery discharging.

Have you tried holding down the battery to power it down? Did this start happening after enabling Rapid Start while keeping the TPM and Smart Connect both disabled?

In my tests, having Rapid Start enabled but Smart Connect disabled and the TPM fully disabled result in Rapid Start functionality working properly with Ubuntu on all versions of the XPS 13 (L321X and both the HD and FHD versions of L322X). For the L322X, there is no option in the firmware setup to set the Rapid Start timer, but the default I found was 30 minutes.

Fábio Ramon (framon) wrote :

Do you mean holding down the power button? Yes. No effect. The system freezes with black video and keyboard ligths on.

This start happening after enabling Rapid Start while Smart Connect disabled and TPM ENABLED as I want to confirm that the problem still occurs and make sure that the solution solves it, avoiding a false positive test.

The freeze is just another effect of this issue.

I'm continuing testing.

Sorry, yes, I meant the pressing the power button, which should turn it off. Please do tell me if disabling "TPM Security" in the firmware setup makes a difference. Then we can debug further. Thank you for your patience. I am actually trying to reproduce the bug on an L322X (HD version) and can't this time around. I'll need to do some more testing.

Erik Lindqvist (eriksmejl) wrote :

Just to reiterate my previous comment:
After I turned off borth Smart Connect and Rapid Start I have not, yet, experienced any random wake ups from suspend.

I am currently running the following sputnik kernel: 3.5.0-36-generic #57+kamal16~DellXPS-Ubuntu SMP
And the following BIOS version:
    BIOS Information
 Vendor: Dell Inc.
 Version: A08
 Release Date: 04/18/2013

However, I do see some messages about TPM (something "-1") when I wake up my computer. The message flashes quickly (on the same tty as X is running) before it is replaced by X. Maybe someone knows how to retrieve it?

Changed in dell-sputnik:
assignee: nobody → Kamal Mostafa (kamalmostafa)
status: New → In Progress
Kamal Mostafa (kamalmostafa) wrote :

Folks, I've prepared a test kernel which we hope will address the problem of spontaneous wake-up from suspend relating to Intel Smart Connect. If you are experiencing the problem, or if you have previously experienced it, please help us test the fix by doing the following:

1. If necessary, restore any BIOS or Windows settings necessary to make the problem occur
2. Verify that the problem does actually occur.
3. In a terminal window, run 'uname -a' and note your current kernel version. Determine whether you're running a "3.8" or a "3.5" kernel.
4. Download the set of four linux*.deb packages, for either the 3.8 or the 3.5 test kernel, depending on step 3:
        http://kernel.ubuntu.com/~kamal/x-smartconnect/v3.8/
          -OR-
        http://kernel.ubuntu.com/~kamal/x-smartconnect/v3.5/
5. In a terminal window, cd to the directory where you saved the linux*.deb files (perhaps ~/Downloads/) then install the packages as follows:
        sudo dpkg -i linux*.deb
6. Reboot your system.
7. In a terminal window, run 'dmesg | grep smart_connect' and note the output. If you see "Disabling Intel Smart Connect", then then the test fix has activated and the spontaneous wake problem should be fixed. However, if you see "AOS was already (something)" then the fix didn't activate because Smart Connect apparently wasn't enabled. (If you see neither of those messages, please report that).
8. Finally, test whether the spontaneous-wake problem is fixed or if it still occurs.

Whether it works or doesn't work, please report your results here, including:
  - your laptop model
  - which test kernel version you installed (v3.8 or v3.5), and whether it fixes the problem
  - (if it doesn't fix it) what output you get from the dmesg command in step 7

(Extra note for Dell XPS13 users: Both of the test kernel versions also include the XPS13-backlight fix, so the test kernels are suitable as temporary replacements for the Sputnik PPA kernels).

Thanks in advance for your help with this testing.

Kamal Mostafa (kamalmostafa) wrote :

For reference, the test kernel fix is a slightly modified backport of Matthew Garrett's work:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5c7f80f75512557dd0728ada77e8e8a8c7c8458b

Kamal Mostafa (kamalmostafa) wrote :

The test kernel backport for 12.04 systems still running a v3.2 kernel is also now available (same instructions as comment #33, except that there are only three linux*.deb files in the set for v3.2): http://kernel.ubuntu.com/~kamal/x-smartconnect/v3.2/

antennen (antennen) wrote :

I have also experienced Fábio Ramon's black screen freeze. Nothing but waiting for the batteri to drain had any effect, the power button being completely disabled. It has happened three times, since March, and I can't really pinpoint what causes it.

I can say it have happened both with Smart Connect on, and off. Everything else is default in the BIOS (no legacy enabled). The computer was delivered with W8.

Seemingly the issue happens only when closing and reopening the lid, with "bad" timing, leaving the computer in a zombie state.

Erik Lindqvist (eriksmejl) wrote :

@Kamal Thanks for supplying a kernel for us to test! However, I won't be able to test it until September (if relevant then). I hope someone else watching this thread will be able to test it for you before then!

Leho Kraav (lkraav) wrote :

I found today that my XPS 14 wakeup woes were all in /proc/acpi/wakeup.

Disabled LID0,EHC1, EHC2, XHC - now we sleep like a baby.

I guess at one point I will feel motivated to find out which USB controller exactly is the culprit.

In the meanwhile, I re-enabled LID0, cause I kinda like the wakeup with the lid open.

coolman (coolman7) wrote :

There is no activity last 3 months. Is there any solution or workaround for this problem?

I have exactly the same problem with Lenovo Ideapad S400. I believe this problem is about a bug with Intel chipset driver. I disabled all enabled acpi settings in /proc/acpi/wakeup but it does not solve the problem.

My configuration is :
Lenovo Ideapad S400
CPU: 3317U
GPU: HD4000
24GB SSD+500 GB HDD
Intel Rapid Start enabled

I tested with Ubuntu 13.10 and Ubuntu 13.04. And I have same problem with both of them.

NoBugs! (luke32j) wrote :

Still seeing this on 13.10 with latest updates. I have rapid start enabled, and according to this, it WAKES UP and then sleeps (but not Ubuntu?), this must be the problem?

Ionică Bizău (bizauionica) wrote :

Any progress on this? I have the same problem on my Asus running 14.04 Beta.

Ionică Bizău (bizauionica) wrote :

It seems to be fixed after the latest updates. I don't have this problem anymore.

I was having this issue in a Inspiron 14z 5480 , Intel Rapid Start enabled.
I had a script turn off all usb wakeup events before suspending and logging the result of rtcwake -- with all disabled, the laptop would still wake up.

After I saw laptopmode-utils doing all sort of stuff before suspention, I uninstalled it. Haven't had one unexpected wake up for 5 days.

Ubuntu 13.10 , kernel 3.11.0-23-generic

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1161962

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: quantal
Gabriele (questaemia) wrote :

This happened to me a couple of times, maybe more.

I doubt Intel Rapid Start is the problem. Also, I configured it to hibernate my laptop after 15 minutes and my laptop still managed to wake up from suspend within that amount of time.

I could investigate that much as it happens randomly and always in the wrong moment, but I've managed to grab the dmesg the last two times it happened. Unfortunately, I couldn't find anything interesting in there.

It shouldn't be complicated to realize a workaround (if wake up while lid is closed => put to sleep again), but I still would like a proper fix and an explanation of this problem.

Gabriele (questaemia) wrote :

Here the second dmesg I grabbed.

Gabriele (questaemia) wrote :

Since the wakeups are random and doing tests is complicated, I'd like to ask to all of you with this problem to try the following.

First, run the following command:
cat /proc/acpi/wakeup

Look at all the devices that are able to wakeup the laptop (those with *enabled) and for each of those (except for LID0), do the following:
sudo echo DEVICENAME > /proc/acpi/wakeup

e.g.
sudo echo EHC1 > /proc/acpi/wakeup

Check with the first command if all the devices are *disabled (except for LID0 of course).

Note: these changes are not permament.

Gabriele (questaemia) wrote :

What I suggested in my previous message didn't solve the problem and as said by other the problem was Intel Rapid Start Technology.

What happens is that the firmware sets a wakeup timer as soon as the laptop is suspended and doesn't cancel it if the laptop is resumed before it expires. Linux is not aware of this timer and so it doesn't cancel it as the firmware expects it to do.

IRST does not require any configuration, so the timer is set as long as IRST is activated (I don't know if not having the dedicated partition prevents the problem even if IRST is activated).

I'll link the fix once is available in the mainline kernel, in the meantime disable IRST from the BIOS or set wakeup_events [1] to either 0 or 2.

[1] - https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-driver-intel-rapid-start

Gabriele (questaemia) wrote :

Here one possible solution to the problem I described:
http://patchwork.ozlabs.org/patch/423494/

Stefano Maffulli (smaffulli) wrote :

This problem appears again in XPS 13 9343 (sputnik 2015 edition), on stock Ubuntu 15.04:

    Linux laminato 3.19.0-16-generic #16-Ubuntu SMP Thu Apr 30 16:09:58 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

I'm using EFI boot

Miek Gieben (miek) wrote :

Interesting bug. I upgraded my Ubuntu 14.04 kernel (currently 3.13.0-53-generic) to mainline 4.0.5 and saw the exact same issue.
(Even on a different machine: Apple Macbook Air)

Miek Gieben (miek) wrote :

Fiddling with /proc/acpi/wakeup and kernel 4.1 seems to fix the spontaneous wakeups on my macbook. However after a day, acpid seems to "see" events like LID_CLOSE. Newer Ubuntu version will use systemd for suspending so I am not sure what benefits I get from debugging this.

JosephE (josephellengar) wrote :

Same problem with XPS 13 2016 (i5 processor, 8gb ram, 128gb hard drive). I am dual booting with W10 using efi. Cinnamon desktop environment.

John Steele Scott (toojays) wrote :

This is still an issue with 4.8.0-32-generic, on the 2016 Dell XPS 13.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers