0

My Kubuntu 22.04 on a Macbook Air takes a lot to wake up from sleep, which makes me think it's maybe hibernating in fact.

This is happening even if the lid is closed for a few seconds. It takes up to 10-15 seconds to wake up.

Only Escape key seems to work for this purpose.

In the Plasma settings the default is sleep/suspend when lid is closed, and there is no hibernation option:

enter image description here

I have read here (Does linux have a hybrid "deep sleep" mode like the Mac?) that Ubuntu above 18.04 has this feature, but here it says that the feature is not enabled by default but needs editing the file /etc/systemd/sleep.conf. On my system that file has all options commented out:

[Sleep]
#AllowSuspend=yes
#AllowHibernation=yes
#AllowSuspendThenHibernate=yes
#AllowHybridSleep=yes
#SuspendMode=
#SuspendState=mem standby freeze
#HibernateMode=platform shutdown
#HibernateState=disk
#HybridSleepMode=suspend platform shutdown
#HybridSleepState=disk
#HibernateDelaySec=180min

How can I tell what is happening and what are the settings on my system?

I want to know whether this behavior is due to hibernation being active by default (by some Kubuntu setting or by deeper Macbook boot settings) or to some odd problem with the OS taking a lot of time to wake up from suspend.

cipricus
  • 3,444
  • 2
  • 34
  • 85
  • When off press the spacebar and when you do not have wake on keyboard on it was hibernating or suspending if it tuns on. Any keyboard key will get it out of hibernation or suspend. – Rinzwind Aug 24 '22 at 11:38
  • @Rinzwind - Your comment is obscure. My question is in the title: how can I tell if my laptop is hibernating or not. But I will edit and add more details. – cipricus Aug 24 '22 at 12:48
  • you can probably check journalctl for the time when it went to sleep, and see if it entered suspend or hibernate mode – Esther Aug 24 '22 at 13:41
  • @Esther - running journalctl -b, I see lines like kernel: PM: hibernation: Registered nosave memory: [mem 0x00000000-0x00000fff]. So, it's hibernation, isn't it? – cipricus Aug 24 '22 at 14:42
  • looks like it, weird. https://unix.stackexchange.com/questions/666434/hibernation-disabled-but-kernel-pm-hibernation-registered-nosave-memory https://forums.gentoo.org/viewtopic-t-1146511-start-0.html (looks like it might be a laptop power-saving setting of some kind) – Esther Aug 24 '22 at 14:56

1 Answers1

0

Based on the comment by @Esther -- running journalctl -b, I see lines like kernel: PM: hibernation: Registered nosave memory: [mem 0x00000000-0x00000fff]. So, it's hibernation, it seems.

On the other hand, after running sudo systemctl suspend-then-hibernate in order to just test if that worked, what happened was a sort of sleep from which the laptop woke quickly.

But afterwards all that I describe in the anser stopped happening. Now the laptop is just entering normal sleep (it wakes up almost instantly when I open the lid). Maybe some default file was now re-written, reset, or set to defaults.

Anyway, now the solutions in the links posted in my question can be used (activating "suspend then hibernate" and setting the delay before hibernation.)

cipricus
  • 3,444
  • 2
  • 34
  • 85