我使用的是 precision 5530、i9、32GB RAM、SSD,使用 nvidia 驱动程序。启动时我没有遇到性能问题。但如果我暂停然后恢复,我会看到性能和延迟显著下降。
我在网上看到这可能是 CPU 节流,但运行cpupower frequency-info
结果
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
它似乎没有受到限制,但一切显然都很慢。
我确实看到 chrome gpu 进程占用了 50-100% 的 CPU,这很有启发性。
我在 18.10 上没有遇到这个问题。
这可能是什么原因造成的?我该如何调试和修复?
答案1
使用sudo -H gedit /lib/systemd/system-sleep/custom-xhci_hcd
将这些行复制到编辑器中:
#!/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
保存文件并退出编辑器。然后使用:
sudo chmod a+x /lib/systemd/system-sleep/custom-xhci_hcd
重启后,您的挂起/恢复问题有望得到解决。如果没有解决,请告诉我,我会删除此答案。
NVMe M.2“口香糖棒”SSD
这些微型 SSD 性能强大,但需要特别注意暂停/恢复,如下所示错误报告. 编辑文件/etc/default/grub
并搜索此行:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash ... acpiphp.disable=1 pcie_aspm=force"
不要添加 ... 但要在其他参数后面的某个位置添加。除非单独添加第一个选项不起作用,否则acpiphp.disable=1
不要添加。acpi_aspm=force
保存文件并使用sudo update-grub
。然后重新启动进行测试。
答案2
这可能与这个错误有关:https://bugs.launchpad.net/ubuntu/+source/linux/+bug/671932。
每次重现此情况时我都重新启动服务thermald
:
sudo systemctl restart thermald.service