mate-desktop / mate-power-manager

Power management tool for the MATE desktop
https://mate-desktop.org
GNU General Public License v2.0
59 stars 51 forks source link

mate-power-preferences: 'Hibernate' (aka "suspend to disk") [feature request] #389

Open davidhedlund opened 1 year ago

davidhedlund commented 1 year ago

Here is a table summarizing the key differences between Hibernate and Suspend:

Feature Hibernate Suspend
Saves state to Hard drive RAM
Powers down Completely Most components
Resume time Slow Fast
Reliable Yes No
Power consumption None Low

Expected behaviour

Two issues:

It is possible to hibernate from the command line:

gsettings range org.mate.power-manager button-power lists 'hibernate'

$ gsettings range org.mate.power-manager button-power
enum
'blank'
'suspend'
'shutdown'
'hibernate'
'interactive'
'nothing'

Actual behaviour

"Hibernate" is missing

Steps to reproduce the behaviour

In the "General" tab:

The "When the power button is pressed" drop-down list has these items:

image

The "When the suspend button is pressed" drop-down list has these items:

image

MATE general version

1.26.0

Package version

ProblemType: Bug
DistroRelease: Ubuntu 23.04
Package: mate-power-manager 1.26.0-2
ProcVersionSignature: Ubuntu 6.2.0-27.28-generic 6.2.15
Uname: Linux 6.2.0-27-generic x86_64
ApportVersion: 2.26.1-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: MATE
Date: Thu Aug 17 08:58:59 2023
InstallationDate: Installed on 2023-07-23 (24 days ago)
InstallationMedia: Ubuntu-MATE 23.04 "Lunar Lobster" - Release amd64 (20230415)
SourcePackage: mate-power-manager
UpgradeStatus: No upgrade log present (probably fresh install)

Linux Distribution

Ubuntu MATE 23.04

Link to bugreport of your Distribution (requirement)

https://bugs.launchpad.net/ubuntu/+source/mate-power-manager/+bug/2031662

raveit65 commented 1 year ago

I am sure you speaking about an indicator-applet which is ubuntu/debian specific. Vanilla Mate doesn't ship this applet. We have only the shut-down entry in menu or a simple shut-down launcher which doesn't have a drop-down menu.

Not sure about ubuntu but in fedora suspend-to-disk is disabled by default nowadays, and you need to install a swap disk and add a resume=<swap-disk-uid> to kernel boot entry. After this supend-to-disk is in shutdown dialog. (In German: suspend-to-disk=Ruhezustand) Bildschirmfoto zu 2023-08-17 16-15-07

Here is a fedora ToDo: https://linuxconfig.org/how-to-restore-hibernation-on-fedora-35 I am guessing ubuntu is same modern as fedora and suspend-to-disk is disabled as default too ;)

Edit: the resume modul needs to be added to initramfs (see Todo). Chances are good that this Todo also works for ubuntu or search for a ubuntu ToDo.

davidhedlund commented 1 year ago

I am sure you speaking about an indicator-applet which is ubuntu/debian specific. Vanilla Mate doesn't ship this applet. We have only the shut-down entry in menu or a simple shut-down launcher which doesn't have a drop-down menu.

No, I meant mate-power-preferences image

Sorry that I forgot to add this, I update the top post now.

Not sure about ubuntu but in fedora suspend-to-disk is disabled by default nowadays, and you need to install a swap disk and add a resume=<swap-disk-uid> to kernel boot entry. After this supend-to-disk is in shutdown dialog. (In German: suspend-to-disk=Ruhezustand) Bildschirmfoto zu 2023-08-17 16-15-07

Here is a fedora ToDo: https://linuxconfig.org/how-to-restore-hibernation-on-fedora-35 I am guessing ubuntu is same modern as fedora and suspend-to-disk is disabled as default too ;)

Edit: the resume modul needs to be added to initramfs (see Todo). Chances are good that this Todo also works for ubuntu or search for a ubuntu ToDo.

Thank you for taking your time to write the specific instructions (I might distribute them somewhere)!

raveit65 commented 1 year ago

In my mate-power-preferences, tab general, suspend-to disk (Ruhezustand) is there in drop-down-menus. mate-power-preferences

So, suspend-to-disk is disabled as default in general ubuntu, same like in fedora.

davidhedlund commented 1 year ago

In my mate-power-preferences, tab general, suspend-to disk (Ruhezustand) is there in drop-down-menus. mate-power-preferences

So, suspend-to-disk is disabled as default in general ubuntu, same like in fedora.

I already explained in text that there's no "Hibernate" option (see the title of this issue). I added screenshots to make it more clear (LaunchPad does not allow screenshot mixed with text, which is why I wrote it in text-only.

raveit65 commented 1 year ago

I already explained in text that there's no "Hibernate" option (see the title of this issue). I added screenshots to make it more clear (LaunchPad does not allow screenshot mixed with text, which is why I wrote it in text-only.

???? Do you want to say that my post is obsolete? Or do you know-it-all? ... but maybe it's only a babylon-issue.

raveit65 commented 1 year ago

Any way, it's a local issue user don't know to enable suspend-to-disk in ubuntu, closing.

davidhedlund commented 1 year ago

I already explained in text that there's no "Hibernate" option (see the title of this issue). I added screenshots to make it more clear (LaunchPad does not allow screenshot mixed with text, which is why I wrote it in text-only.

???? Do you want to say that my post is obsolete? Or do you know-it-all? ... but maybe it's only a babylon-issue.

Please.

davidhedlund commented 1 year ago

Any way, it's a local issue user don't know to enable suspend-to-disk in ubuntu, closing.

2 hours of work in the waste-basket.

davidhedlund commented 1 year ago

I added feature request to the title. Can you please re-open it?

davidhedlund commented 1 year ago

image

raveit65 commented 1 year ago

You didn't understand that ubuntu disable suspend-to-disk as default. It's not a Mate issue! You need to enable it for yourself, i gave you a Todo. Follow ToDo and you will see missing entries. Anyway, i will re-open issue to make you feel better. sigh,...another death issue. Edit: My mum told me spend my spare time for fake-issues...unsubscribed.

davidhedlund commented 1 year ago

You didn't understand that ubuntu disable suspend-to-disk as default. It's not a Mate issue! You need to enable it for yourself, i gave you a Todo. Follow ToDo and you will see missing entries. Anyway, i will re-open issue to make you feel better. sigh,...another death issue.

@raveit65 Don't be silly, I don't think you give me an honest chance to finish this. You mentioned, resume=<swap-disk-uid>. I don't get any hit for cat /etc/default/grub | grep resume in Ubuntu MATE 22.04 (default installation). Yet I can hibernate it with sudo pm-hibernate, and sudo systemctl hibernate.

davidhedlund commented 1 year ago

@raveit65 Thank you very much for re-opening the issue for me.

raveit65 commented 1 year ago

Please don't call me again, i am tired of you, please respect my privacy, thank you.