The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

Views: 351     Votes:  2 
Tags: 18.04   kernel   suspend   xps  
Link: 🔍 See Original Answer on Ask Ubuntu 🔗

Title: XPS13 will not suspend with kernel 4.19
ID: /2018/10/29/XPS13-will-not-suspend-with-kernel-4.19
Created: October 29, 2018
Upload: November 24, 2022    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false

Although technically off-topic question, I had same problem today with Kernel 4.14.78-generic which I installed to fix problems suspending with supported kernel 4.13.0-36-generic.

I created this script: /lib/systemd/system-sleep/custom-xhci_hcd:


# 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:


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

case $1/$2 in
    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
    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
    rm $TMPLIST

Then mark as executable using:

sudo chmod a+x /lib/systemd/system-sleep/custom-xhci_hcd
⇧ USB-C to HDMI adapter that works with Ubuntu? Fully Move Grub to New Partition  ⇩