You are not logged in.
I could have sworn that I was able to hibernate before, but on my Thinkpad T450s, I randomly can't.
The first thing I did was go into Power Manager and see that suddenly, the dropdowns where Hibernate should be selected were saying Suspend. I don't know if it was like that before, but Suspend certainly is no longer functioning as it should, so I switched to Hibernate. I got a weird message that I'd never seen before about how I need to set up an on-disk swap file in the same partition as my / partition, so I went ahead and did that; I'm on Fedora Linux using BTRFS, which doesn't actually like you doing this and so it makes you set up a new btrfs subvolume and whatnot in order to make it.
Mounting and validating the subvolume:
➜ ~ sudo btrfs subvolume list /
ID 256 gen 121318 top level 5 path home
ID 257 gen 121318 top level 5 path root
ID 258 gen 121261 top level 257 path var/lib/machines
ID 259 gen 120617 top level 5 path @swap
➜ ~ sudo btrfs subvolume show /swap
@swap
Name: @swap
UUID: c536c681-f9d7-374c-90d3-8d23aae025c0
Parent UUID: -
Received UUID: -
Creation time: 2024-10-07 11:22:22 -0700
Subvolume ID: 259
Generation: 120617
Gen at creation: 117523
Parent ID: 5
Top level ID: 5
Flags: -
Send transid: 0
Send time: 2024-10-07 11:22:22 -0700
Receive transid: 0
Receive time: -
Snapshot(s):
Quota group: n/a
➜ ~ sudo mount -t btrfs -o subvol=@swap,defaults,nodatacow /dev/disk/by-uuid/0c5e8b9d-0c7f-4801-a304-d1b3e5e42012 /mnt
➜ ~ ls /mnt
n swapfile
➜ ~ du /mnt/swapfile
14680064 /mnt/swapfile
➜ ~ du /mnt/swapfile -h
14G /mnt/swapfile
➜ ~ file /mnt/swapfile
/mnt/swapfile: Linux swap file, 4k page size, little endian, version 1, size 3670015 pages, 0 bad pages, no label, UUID=a0a29156-b763-4762-82d8-5622b9974e6d
➜ ~ stat /mnt/swapfile
File: /mnt/swapfile
Size: 15032385536 Blocks: 29360128 IO Block: 4096 regular file
Device: 0,42 Inode: 257 Links: 1
Access: (0600/-rw-------) Uid: ( 1000/ gavin) Gid: ( 1000/ gavin)
Context: unconfined_u:object_r:swapfile_t:s0
Access: 2024-10-10 13:42:13.228131459 -0700
Modify: 2024-10-07 11:23:58.571234154 -0700
Change: 2024-10-07 11:25:23.326449564 -0700
Birth: 2024-10-07 11:22:52.089052259 -0700
➜ ~
Putting it in fstab:
#
# /etc/fstab
# Created by anaconda on Fri Jun 14 00:54:44 2024
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
UUID=0c5e8b9d-0c7f-4801-a304-d1b3e5e42012 / btrfs subvol=root,compress=zstd:1 0 0
UUID=0c5e8b9d-0c7f-4801-a304-d1b3e5e42012 /swap btrfs subvol=@swap 0 0
UUID=5dc1cd14-a122-433a-8ef2-c4a8d1ab02a2 /boot ext4 defaults 1 2
UUID=C9EA-C3A3 /boot/efi vfat umask=0077,shortname=winnt 0 2
UUID=0c5e8b9d-0c7f-4801-a304-d1b3e5e42012 /home btrfs subvol=home,compress=zstd:1 0 0
/swap/swapfile none swap sw 0 0
After all that, when I close and open my laptop lid, I now get an error message saying "GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Permission denied".
Which now that I type it out, I can maybe see the problem, but if this swap partition is the problem then I guess I'll also ask what I'm supposed to do.
If it isn't, then here's the other information I'm supposed to post:
xfce4-power-manager --dump:
---------------------------------------------------
Xfce power manager version 4.18.2
With policykit support
With network manager support
---------------------------------------------------
Can suspend: True
Can hibernate: True
Authorized to suspend: True
Authorized to hibernate: True
Authorized to shutdown: True
Has battery: True
Has brightness panel: True
Has power button: True
Has hibernate button: True
Has sleep button: True
Has battery button: True
Has LID: True
➜ ~
neofetch:
gavin@thinkchad
---------------
OS: Fedora Linux 40 (Xfce) x86_64
Host: 20BX001AUS ThinkPad T450s
Kernel: 6.10.12-200.fc40.x86_64
Uptime: 46 mins
Packages: 3545 (rpm), 10 (flatpak)
Shell: zsh 5.9
Resolution: 1600x900
DE: Xfce 4.18
WM: Xfwm4
WM Theme: win7
Theme: win7 [GTK2/3]
Icons: Windows-7 [GTK2/3]
Terminal: xfce4-terminal
Terminal Font: Monospace 12
CPU: Intel i5-5300U (4) @ 2.900GHz
GPU: Intel HD Graphics 5500
Memory: 3215MiB / 11833MiB
And at some point while troubleshooting, I switched from grub to systemd-boot. I just enabled everything in systemd's `sleep.conf` and then ran `sudo systemctl daemon-reload`
[Sleep]
AllowSuspend=yes
AllowHibernation=yes
AllowSuspendThenHibernate=yes
AllowHybridSleep=yes
SuspendState=mem standby freeze
HibernateMode=platform shutdown
HibernateDelaySec=5
SuspendEstimationSec=60min
And above all else: The debug output of `xfce4-power-manager` doesn't tell me anything related to "Permission denied" when I close the lid.
```
TRACE[xfpm-manager.c:441] xfpm_manager_lid_changed_cb(): LID close event: ((XfpmLidTriggerAction) LID_TRIGGER_HIBERNATE)
** (xfce4-power-manager:9619): WARNING **: 13:49:51.538: No outputs have backlight property
(xfce4-power-manager:9619): GLib-CRITICAL **: 13:49:54.051: g_variant_unref: assertion 'value != NULL' failed
TRACE[xfpm-manager.c:473] xfpm_manager_lid_changed_cb(): LID opened: ((XfpmLidTriggerAction) LID_TRIGGER_HIBERNATE)
TRACE[xfpm-dpms.c:285] xfpm_dpms_force_level(): start
TRACE[xfpm-dpms.c:319] xfpm_dpms_force_level(): No need to change DPMS mode, current_level=0 requested_level=0
```
Offline
Hello and welcome.
Try using the "resume=c536c681-f9d7-374c-90d3-8d23aae025c0" kernel parameter to let the kernel know exactly where to find the swap partition. Also make sure your swap space is at least as big as your total system memory.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
[ Generated in 0.008 seconds, 7 queries executed - Memory usage: 538.38 KiB (Peak: 541.72 KiB) ]