Sleep vs Suspend

Suggestions and feedback for Linux Mint and the forums
Forum rules
Do not post support questions here. Before you post read: Where to post ideas & feature requests
Locked
chris_heath
Level 1
Level 1
Posts: 10
Joined: Thu Jan 11, 2018 10:17 pm

Sleep vs Suspend

Post by chris_heath »

:idea:
Mint 18.3 Cinnamon

i recently decided to go change my screensaver and screen off timings

the screensaver lock setting uses the word "sleep"
but
the power settings do not use the word terminology it says: "suspend when inactive for:"

this semantic inconsistency had me spending way too much time trying to figure out what sleep meant vs suspend
were they the same thing? they probably are, but how to know for sure? and why use different words?
and now that i'm in research mode why not look into what hybrid sleep means too?


now i'm spending just as much time laboring over how to properly approach this feature of open source instead of treating it like a bug

where is the proper place to address this inconsistency?
  • is this a linux mint issue?
  • is this a cinnamon issue?
  • xscreensaver?
all my searching and reading forums was getting me nowhere
and i understand that documentation is typically not a priority for open source projects

i ended up stumbling upon my own solution to my initial sleep vs suspend quandary
the tool tips that appear when you pause the mouse and hover over each setting held the key

the screensaver setting that says "lock when put to sleep" has a tool tip that says "require password when wake up from suspend"
this made it clear (at least implicitly) that sleep == suspend

so back to hybrid sleep in the power settings to see if it's tool tip is helps
the "enable hybrid sleep" tool tip says "replaces suspend with hybrid sleep"
off to google again we go... and then i decided enough was enough (for today)

so here's my final thoughts:
  • is there such a thing as man pages for gui elements?
    man pages are great, they are the end-user manuals
    why doesn't every gui element have a similarly detailed source of information about how to use it
    am i crazy? or am i just getting old and crotchety?
hope this helps someone in the future
and please do let me know i need to clarify or correct
cheers,
chris
User avatar
kc1di
Level 18
Level 18
Posts: 8146
Joined: Mon Sep 08, 2008 8:44 pm
Location: Maine USA

Re: Sleep vs Suspend

Post by kc1di »

Hello chris_heath and Welcome to the Mint Forums,

My limited understanding of the issue is that when the computer is suspended it dumps all important info to RAM memory to be safely held until you come out of suspend.
The Screen saver sleep mode only puts the monitor to sleep and does not suspend the machine so it still using as much power as before but just will not display anything on the monitor.

So under suspend your computer is semi shutdown, Under screen saver you are only shutting down the monitor. So no, the sleep and suspend are not the same thing and they preform two different functions.

Hope this helps in your search.
Easy tips : https://easylinuxtipsproject.blogspot.com/ Pjotr's Great Linux projects page.
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Sleep vs Suspend

Post by Cosmo. »

There is no inconsistency. "Sleep" can be suspend or hibernate". The settings in the screensaver settings are true for both.
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Sleep vs Suspend

Post by catweazel »

Cosmo. wrote: Sat Apr 14, 2018 5:12 am There is no inconsistency. "Sleep" can be suspend or hibernate". The settings in the screensaver settings are true for both.
I'm not sure that's correct. Sleep and suspend are the same thing but I'm certain that hibernate is not.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Sleep vs Suspend

Post by Cosmo. »

catweazel wrote: Sat Apr 14, 2018 5:13 am Sleep and suspend are the same thing but I'm certain that hibernate is not.
Here is the real problem. The used terms do differ from language to language and also from OS to OS. Look at this table. Although it is German, it should be understandable also for people, who do not speak this language. In the left column you see the technical names (and only there the word "suspend" does appear - for all types of suspend). You see for example, that for OS X in German language (2nd column) the very same expressions gets used for all types. Even for Xubuntu the word "suspend" does not get used. (I cannot check myself with Ubuntu, as I have no system available.) You see also, that the word "sleep" (in German it would be "Schlaf") does nowhere exist in the table. So the question is, what does Mint mean with the expression "Schlaf"? In my German Mint the screensaver settings say "Schlafzustand" (sleep state). It does not say exclusively "suspend".

See it also from the logical site: If the setting to request the password after sleeping would only affect suspend, then the logical consequence would be, that after hibernation the status whether the password is requested or not would be undefined. There would be a leak in the settings. As far as I remember I got a password request after waking up from hibernation in the past. I do not use hibernation any more after I found, that Mint only in about 50 % of all cases resumed from hibernation properly; in nearly the half of the cases I had to reisub the machine to get it back working and no method, which I tried made it better. So hibernation means for my hardware the 50 % chance to loose data, consequently I do not use it. (Only as a side note.)
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Sleep vs Suspend

Post by catweazel »

Cosmo. wrote: Sat Apr 14, 2018 5:58 am
catweazel wrote: Sat Apr 14, 2018 5:13 am Sleep and suspend are the same thing but I'm certain that hibernate is not.
Here is the real problem. The used terms do differ from language to language and also from OS to OS. Look at this table. Although it is German, it should be understandable also for people, who do not speak this language.
The key difference is "suspend to disk", allowing the machine to completely power off. If anything, that table supports my view that hibernate is not the same as sleep or suspend, both of which suspend to RAM.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
User avatar
kc1di
Level 18
Level 18
Posts: 8146
Joined: Mon Sep 08, 2008 8:44 pm
Location: Maine USA

Re: Sleep vs Suspend

Post by kc1di »

He's talking about xscreensaver as far as I can gather
here is a quote from their wiki
POWER MANAGEMENT
Modern X servers contain support to power down the monitor after an idle period. If the monitor has powered down, then xscreensaver will notice this (after a few minutes), and will not waste CPU by drawing graphics demos on a black screen. An attempt will also be made to explicitly power the monitor back up as soon as user activity is detected.
The ~/.xscreensaver file controls the configuration of your display's power management settings: if you have used xset (1) to change your power management settings, then xscreensaver will override those changes with the values specified in ~/.xscreensaver (or with its built-in defaults, if there is no ~/.xscreensaver file yet.)

To change your power management settings, run xscreensaver-demo (1) and change the various timeouts through the user interface. Alternately, you can edit the ~/.xscreensaver file directly.

If the power management section is grayed out in the xscreensaver-demo (1) window, then that means that your X server does not support the XDPMS extension, and so control over the monitor's power state is not available.

If you're using a laptop, don't be surprised if changing the DPMS settings has no effect: many laptops have monitor power-saving behavior built in at a very low level that is invisible to Unix and X. On such systems, you can typically adjust the power-saving delays only by changing settings in the BIOS in some hardware-specific way.

If DPMS seems not to be working with XFree86, make sure the "DPMS" option is set in your /etc/X11/XF86Config file. See the XF86Config (5) manual for details.
As far as I know xscreen saver does not suspend the computer Like power manager does. it only blanks the screen and put the monitor to sleep. Computer is still running , but with some desktops it can be configured to limit the cpu and or gpu as well. But does not dump anything to ram.

This Ubuntu wiki may be of help in understanding suspend process. https://wiki.ubuntu.com/UnderstandingSuspend
This arch wiki is also very imformative https://wiki.archlinux.org/index.php/Po ... _hibernate
Easy tips : https://easylinuxtipsproject.blogspot.com/ Pjotr's Great Linux projects page.
Linux Mint Installation Guide: http://linuxmint-installation-guide.rea ... en/latest/
Registered Linux User #462608
Sir Charles

Re: Sleep vs Suspend

Post by Sir Charles »

Power management

