升级到 Ubuntu 22.04 后,挂起和休眠均不起作用

升级到 Ubuntu 22.04 后,挂起和休眠均不起作用

每当我启动挂起或休眠模式时,计算机屏幕都会变黑。 2 秒后,它会重新打开并显示登录屏幕... (DELL XPS 15)

apr 03 09:18:27 fredsco gnome-shell[2590]: Failed to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 03 10:27:35 fredsco gnome-shell[2590]: Failed to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 03 10:34:58 fredsco gnome-shell[2590]: Failed to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 03 10:36:34 fredsco gnome-shell[2590]: Failed to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 03 11:06:39 fredsco gnome-shell[2590]: Failed to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 03 18:46:59 fredsco gsd-media-keys[3360]: Unable to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 03 18:46:59 fredsco gsd-power[3362]: Unable to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 03 21:58:26 fredsco gnome-shell[3161]: Failed to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 04 07:13:48 fredsco gnome-shell[3161]: Failed to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 04 08:45:55 fredsco gnome-shell[3161]: Failed to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 04 08:46:34 fredsco gnome-shell[3161]: Failed to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 07 21:51:51 fredsco gsd-media-keys[2796]: Unable to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 07 21:51:51 fredsco gsd-power[2798]: Unable to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 08 13:03:07 fredsco gnome-shell[2611]: Failed to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 12 23:30:10 fredsco gsd-media-keys[2788]: Unable to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 12 23:30:10 fredsco gsd-power[2792]: Unable to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 13 09:40:45 fredsco gsd-media-keys[2792]: Unable to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 13 09:40:45 fredsco gsd-power[2795]: Unable to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 13 09:44:36 fredsco gnome-shell[2580]: Failed to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 13 10:42:02 fredsco gnome-shell[2580]: Failed to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 13 11:46:02 fredsco pipewire-media-session[2275]: pw.node: (bluez_output.34_28_40_18_03_7B.a2dp-sink-23) suspended -> error (Start error: Input/output error)
apr 13 11:46:31 fredsco pipewire-media-session[2275]: pw.node: (bluez_output.34_28_40_18_03_7B.a2dp-sink-23) suspended -> error (Start error: Input/output error)
apr 16 11:14:13 fredsco gsd-media-keys[2940]: Unable to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 16 11:14:13 fredsco gsd-power[2943]: Unable to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 16 18:13:55 fredsco gnome-shell[2753]: Failed to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 18 17:27:33 fredsco gsd-media-keys[2687]: Unable to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 18 17:27:33 fredsco gsd-power[2688]: Unable to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 18 18:08:08 fredsco gnome-shell[2450]: Failed to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 22 11:54:14 fredsco gsd-media-keys[2785]: Unable to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 22 11:54:14 fredsco gsd-power[2787]: Unable to inhibit suspend: GDBus.Error:org.freedesktop.login1.OperationInProgress: The operation inhibition has been requested for is already running
apr 25 19:06:02 fredsco sudo[10170]:  fredsco : TTY=pts/0 ; PWD=/home/fredsco ; USER=root ; COMMAND=/usr/bin/systemctl suspend
apr 25 19:06:48 fredsco sudo[10906]:  fredsco : TTY=pts/0 ; PWD=/home/fredsco ; USER=root ; COMMAND=/usr/bin/systemctl stop nvidia-suspend.service
apr 25 19:07:00 fredsco sudo[10980]:  fredsco : TTY=pts/0 ; PWD=/home/fredsco ; USER=root ; COMMAND=/usr/bin/systemctl disable nvidia-suspend.service


答案1

我也遇到了同样的问题。我升级到 22.04 后,休眠功能停止工作。不过我的系统不是 Dell XPS,但我猜这是 ubuntu 的一个常见问题。我在 Ubuntu 21.10 上也遇到了类似的问题,但我通过降级 Linux 内核解决了这个问题。

经过一番搜索后,我发现可能是新内核无法很好地与您的 BIOS 配合。

所以选项1:尝试降级到您上次运行的 ubuntu 的内核版本。

选项 2:保留当前内核版本(即 5.15),并尝试将您的 Bios 更新到最新版本。这可以解决问题。

选项 3:使用pm-hibernateuswsusp。这就是我所做的。

我按照本指南启用了休眠功能:https://ubuntuhandbook.org/index.php/2021/08/enable-hibernate-ubuntu-21-10/
从本指南中,我使用了 swapfile 机制。

首先我尝试: sudo systemctl hibernate检查它是否有效。我的电脑会立即关闭并启动,并丢失其状态。所以它不能完全工作。需要更多修复。

接下来,我遵循了以下指南:https://help.ubuntu.com/community/PowerManagement/Hibernate#uswsusp并使用了 uswsusp 选项。

我使用以下方式安装了 pm-utils

sudo apt install pm-utils

uswsusp然后我从这里下载并安装:https://packages.ubuntu.com/focal/uswsusp

安装后uswsusp,请按照上述指南中的说明pm-hibernate进行配置使用。uswsusp

有了这个,我可以使用以下方法休眠我的系统

sudo pm-hibernate

这为您提供了使系统休眠的选项。

答案2

对我来说,问题是我无法再次唤醒计算机。我只看到黑屏。关闭计算​​机然后再打开是可行的,但非常烦人。我 2 天前将我的计算机从 20.04 更新到 22-04。我使用以下方法解决了该问题:

  • sudo ubuntu-drivers 自动安装
  • sudo apt-get 更新
  • sudo apt-get 升级
  • 重启

相关内容