TransWikia.com

Noticeable performance drop after suspend on 19.04

Ask Ubuntu Asked on November 28, 2021

I’m on precision 5530, i9, 32GB RAM, SSD, using nvidia drivers. When booting I have no performance issues. But if I suspend then resume I see performance and lag drop considerably.

I saw online this might be cpu throttling, but running cpupower frequency-info yields

analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 800 MHz - 4.80 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 800 MHz and 4.80 GHz.
              The governor "powersave" may decide which speed to use
              within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 3.80 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes

It doesn’t seem to be throttled but everything is obviously slow.

I do see that the chrome gpu-process is using up 50-100% CPU, which is suggestive.

I didn’t have this problem on 18.10.

What might cause this and how can I debug and fix?

2 Answers

It could be related to this bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/671932.

What have done each time it's reproduced that I restarted the thermald service:

sudo systemctl restart thermald.service

Answered by Fmaatoug on November 28, 2021

Use sudo -H gedit /lib/systemd/system-sleep/custom-xhci_hcd

Copy these lines into the editor:

#!/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

Save the file and exit the editor. Then use:

sudo chmod a+x /lib/systemd/system-sleep/custom-xhci_hcd

After rebooting your suspend / resume issues will hopefully be resolved. If not let me know and I'll delete this answer.


NVMe M.2 "gum stick" SSD

These tiny SSD's pack a powerful punch but require special attention in regards to suspend/resume as per this bug report. Edit the file /etc/default/grub and search for this line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash ... acpiphp.disable=1 pcie_aspm=force"

Don't add the ... but some place after the other parameters add acpiphp.disable=1. Do not add the acpi_aspm=force though unless adding the first option alone doesn't work.

Save the file and use sudo update-grub. Then reboot to test.

Answered by WinEunuuchs2Unix on November 28, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP