Hibernate not working

garuda-inxi

System:
  Kernel: 6.2.9-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.2.1
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=2e0619b7-d537-4871-9c2c-8f273bd067cc rw [email protected]
    resume=/dev/disk/by-uuid/e166a680-1c92-4157-9c0f-e5280de00741 quiet quiet
    splash rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=3
    ibt=off
  Desktop: GNOME v: 43.4 tk: GTK v: 3.24.37 wm: gnome-shell dm: GDM v: 43.0
    Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Laptop System: HP product: HP Laptop 14-dq1xxx v: N/A serial: <filter>
    Chassis: type: 10 serial: <filter>
  Mobo: HP model: 86C8 v: 56.33 serial: <filter> UEFI: AMI v: F.25
    date: 03/09/2022
Battery:
  ID-1: BAT0 charge: 19.1 Wh (54.7%) condition: 34.9/34.9 Wh (100.0%)
    volts: 11.0 min: 11.6 model: HP Primary type: Li-ion serial: N/A
    status: discharging
CPU:
  Info: model: Intel Core i3-1005G1 socket: U3E1 bits: 64 type: MT MCP
    arch: Ice Lake gen: core 10 level: v4 note: check built: 2019-21
    process: Intel 10nm family: 6 model-id: 0x7E (126) stepping: 5
    microcode: 0xB8
  Topology: cpus: 1x cores: 2 tpc: 2 threads: 4 smt: enabled cache:
    L1: 160 KiB desc: d-2x48 KiB; i-2x32 KiB L2: 1024 KiB desc: 2x512 KiB
    L3: 4 MiB desc: 1x4 MiB
  Speed (MHz): avg: 864 high: 1101 min/max: 400/3400 base/boost: 3200/8300
    scaling: driver: intel_pstate governor: powersave volts: 1.0 V
    ext-clock: 100 MHz cores: 1: 487 2: 1101 3: 1014 4: 857 bogomips: 9523
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities: <filter>
Graphics:
  Device-1: Intel Iris Plus Graphics G1 vendor: Hewlett-Packard driver: i915
    v: kernel arch: Gen-11 process: Intel 10nm built: 2019-21 ports:
    active: eDP-1 empty: HDMI-A-1 bus-ID: 00:02.0 chip-ID: 8086:8a56
    class-ID: 0300
  Device-2: Luxvisions Innotech HP TrueVision HD Camera type: USB
    driver: uvcvideo bus-ID: 1-3:3 chip-ID: 30c9:0013 class-ID: 0e02
    serial: <filter>
  Display: server: X.Org v: 23.1.1 with: Xwayland v: 23.1.1
    compositor: gnome-shell driver: X: loaded: N/A unloaded: modesetting
    alternate: fbdev,intel,vesa gpu: i915 note: X driver n/a display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x286mm (20.00x11.26")
    s-diag: 583mm (22.95")
  Monitor-1: eDP-1 model: BOE Display 0x082b built: 2018 res: 1920x1080
    hz: 60 dpi: 157 gamma: 1.2 size: 310x170mm (12.2x6.69") diag: 355mm (14")
    ratio: 16:9 modes: 1920x1080
  API: OpenGL Message: Unable to show GL data. Required tool glxinfo
    missing.
Audio:
  Device-1: Intel Ice Lake-LP Smart Sound Audio vendor: Hewlett-Packard
    driver: snd_hda_intel v: kernel alternate: snd_sof_pci_intel_icl
    bus-ID: 00:1f.3 chip-ID: 8086:34c8 class-ID: 0403
  API: ALSA v: k6.2.9-zen1-1-zen status: kernel-api tools: N/A
  Server-1: PipeWire v: 0.3.67 status: n/a (root, process) with:
    1: pipewire-pulse status: active 2: wireplumber status: active
    3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Realtek RTL8822CE 802.11ac PCIe Wireless Network Adapter
    vendor: Hewlett-Packard driver: rtw_8822ce v: N/A modules: rtw88_8822ce
    pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 01:00.0
    chip-ID: 10ec:c822 class-ID: 0280
  IF: wlo1 state: up mac: <filter>
RAID:
  Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci
    v: 3.0 port: 4060 bus-ID: 00:17.0 chip-ID: 8086:282a rev: N/A class-ID: 0104
Drives:
  Local Storage: total: 238.47 GiB used: 14.1 GiB (5.9%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital model: PC SN530
    SDBPNPZ-256G-1006 size: 238.47 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: HPS2 temp: 35.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 137.8 GiB size: 137.8 GiB (100.00%)
    used: 14.07 GiB (10.2%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p2
    maj-min: 259:2
  ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%)
    used: 31.6 MiB (32.9%) fs: vfat block-size: 512 B dev: /dev/nvme0n1p3
    maj-min: 259:3
  ID-3: /home raw-size: 137.8 GiB size: 137.8 GiB (100.00%)
    used: 14.07 GiB (10.2%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p2
    maj-min: 259:2
  ID-4: /var/log raw-size: 137.8 GiB size: 137.8 GiB (100.00%)
    used: 14.07 GiB (10.2%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p2
    maj-min: 259:2
  ID-5: /var/tmp raw-size: 137.8 GiB size: 137.8 GiB (100.00%)
    used: 14.07 GiB (10.2%) fs: btrfs block-size: 4096 B dev: /dev/nvme0n1p2
    maj-min: 259:2
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 11.18 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/nvme0n1p6 maj-min: 259:6
Sensors:
  System Temperatures: cpu: 58.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 237 Uptime: 44m wakeups: 7667 Memory: 7.46 GiB
  used: 3.66 GiB (49.0%) Init: systemd v: 253 default: graphical
  tool: systemctl Compilers: gcc: 12.2.1 clang: 15.0.7 Packages: pm: pacman
  pkgs: 1235 libs: 341 tools: pamac,paru,yay Shell: garuda-inxi (sudo)
  default: Bash v: 5.1.16 running-in: gnome-terminal inxi: 3.3.26
Garuda (2.6.16-1):
  System install date:     2023-04-06
  Last full system update: 2023-04-07
  Is partially upgraded:   No
  Relevant software:       snapper NetworkManager dracut
  Windows dual boot:       Yes
  Failed units:

I did not set up a swap partition initially so i followed a guide to set one up in gparted, which I know is set up correctly because sudo swapoff -a then sudo swapon /dev/nvme0n1p6 both execute with no errors.
I then changed the initramfs by adding "add_dracutmodules= ' resume '" to /etc/dracut.conf.d/resume.conf and running sudo dracut --regenerate-all --force
output:

dracut: Executing: /usr/bin/dracut --kver=6.2.9-zen1-1-zen --force
dracut: dracut module 'dash' will not be installed, because command 'dash' could not be found!
dracut: dracut module 'mksh' will not be installed, because command 'mksh' could not be found!
dracut: dracut module 'busybox' will not be installed, because command 'busybox' could not be found!
dracut: dracut module 'dbus-broker' will not be installed, because command 'dbus-broker' could not be found!
dracut: dracut module 'rngd' will not be installed, because command 'rngd' could not be found!
dracut: dracut module 'network-legacy' will not be installed, because command 'dhclient' could not be found!
dracut: dracut module 'network-wicked' will not be installed, because command 'wicked' could not be found!
dracut: dracut module 'dmraid' will not be installed, because command 'kpartx' could not be found!
dracut: dracut module 'tpm2-tss' will not be installed, because command 'tpm2' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsi-iname' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsiadm' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsid' could not be found!
dracut: dracut module 'nvmf' will not be installed, because command 'nvme' could not be found!
dracut: dracut module 'biosdevname' will not be installed, because command 'biosdevname' could not be found!
dracut: dracut module 'memstrack' will not be installed, because command 'memstrack' could not be found!
dracut: memstrack is not available
dracut: If you need to use rd.memdebug>=4, please install memstrack and procps-ng
dracut: dracut module 'squash' will not be installed, because command 'mksquashfs' could not be found!
dracut: dracut module 'squash' will not be installed, because command 'unsquashfs' could not be found!
dracut: dracut module 'dash' will not be installed, because command 'dash' could not be found!
dracut: dracut module 'mksh' will not be installed, because command 'mksh' could not be found!
dracut: dracut module 'busybox' will not be installed, because command 'busybox' could not be found!
dracut: dracut module 'dbus-broker' will not be installed, because command 'dbus-broker' could not be found!
dracut: dracut module 'rngd' will not be installed, because command 'rngd' could not be found!
dracut: dracut module 'network-legacy' will not be installed, because command 'dhclient' could not be found!
dracut: dracut module 'network-wicked' will not be installed, because command 'wicked' could not be found!
dracut: dracut module 'dmraid' will not be installed, because command 'kpartx' could not be found!
dracut: dracut module 'tpm2-tss' will not be installed, because command 'tpm2' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsi-iname' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsiadm' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsid' could not be found!
dracut: dracut module 'nvmf' will not be installed, because command 'nvme' could not be found!
dracut: dracut module 'memstrack' will not be installed, because command 'memstrack' could not be found!
dracut: memstrack is not available
dracut: If you need to use rd.memdebug>=4, please install memstrack and procps-ng
dracut: dracut module 'squash' will not be installed, because command 'mksquashfs' could not be found!
dracut: dracut module 'squash' will not be installed, because command 'unsquashfs' could not be found!
dracut: *** Including module: systemd ***
dracut: *** Including module: systemd-initrd ***
dracut: *** Including module: i18n ***
dracut: *** Including module: drm ***
dracut: *** Including module: plymouth ***
dracut: *** Including module: btrfs ***
dracut: *** Including module: kernel-modules ***
dracut: *** Including module: kernel-modules-extra ***
dracut: *** Including module: btrfs-snapshot-overlay ***
dracut: *** Including module: resume ***
dracut: *** Including module: rootfs-block ***
dracut: *** Including module: terminfo ***
dracut: *** Including module: udev-rules ***
dracut: Skipping udev rule: 40-redhat.rules
dracut: Skipping udev rule: 50-firmware.rules
dracut: Skipping udev rule: 50-udev.rules
dracut: Skipping udev rule: 91-permissions.rules
dracut: Skipping udev rule: 80-drivers-modprobe.rules
dracut: Skipping udev rule: 70-persistent-net.rules
dracut: *** Including module: dracut-systemd ***
dracut: *** Including module: usrmount ***
dracut: *** Including module: base ***
dracut: *** Including module: fs-lib ***
dracut: *** Including module: shutdown ***
dracut: *** Including modules done ***
dracut: *** Installing kernel module dependencies ***
dracut: *** Installing kernel module dependencies done ***
dracut: *** Resolving executable dependencies ***
dracut: *** Resolving executable dependencies done ***
dracut: *** Hardlinking files ***
dracut: Mode:                     real
dracut: Method:                   sha256
dracut: Files:                    1094
dracut: Linked:                   11 files
dracut: Compared:                 0 xattrs
dracut: Compared:                 73 files
dracut: Saved:                    142.46 KiB
dracut: Duration:                 0.008473 seconds
dracut: *** Hardlinking files done ***
dracut: *** Generating early-microcode cpio image ***
dracut: *** Using microcode found in '/boot/intel-ucode.img' ***
dracut: *** Store current command line parameters ***
dracut: *** Stripping files ***
dracut: *** Stripping files done ***
dracut: *** Creating image file '/boot/initramfs-6.2.9-zen1-1-zen.img' ***
dracut: *** Creating initramfs image file '/boot/initramfs-6.2.9-zen1-1-zen.img' done ***

i changed my /etc/default/grub as reflected in my garuda-inxi where the uuid is from the output of blkid |grep swap,namely: /dev/nvme0n1p6: UUID="e166a680-1c92-4157-9c0f-e5280de00741" TYPE="swap" PARTLABEL="swap" PARTUUID="be3ae750-d56c-49c7-a293-4e0f6f09faf1"

I also changed my /etc/fsab by appending UUID=e166a680-1c92-4157-9c0f-e5280de00741 swap swap defaults 0 0, such that it is now

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=2e0619b7-d537-4871-9c2c-8f273bd067cc /              btrfs   subvol=/@,defaults,noatime,compress=zstd 0 0
UUID=2e0619b7-d537-4871-9c2c-8f273bd067cc /home          btrfs   subvol=/@home,defaults,noatime,compress=zstd>
UUID=2e0619b7-d537-4871-9c2c-8f273bd067cc /root          btrfs   subvol=/@root,defaults,noatime,compress=zstd>
UUID=2e0619b7-d537-4871-9c2c-8f273bd067cc /srv           btrfs   subvol=/@srv,defaults,noatime,compress=zstd >
UUID=2e0619b7-d537-4871-9c2c-8f273bd067cc /var/cache     btrfs   subvol=/@cache,defaults,noatime,compress=zst>
UUID=2e0619b7-d537-4871-9c2c-8f273bd067cc /var/log       btrfs   subvol=/@log,defaults,noatime,compress=zstd >
UUID=2e0619b7-d537-4871-9c2c-8f273bd067cc /var/tmp       btrfs   subvol=/@tmp,defaults,noatime,compress=zstd >
UUID=3E32-AE0F                            /boot/efi      vfat    defaults,noatime 0 2
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0
UUID=e166a680-1c92-4157-9c0f-e5280de00741 swap swap defaults 0 0

then I rebuilt with sudo grub-mkconfig -o /boot/grub/grub.cfg
output:

Found theme: /usr/share/grub/themes/garuda/theme.txt
Found linux image: /boot/vmlinuz-linux-zen
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux-zen.img
Found fallback initrd image(s) in /boot:  intel-ucode.img initramfs-linux-zen-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/[email protected]/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
Detecting snapshots ...
Found snapshot: 2023-04-07 12:05:57 | @/.snapshots/50/snapshot | post | firedragon                                        |
Found snapshot: 2023-04-07 12:05:55 | @/.snapshots/49/snapshot | pre  | /usr/bin/pamac-daemon                             |
Found snapshot: 2023-04-07 02:51:00 | @/.snapshots/48/snapshot | post | yay                                               |
Found snapshot: 2023-04-07 02:50:59 | @/.snapshots/47/snapshot | pre  | pacman -S yay                                     |
Found snapshot: 2023-04-07 02:24:01 | @/.snapshots/46/snapshot | post | gparted                                           |
Found snapshot: 2023-04-07 02:23:59 | @/.snapshots/45/snapshot | pre  | /usr/bin/pamac-daemon                             |
Found snapshot: 2023-04-07 01:53:55 | @/.snapshots/44/snapshot | post | cmake gnome-bluetooth meson python-nautilus rhash |
Found snapshot: 2023-04-07 01:53:48 | @/.snapshots/43/snapshot | pre  | /usr/bin/pamac-daemon                             |
Found snapshot: 2023-04-07 01:51:05 | @/.snapshots/42/snapshot | post | nautilus nautilus-sendto                          |
Found snapshot: 2023-04-07 01:51:02 | @/.snapshots/41/snapshot | pre  | /usr/bin/pamac-daemon                             |
Found 10 snapshot(s)
Unmount /tmp/grub-btrfs.1ZW3hw9Vs3 .. Success
Found memtest86+ image: /boot/memtest86+/memtest.bin
/usr/bin/grub-probe: warning: unknown device type nvme0n1.
done

finally i used systemctl hibernate to attempt a hibernate, only to turn on the laptop and find none of my apps still open. My laptop also completely forgets it has bluetooth when I suspend it if thats helpful, which is why I need hibernate.

HI @shine-Diamond-295, welcome to the community. :slightly_smiling_face:

Careful with this command--you have actually taken down your zram as well (it appears to be missing from your inxi). You will want to take advantage of zram because it will help keep swap activity off of your swap partition, so the whole partition is available when you need to hibernate.

The zram should come back up on its own after a reboot; you can double-check by running zramctl.

The module in the configuration file looks correct. The command you have run to rebuild the initramfs is not quite what you want though; dracut defaults to naming the initramfs with the kernel version number:

That image naming convention will not match the kernel that you are booting with. Check ls /boot and you will see what I mean. The initramfs-6.2.9-zen1-1-zen.img you made is not going to be used when you are booting the a kernel named vmlinuz-linux-zen.

You can specify the name you want when rebuilding the initramfs with dracut. In this case you will want to name it initramfs-linux-zen.img. Or you can rename the image you created so it matches the kernel.

Even simpler than all that would be to use the special script Garuda has for rebuilding the initramfs:

sudo dracut-rebuild

This will automatically rebuild the initramfs with a --hostonly image and a fallback image for each kernel found in /boot, and will follow the needed naming convention and overwrite the old images. It also reduce the verbosity of the output, so only error messages are displayed (instead of a message for every single module).

After rebuilding the image, reboot (so you are booted with the updated image) and then test hibernation again.

5 Likes

Thanks so much it worked! I'm relatively new to messing with the initramfs and linux in general so there's no way I would have figured that out by myself. So the problem was that the initramfs image that i was updating was not being used during the actual booting process so i had to use the other command to actually update the one thats being used, right? I just want to run it by you to see if I understand.

About the zram thing, i just disabled it because i thought the computer was trying to use it to hibernate from and it wasn't working since its ram. (i had no reason to think that i was just out of options lol) Ive turned it back on now.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.