Bug 1858219
| Summary: | Failed to hibernate system via logind: Sleep verb "hibernate" not supported | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | lnie <lnie> | ||||
| Component: | systemd | Assignee: | systemd-maint | ||||
| Status: | CLOSED CANTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | rawhide | CC: | lnykryn, msekleta, ssahani, s, systemd-maint, zbyszek | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2020-07-28 07:39:09 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 1816645 | ||||||
| Attachments: |
|
||||||
|
Description
lnie
2020-07-17 09:21:49 UTC
That is strange. If there's no swap, the error message is "Not enough swap space for hibernation". Can you please install systemd-tests and execute: sudo /usr/lib/systemd/tests/test-sleep Yes,but there is swap on this system.
[lnie@localhost ~]$ swapon
NAME TYPE SIZE USED PRIO
/dev/dm-1 partition 7.5G 0B -2
[lnie@localhost ~]$ sudo /usr/lib/systemd/tests/test-sleep
/* test_parse_sleep_config */
allow_suspend: 1
allow_hibernate: 1
allow_s2h: 1
allow_hybrid_sleep: 1
suspend modes:
states: mem, standby, freeze
hibernate modes: platform, shutdown
states: disk
hybrid modes: suspend, platform, shutdown
states: disk
/* test_sleep */
/= configuration =/
Standby configured: no
Suspend configured: yes
Hibernate configured: no
Hibernate+Suspend (Hybrid-Sleep) configured: no
Hibernate+Reboot configured: no
Hibernate+Platform configured: no
Hibernate+Shutdown configured: no
Freeze configured: yes
/= running system =/
Suspend configured and possible: yes
Hibernation configured and possible: no
Hybrid-sleep configured and possible: no
Unable to hibernate system.
Suspend-then-Hibernate configured and possible: no
/* test_fiemap */
extent map information for /usr/lib/systemd/tests/test-sleep:
start: 0
length: 20408
flags: 1
number of mapped extents: 1
extent count: 1
first extent location: 2719360
'cat /proc/cmdline' and 'systemd-analyze cat-config systemd/sleep.conf' please. [lnie@localhost ~]$ cat /proc/cmdline BOOT_IMAGE=(hd0,gpt4)/vmlinuz-5.8.0-0.rc4.1.fc33.x86_64 root=/dev/mapper/fedora_localhost--live-root ro resume=/dev/mapper/fedora_localhost--live-swap rd.lvm.lv=fedora_localhost-live/root rd.lvm.lv=fedora_localhost-live/swap rhgb quiet [lnie@localhost ~]$ systemd-analyze cat-config systemd/sleep.conf # /etc/systemd/sleep.conf # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # Entries in this file show the compile time defaults. # You can change settings by editing this file. # Defaults can be restored by simply deleting this file. # # See systemd-sleep.conf(5) for details [Sleep] #AllowSuspend=yes #AllowHibernation=yes #AllowSuspendThenHibernate=yes #AllowHybridSleep=yes #SuspendMode= #SuspendState=mem standby freeze #HibernateMode=platform shutdown #HibernateState=disk #HybridSleepMode=suspend platform shutdown #HybridSleepState=disk #HibernateDelaySec=180min An incorrect errno was passed in the code. This might be fixed by https://github.com/systemd/systemd/commit/6f9120ad61. Oh, this is rawhide, not F32. So that's patch is already applies. Could you please run 'sudo strace -s200 /usr/lib/systemd/tests/test-sleep' and attach here? Created attachment 1702499 [details]
output of " sudo strace -s200 /usr/lib/systemd/tests/test-sleep"
Thanks.
access("/sys/power/state", W_OK) = 0
openat(AT_FDCWD, "/sys/power/state", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0
read(3, "freeze mem\n", 4096) = 11
So hibernation is disabled at the kernel level. Do you have Secure Boot enabled?
(E.g. what does 'bootctl' say?)
Np.I haven't set anything,just do a default installation,and I don't know why secure boot is enabled.
[lnie@localhost ~]$ sudo bootctl
[sudo] password for lnie:
systemd-boot not installed in ESP.
System:
Firmware: n/a (n/a)
Secure Boot: enabled
Setup Mode: user
Boot into FW: supported
Current Boot Loader:
Product: n/a
Features: ✗ Boot counting
✗ Menu timeout control
✗ One-shot menu timeout control
✗ Default entry control
✗ One-shot entry control
✗ Support for XBOOTLDR partition
✗ Support for passing random seed to OS
✗ Boot loader sets ESP partition information
ESP: n/a
File: └─n/a
Random Seed:
Passed to OS: no
System Token: not set
Exists: no
Available Boot Loaders on ESP:
ESP: /boot/efi (/dev/disk/by-partuuid/41a53e43-4afc-4f85-b8d9-7c9407781a73)
File: └─/EFI/BOOT/bootx64.efi
File: └─/EFI/BOOT/BOOTIA32.EFI
Boot Loaders Listed in EFI Variables:
Title: Fedora
ID: 0x0001
Status: active, boot-order
Partition: /dev/disk/by-partuuid/41a53e43-4afc-4f85-b8d9-7c9407781a73
File: └─/EFI/fedora/shimx64.efi
Title: Windows Boot Manager
ID: 0x0000
Status: active, boot-order
Partition: /dev/disk/by-partuuid/41a53e43-4afc-4f85-b8d9-7c9407781a73
File: └─/EFI/Microsoft/Boot/bootmgfw.efi
Boot Loader Entries:
$BOOT: /boot/efi (/dev/disk/by-partuuid/41a53e43-4afc-4f85-b8d9-7c9407781a73)
0 entries, no entry could be determined as default.
I queued up a patch locally to make the logs more verbose in this case. But there isn't anything to fix here really. The kernel does not allow hibernation when secure boot is enabled. For the foreseeable future, users need to either disable secure boot or live without hibernation. |