AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1047229
Accepted
Tim Richardson
Tim Richardson
Asked: 2018-06-17 15:41:49 +0800 CST2018-06-17 15:41:49 +0800 CST 2018-06-17 15:41:49 +0800 CST

有时 Gnome 暂停立即恢复,纯英特尔笔记本电脑上的 ubuntu 18.04

  • 772

我在纯英特尔 Thinkpad T480 上有 Ubuntu 18.04。它通常连接到几个外部显示器。如果我从电源图标中选择挂起(按住 alt),笔记本电脑将启动挂起过程,两个外接显示器进入挂起模式。笔记本电脑上的 LED 开始闪烁循环以指示挂起。但一秒钟后,笔记本电脑的 LED 灯又亮了。显示器不会再次启动,但只要移动无线鼠标,外接显示器就会打开。所以它不会进入挂起。

更新:

  • 它有时只会这样做,希望某处有一些日志记录
  • 从那以后,我了解到 gnome 使用 systemd 挂起/恢复功能,记录在这里: https ://www.freedesktop.org/software/systemd/man/systemd-suspend.service.html

大多数时候它都有效。我想我将不得不看这个并在它不起作用时尝试找到一些日志记录

更新:journalctl | grep 暂停:

 pci_pm_suspend(): hcd_pci_suspend+0x0/0x30 returns -16
Jun 17 16:57:46 moncrief kernel: dpm_run_callback(): pci_pm_suspend+0x0/0x150 returns -16
Jun 17 16:57:46 moncrief kernel: PM: Device 0000:00:14.0 failed to suspend async: error -16
Jun 17 16:57:46 moncrief kernel: PM: Some devices failed to suspend, or early wake event detected

由 lspci 提供,该设备是

00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
power-management gnome suspend 18.04
  • 1 1 个回答
  • 2313 Views

1 个回答

  • Voted
  1. Best Answer
    Tim Richardson
    2018-06-19T16:57:37+08:002018-06-19T16:57:37+08:00

    基于戴尔 Inspiron 的类似问题

    https://gist.github.com/ioggstream/8f380d398aef989ac455b93b92d42048
    

    我安装在

    /lib/systemd/system-sleep
    

    这里的脚本: https ://gist.github.com/timrs2998/77b3c2c2567cbd38f38cde64f1155956#file-system-sleep-xhci-sh

    作者:Roberto Polli (ioggstream)

    创建文件后,不要忘记

    sudo chmod u+x
    

    ...

    #!/bin/sh
    # 
    # This script should prevent the following suspend errors
    #  which block suspend on Dell Inspiron laptop & Thinkpad T480. 
    #
    # Put it in /usr/lib/systemd/system-sleep/xhci.sh
    #
    # The PCI 00:14.0 device is the usb xhci controller.
    #
    #    kernel: [67445.560610] pci_pm_suspend(): hcd_pci_suspend+0x0/0x30 returns -16
    #    kernel: [67445.560619] dpm_run_callback(): pci_pm_suspend+0x0/0x150 returns -16
    #    kernel: [67445.560624] PM: Device 0000:00:14.0 failed to suspend async: error -16
    #    kernel: [67445.886961] PM: Some devices failed to suspend, or early wake event detected
    
    if [ "${1}" == "pre" ]; then
      # Do the thing you want before suspend here, e.g.:
      echo "Disable broken xhci module before suspending at $(date)..." > /tmp/systemd_suspend_test
      grep XHC.*enable /proc/acpi/wakeup && echo XHC > /proc/acpi/wakeup
    elif [ "${1}" == "post" ]; then
      # Do the thing you want after resume here, e.g.:
      echo "Enable broken xhci module at wakeup from $(date)" >> /tmp/systemd_suspend_test
      grep XHC.*disable /proc/acpi/wakeup && echo XHC > /proc/acpi/wakeup
    fi
    
    • 4

相关问题

  • 停止菜单图标闪烁

  • 为什么我的 Kubuntu 会话在恢复后需要相当长的时间才能响应?

  • 是否有适用于 IMAP 邮件帐户的 Gnome 小程序?

  • 如果顶部面板中缺少会话小程序,如何注销?

  • 如何让“您的电池坏了”消息消失?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve