8

Sadly I decided to upgrade to 18.04. Now I pass half of my work hours fixing bugs.

Today specialty is: suspend the laptop. Last time I tried to suspend my XPS15 9570 I almost burned up my new 2000$ because it was running for 3 hours in my backpack instead of being suspended.

As well documented in a lot of threads, out of the box 18.04 on a lot of laptop is unable to suspend the laptop. There are official bug reports 3 years old, no solution or fix whatsoever. It will simply wake up after 5 seconds or when you close the lid (very sneaky, very dangerous).

https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1574120 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1786094

I tried everything, the only solution that works for me is the one reported here:

Ubuntu 18.04 - Dell XPS13 9370 no longer suspends on lid close

that is changing the grub config to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mem_sleep_default=deep"

With this change the system actually suspend properly, but when it wakes up wi-fi/bluetooth adapter are completely dead, not even a reboot is able to bring them back.

Something similar is reported here

https://bugzilla.kernel.org/show_bug.cgi?id=201469

and maybe here https://bugzilla.redhat.com/show_bug.cgi?id=1514836

I also tried to hibernate, without any success (the system will simply shut down). This is probably my fault since I'm missing a swap partition.

After passing the whole day reading and trying solution I decide to open this thread. My question is simple: how can I, end user in 2019, suspend my laptop without shutting down wifi or other key components of my HW?

I know that I sound arrogant but I lost one day of work on a standard feature that should not pose any problem.

Thank you for any assistance, I hop you had a better day than mine.

7

Edit /etc/default/grub with

sudo vim /etc/default/grub

make sure that the GRUB_CMDLINE_LINUX line has the following items:

GRUB_CMDLINE_LINUX="nouveau.blacklist=1 acpi_osi=! acpi_osi=\"Windows 2015\" acpi_backlight=vendor mem_sleep_default=deep"

or

GRUB_CMDLINE_LINUX="nouveau.blacklist=1 mem_sleep_default=deep"

Insert acpi_osi=! acpi_osi=\"Windows 2015\ will not change screen brightness.

update grub:

sudo update-grub

reboot after computer has restarted, try suspending to see if the laptop wakes up normally

  • This worked for me. – sinan Jun 12 at 16:21
  • Likewise adding GRUB_CMDLINE_LINUX="nouveau.blacklist=1 mem_sleep_default=deep" and rebooting seems to do the trick, this is ona 9570 running "bios" 1.11.2 – Maks Oct 10 at 20:41
1

First answer option 2

GRUB_CMDLINE_LINUX="nouveau.blacklist=1 mem_sleep_default=deep"

did it for me. XPS 15 9570 Ubuntu 18.04

I did not need to edit that /lib/systemd/system-sleep script.

0

I stumbled across OP's option a few days ago:

that is changing the grub config to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mem_sleep_default=deep"

but laptop would wake up instantly.

I reactivated this old script in /lib/systemd/system-sleep/custom-xhci_hcd and then it worked:

#!/bin/bash

# Original script was using /bin/sh but shellcheck reporting warnings.

# NAME: custom-xhci_hcd
# PATH: /lib/systemd/system-sleep
# CALL: Called from SystemD automatically
# DESC: Suspend broken for USB3.0 as of Oct 25/2018 various kernels all at once

# DATE: Oct 28 2018.

# NOTE: From comment #61 at: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/522998

TMPLIST=/tmp/xhci-dev-list

# Original script was: case "${1}" in hibernate|suspend)

case $1/$2 in
  pre/*)
    echo "$0: Going to $2..."
    echo -n '' > $TMPLIST
          for i in `ls /sys/bus/pci/drivers/xhci_hcd/ | egrep '[0-9a-z]+\:[0-9a-z]+\:.*$'`; do
              # Unbind xhci_hcd for first device XXXX:XX:XX.X:
               echo -n "$i" | tee /sys/bus/pci/drivers/xhci_hcd/unbind
           echo "$i" >> $TMPLIST
          done
        ;;
  post/*)
    echo "$0: Waking up from $2..."
    for i in `cat $TMPLIST`; do
              # Bind xhci_hcd for first device XXXX:XX:XX.X:
              echo -n "$i" | tee /sys/bus/pci/drivers/xhci_hcd/bind
    done
    rm $TMPLIST
        ;;
esac

The screen briefly flashes once while suspending but it's worked 100% since I activated kernel's deep sleep parameter.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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