You are not logged in.

#1 2022-05-01 00:12:55

From: Great White North
Registered: 2008-01-23
Posts: 881

Hibernate While Keeping Programs Open Like in Windows

I originally opened this support request on Reddit but got nowhere. I'm hoping that posting here may get me more information or suggestions on where to look for what's going on.

The original post:

When I hibernate my desktop in Win 10 I can re-start it later and my programs will come up again still 'open' and functional. In Arch this is not the case and the first few times I used this feature I was perplexed by the fact that when I re-start the laptop it is as if I am rebooting or starting from a cold boot. Very disconcerting and now also very fucking annoying. I want the Windows behaviour if possible. Any ideas about how to achieve this?

I'd say I have enough space to do what I'm trying to do and enough RAM too for that matter. Thus why I'm confused as to why Linux doesn't work the way I want it to. Is there a way to force this behaviour?

I'm on a Dell Inspiron 15 5150 laptop with 16 GB of RAM and a small 256 GB SSD.
Info on what my setup looks like doing:

i'm using a swap partition and it's shown in fstab as:

# /dev/nvme0n1p2 LABEL=root
UUID=fe849440-abf6-4d9e-b129-601430a2ec98	  /         	btrfs     	rw,relatime,ssd,space_cache,subvolid=5,subvol=/	0 0

# /dev/nvme0n1p1 LABEL=boot
UUID=3AA9-673D					                 /boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro,discard	0 2

# /dev/nvme0n1p3 LABEL=home
UUID=e87d1c3b-a825-4757-97e9-a0eba292b1dc  /home     	btrfs     	rw,nosuid,nodev,relatime,ssd,discard,space_cache,subvolid=5,noauto,x-systemd.automount,subvol=/	0 0

# /dev/nvme0n1p4 LABEL=data
UUID=7ad4926e-5301-4c75-9047-a90b025a985f	/data     	btrfs     	rw,nosuid,nodev,relatime,ssd,discard,space_cache,subvolid=5,noauto,x-systemd.automount,x-gvfs-show,commit=60,subvol=/	0 0

# Swap partition for hibernation
UUID=f5ff8b98-3266-4ad1-b05c-0c5e2ba77acb	 none 		swap 		defaults 0 0 

Mkinitcpio is posted here:

Using rEFInd and I've got this in my paragraph that I'm booting from:

output of fdisk -l:

Disk /dev/nvme0n1: 238.47 GiB, 256060514304 bytes, 500118192 sectors
Disk model: KBG40ZNS256G NVMe KIOXIA 256GB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: gpt
Disk identifier: 1F64B479-8DCC-43C7-9E08-E17FC8A0A22F

Device             Start       End   Sectors  Size Type
/dev/nvme0n1p1      2048    616447    614400  300M EFI System
/dev/nvme0n1p2    616448 154216447 153600000 73.2G Linux filesystem
/dev/nvme0n1p3 154216448 307816447 153600000 73.2G Linux filesystem
/dev/nvme0n1p4 307816448 479637503 171821056 81.9G Linux filesystem
/dev/nvme0n1p5 479637504 500117503  20480000  9.8G Linux swap

lsblk output:


nvme0n1     259:0    0 238.5G  0 disk
├─nvme0n1p1 259:1    0   300M  0 part /boot
├─nvme0n1p2 259:2    0  73.2G  0 part /
├─nvme0n1p3 259:3    0  73.2G  0 part /home
├─nvme0n1p4 259:4    0  81.9G  0 part /data
└─nvme0n1p5 259:5    0   9.8G  0 part [SWAP]/code]

cat /proc/cmdline:

ro root=/dev/nvme0n1p2 initrd=\initramfs-linux-zen.img


NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTSnvme0n1 259:0 0 238.5G 0 disk

nvme0n1p1 259:1 0 300M 0 part /boot

nvme0n1p2 259:2 0 73.2G 0 part /

nvme0n1p3 259:3 0 73.2G 0 part /home

nvme0n1p4 259:4 0 81.9G 0 part /data

nvme0n1p5 259:5 0 9.8G 0 part [SWAP]

Not sure what else I can provide to help things along.


#2 2022-05-01 00:24:37

Inspector Parrot
Registered: 2011-11-29
Posts: 26,696

Re: Hibernate While Keeping Programs Open Like in Windows

I see no evidence that you have followed any of the documentation to do enable hibernation, and several bits of evidence that you haven't.  Start here: … ibernation

EDIT: ok, there is some indication that you've configured that portion of the boot loader config - but clearly that is not what you are booting to.  You posted the config for a vanilla kernel, but /proc/cmdline has other parameters for linux-zen.  So spend more time checking your own work vs ranting about how linux doesn't work compared to windows; because hibernation does generally work just fine, if you enable it properly.

Once you've worked through the link above, and fixed your boot manager so you are actually booting what you intend to boot, then if there are still issues, post a journal of a failed hibernation / reboot.

Last edited by Trilby (2022-05-01 00:54:45)

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman


Board footer

Powered by FluxBB