Ask Your Question
4

Fedora28 Hibernate Problem

asked 2018-04-29 09:14:04 -0500

heybuddy gravatar image

updated 2018-05-05 19:56:52 -0500

Hi Fedora folks! I'm new to Fedora, and I love it so far with only a couple of exceptions, one of which is that I can't seem to make hibernate/sleep work properly. I gather that there is more than one sleep-like state available, and I'm not super picky about which one fedora chooses when I close my laptop lid or leave it alone for a while. The behaviours I'm looking for are:

  • I close my laptop lid when I get sleepy
  • laptop battery isn't dead when I wake up
  • laptop doesn't reboot when I open the screen ( it should just resume )

and

  • I walk away from open laptop for several hours
  • laptop battery isn't dead when I come back

EDIT

I'm running Fedora 28 after initially installed Fedora 27, updating (via dnf) to Fedora 28 Beta, and then installing the system update offered earlier today which results in:

➜  ~ uname -a               
Linux smallcat.dog 4.16.5-300.fc28.x86_64 #1 SMP Fri Apr 27 17:38:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
➜  ~ cat /etc/fedora-release
Fedora release 28 (Twenty Eight)

I've been reading some bug reports about this issue as well as some answers on this site , and I've followed some of (I think all?) of the recommendations in those threads.

My laptop is a Thinkpad X1 Carbon 6th gen, 16GB memory, and I'm currently dual booting debian and fedora (I'm not sure if dual-boot should affect hibernate). I have disabled secure boot.

I've tried adding each of resume=uuid={my-swap-uuid-as-seen-from-lvdisplay}, resume=fedora/swap, and resume=/dev/mapper/fedora-swap to my /etc/default/grub (then grub2-mkconfig > /etc/grub2-efi.cfg and reboot between each try), and none of them make hibernate work. I believe the resume=/dev/mapper/fedora-swap option is correct since my boot-time is about 15 seconds with that option (still pretty painfully slow compared to the debian boot time of less than 5 seconds), while booting takes well over 90 seconds when resume is either not set or set to a non-/dev/mapper/fedora-swap value.

My fedora swap partition is only 8GB which is less than my available ram, but I'm not sure that should be a show-stopper if my ram usage at suspend time is less than 8GB.

In any event, when I type systemctl hibernate, the screen goes dark and the power light stays on for a few seconds, but then turns off, and the laptop won't resume when I press keys. If I press the power button or close and reopen the laptop lid, the machine boots up -- indicating that it has most definitely been powered off :)

I don't have enough points here to attach the output of journalctl --since today, but the following snippet shows some action around one of my recent hibernate attempts:

Apr 29 09:20:01 smallcat.dog systemd[1]: Found device /dev/mapper/fedora-swap.
Apr 29 09:20:01 smallcat ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2018-05-06 10:33:13 -0500

heybuddy gravatar image

Ok after a fresh installation of Fedora 28 the other day (after UPDATE 4), resume is now added by default to the appropriate line in /etc/default/grub (thanks to this heroic effort, and after adding HandleLidSwitch=hibernate and IdleAction=hibernate to /etc/systemd/logind.conf I can now close my laptop, walk away for a long time, and come back pretty much where I left off in terms of saved state and battery life!

There are a couple of weird issues remaining, but I'm so happy to not have a dead battery all the time that I'll just figure them out later :)

remaining problems: - for some reason my gvim windows go away when I resume from hibernate, but other windows seem to maintain their state - when I resume, the laptop basically does a full reboot (lenovo boot splash -> boot menu -> fedora), but it's not a total disaster because when I choose fedora from the boot menu I get plopped back at the unlock screen (as opposed to the login screen), and my session is more or less where I left it - for some unknown reason my powertop preferences keep getting overwritten -- not sure if this is related to hibernate or not, but it is super annoying :)

Anyway, stuff is kinda working now! Hopefully all this gets automated and these options more clearly exposed somehow -- maybe in an advanced options tab in the install wizard?

edit flag offensive delete link more
0

answered 2018-06-19 06:40:50 -0500

lhirlimann gravatar image

https://wiki.archlinux.org/index.php/...ThinkPadX1Carbon(Gen_6) has a bunch of suggestion on how to fix sleep/hibernate issues on the hardware described above.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-04-29 09:12:20 -0500

Seen: 4,759 times

Last updated: May 06 '18