Currently there are three methods of suspending available: suspend to RAM (usually called just suspend), suspend to disk (usually known as hibernate), and hybrid suspend (sometimes aptly called suspend to both):
  • Suspend to RAM method cuts power to most parts of the machine aside from the RAM, which is required to restore the machine's state. Because of the large power savings, it is advisable for laptops to automatically enter this mode when the computer is running on batteries and the lid is closed (or the user is inactive for some time).
  • Suspend to disk method saves the machine's state into swap space and completely powers off the machine. When the machine is powered on, the state is restored. Until then, there is zero power consumption.
  • Suspend to both method saves the machine's state into swap space, but does not power off the machine. Instead, it invokes usual suspend to RAM. Therefore, if the battery is not depleted, the system can resume from RAM. If the battery is depleted, the system can be resumed from disk, which is much slower than resuming from RAM, but the machine's state has not been lost.
    https://wiki.archlinux.org/index.php/Po ... _hibernate
chris_heath
Level 1
Level 1
Posts: 10
Joined: Thu Jan 11, 2018 10:17 pm

Re: Sleep vs Suspend

Post by chris_heath »

so good stuff so far everyone, but i was kind of hoping that my bringing up this 'tired' issue in this way might start a discussion about what to do about the way that these terms are presented sometimes in tool-tips when they really should be explicitly on screen making it clear up front that sleep and suspend are used interchangeably

also, was hoping someone might have some info on the hybrid sleep ... is that hibernation?
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Sleep vs Suspend

Post by Cosmo. »

Hybrid sleep is a combination of suspend and hibernate. The computer gets into suspend (= nothing written to disk), but in parallel the current state gets also written to disk an in hibernate mode. That means, that normally the computer will later get at resuming very quickly usable again (like in suspend mode). But in case, that the battery should get completely empty (in which case the suspend state would be unreconcilably get lost), at resume the computer reads and loads the state from disk, just as in hibernate state. The result is, that the computer awakens mostly as quick as in suspend, but you have additional the security of the hibernate state (provided, that hibernating works on the given hardware).
MintBean

Re: Sleep vs Suspend

Post by MintBean »

I agree with the OP in that the terms should be consistent. Personally I like 'sleep' and 'hibernate.' Both biological terms and it's clear which is 'deeper' or 'slower to wake.'
linuxovios
Level 3
Level 3
Posts: 132
Joined: Sun Jul 01, 2018 2:57 am

Re: Sleep vs Suspend

Post by linuxovios »

Session_001.jpg
Session_001.jpg (9.98 KiB) Viewed 13376 times
Is this suspend-to-RAM or suspend-to-DISK?

I have 16GB RAM and I have set 20GB swap in order to be able to suspend to disk (hibernate). If Linux mint doesn't use hibernate at all then I could set my swap to less space.
User avatar
all41
Level 19
Level 19
Posts: 9498
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Sleep vs Suspend

Post by all41 »

You would be better served by creating a new post on this subject as opposed to
reviving an old post--info there may or may not still be relevent.
Are you experiencing specific issues re suspend? in Linux means suspend to ram.
16GB RAM and I have set 20GB swap
With 16GB ram you will not need or utilize a designated a swap partition.

Many users here specifically/purposely do not designate a special swap partition nowdays. Linux will
use a swap file if and when needed, it's a big IF and with 16GB ram you will most likely
never need this crutch.
Cheers
Everything in life was difficult before it became easy.
linuxovios
Level 3
Level 3
Posts: 132
Joined: Sun Jul 01, 2018 2:57 am

Re: Sleep vs Suspend

Post by linuxovios »

I guess it will need some work to delete my swap partition and revert to a swap file. I will do it cleanly when I upgrade (fresh install) to Linux Mint 20.
Justin_Maxwell

Re: Sleep vs Suspend

Post by Justin_Maxwell »

So as far as I can garner from this thread and my understanding:

Suspend SHOULD be the term for:
"This computer won't be used for a fair while, so go into 'non-computing' power-saving mode (ideally per the user's power settings)"

Sleep SHOULD be the term for "Suspend to RAM and minimise power" [That's how I've always interpreted it]
Hibernate SOULD be the term for "Suspend to DISK and soft power-off"
Sleebernate SHOUD probably not be the term for "Suspend to RAM and DISK and minimise power. Soft power-off some defined time later if not woken meanwhile"

The reason why hybrid probably shouldn't be called sleebernate is it likely doesn't translate well to German. ;-)
Locked

Return to “Suggestions & Feedback”