Hibernation? Using it?

Hmm, might be the specs. Mine (i5, 16GB RAM) hibernates in about 3 seconds and resumes in about 5-6 after I enter my LUKS password. Then again, it might also be that I’m using sway rather than Gnome or KDE.

1 Like

Checking back in with this, I don’t seem to run into this issue after having hibernated and resumed several times.

I am on the i7 - 85G, 64GB RAM. I believe the time frame is because I’m saving the state to the expansion card memory, and not the NVME I’m using as the system drive.

I just found Sway and I love it! I need to work on getting some quality of life features working on it, but once I get there I think I’ll be good. I just need some GUI elements, like battery life, network status, and a menu that allows me to restart, shutdown, standby, or hibernate.

I got a MNT Reform coming in, which uses Sway by default so I figure I might as well get used to it. Now I actually prefer it.

Yeah, that might be part of it (along with the 64GB of RAM).

Look into waybar instead of the default swaybar — it’s wayyyy more customizable and has a better OOTB config IMO.

That looks perfect!

Do you know if it possible to hide the bar? Similar to how the taskbar in windows hide, until you mouse down to it?

I put bindsym $mod+b exec pkill -SIGUSR1 waybar in my sway config file, which toggles whether the bar is shown. I find a keybinding way more convenient than having to drag the cursor all the way up haha.

Oh also, look into binding the on-click-type stuff on a custom waybar module to potentially suspend/hibernate/etc (you can pop up something with wofi to let you select which action you want to do, for example).

For example, this snippet will do something similar to what you want to do: echo -e 'suspend\nhibernate\npoweroff' | wofi -S dmenu -k /dev/null | xargs systemctl --

(the -k /dev/null means that items will be ordered the way you want them to be, so you can edit the order in the echo statement to get the exact order you want)

1 Like

You’ve convinced me! I like it! Just need to figure out why none of the icons are working on the bar. I installed the dependencies but no dice.

1 Like

You either have an old version of Font Awesome or you have another font that is usurping that set of codepoints. You’ll want to edit ~/.config/waybar/style.css to specify “Font Awesome 5” and you’ll want to download Font Awesome 5 and install it in ~/.local/share/fonts (that’s what I did anyway, since I had the same issue).

1 Like

Turns out that I didn’t have fonts-font-awesome installed at all. Installed that and reloaded sway’s setting and presto icons showed up.

I was able to modify the border width to get rid of the program label bars as well.

The only issue I’m having now is I can’t open Workstation as I rebooted and a new kernel is in use now. Workstation needs to recompile vmon and vnet into the kernel but it doesn’t seem to work on Sway. Normally when opening Workstation it would have a dialog box that pops up telling you that, and then when you click continue another terminal window will pop up and you’ll enter the root password, and then it compiles and inserts them into the kernel. This terminal window never opens and I can’t get it to progress.

Any ideas? And I promise I’ll stop derailing this thread!!!

Sorry, I haven’t used Workstation at all. The main thing I’d suggest is launching it from the terminal instead of from wofi or whatever.

Yeah i tried that. It is goofy with trying to set the current user and so even the correctly provided password doesn’t work.

I just loaded into Gnome and did it there, then logged out, and back into Sway. I’m sure I’ve eventually learn how to stay in Sway for nearly everything. I need to get some bluetooth controls though. Trying to see if I can use Gnome settings under Sway.

Particularily if the session buttons could be added. Probably just need to make some keybindings for that.

Did either of you have to do anything special to get resume in 7 seconds? I’m on fedora 35 and I had hibernation working on file (btrfs) and could resume in 13 seconds, but then I read a guide that said I shouldn’t do that. So I got a WD black with a separate partition and I’m resuming in 30 seconds :unamused:. I can boot faster than I can resume, I don’t understand.

How much RAM are you using when you hibernate? That is, basically, how much RAM does resuming have to restore?

In my case, it’s only a few gigs at worst (usually 2-3 GB), which probably explains why resume happens fairly quickly. I suspect if you’re using tens of gigs of RAM when you hibernate, it will take a while to restore (and that’s why zram seems to help you, since it reduces the amount that needs to be restored).

Mine still takes time from suspend or hibernate. But I really don’t mind. I have my swap on a 250gb extension card as well. When it is hot it will throttle.

I’m just kind of dealing with it because everything else is good and I can at least sleep for as long as I want unlike under windows. But I usually hibernate.

Right now is a pretty standard workload for me and I’m at 2.6 GB usage.

I did find half my problem though:
[jesse@frame ~]$ sudo systemctl disable NetworkManager-wait-online.service

Dropped it by 15 seconds. I don’t know why they don’t just ask if it’s needed on install. Or if hibernation is wanted :man_shrugging:. Maybe they need an advanced installer.

Also another data point for anyone who finds this, my old SSD claimed 3500MB/s reads, but my new WD Black isn’t any better. Hopefully over time it gets faster, but also I’m thinking most of my improvements from here are firmware related. Perhaps I’ll roll back from beta? I’m not sure. Are both of you on stock?

The last Windows laptop I used before switching to Linux did this all the time, I kinda found it annoying. I put it to sleep and if it was sleeping for too long it would wake up then hibernate… Back then I was using a hard disk drive so it did take a while to resume.

It stopped doing this after updating to Windows 10 though, probably because Windows 10 would wake up the machine to install updates instead :flushed:

Thanks. I just followed these directions on Manjaro and my laptop now … hibernates.

I think that, sadly, most of the issues are related to closed sourced firmware on laptops (and desktop) motherboards and, let me add, on hard drives firmware (no matter which technology you pick, they all have some firmware). To put it very simply: if Linux doesn’t know how the hardware behaves, it can only use “generic methods” to “instruct it” to hibernate; then, what the hardware does and how it responds to the software “commands” it’s ouf of Linux control, if it doesn’t know anything about it.
That’s why I’m really hopeful that opensourcing the Framework’s firmware would help a lot in this respect, as well as others.

How does one update initramfs ?
I’ve added RESUME=/dev/mapper/luks-a0a21122-091b-46ed-89a5-a721e59ae4db to /etc/initramfs-tools/conf.d/resume and then sudo update-initramfs -u -k all, yet hibernation still acts like a reboot :frowning:

All the tests from Debugging hibernation and suspend — The Linux Kernel documentation pass (at least it looks like they do, no error is thrown in terminal). I’m a bit desperate, feels like I’ve tried it all.

My OS is KDE Neon, so it’s based on 20.04.
Both root and swap partition encrypted.

1 Like

This means that when resuming the OS is not able to access/find the swap to resume from. In this case the fail back is to boot as if it was a cold boot.

So you’ll need to check that your swap / swap file UUID is correct and ensure that decryption is happening before it tries to resume from it. I know that if you are dealing with encryption it gets REAL tricky. This is why I always use a separate partition that is NOT encrypted. I figure if I am really concerned about being compromised I wont be hibernating anyway. In the meantime it gets hibernation working so much easier.