Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
davidhedlund opened this issue Aug 17, 2023 · 14 comments

Comments

@davidhedlund
Copy link

davidhedlund commented Aug 17, 2023

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:

  • "Hibernate" could be listed in mate-power-preferences for the options in the General tab:
    image

  • gsettings set org.mate.power-manager button-power "'hibernate'" should be fixed: In Ubuntu MATE 22.04 'hibernate' only activates the lock-screen, it should hibernate. I have not tried in Ubuntu MATE 23.04 since I didn't have time to install it separately on a hard disk.

It is possible to hibernate from the command line:

  • sudo pm-hibernate
  • sudo systemctl hibernate

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:

  • "Ask me"
  • "Suspend"
  • "Shutdown"
  • "Do nothing"

image

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

  • "Suspend"
  • "Do nothing"

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
Copy link
Member

raveit65 commented Aug 17, 2023

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 davidhedlund changed the title 'Hibernate' is missing mate-power-preferences: 'Hibernate' is missing Aug 17, 2023
@davidhedlund
Copy link
Author

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
Copy link
Member

raveit65 commented Aug 17, 2023

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
Copy link
Author

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
Copy link
Member

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
Copy link
Member

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

@davidhedlund davidhedlund changed the title mate-power-preferences: 'Hibernate' is missing mate-power-preferences: 'Hibernate' (aka "suspend to disk") is missing Aug 17, 2023
@davidhedlund
Copy link
Author

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
Copy link
Author

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 davidhedlund changed the title mate-power-preferences: 'Hibernate' (aka "suspend to disk") is missing mate-power-preferences: 'Hibernate' (aka "suspend to disk") [feature request] Aug 17, 2023
@davidhedlund
Copy link
Author

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

@davidhedlund
Copy link
Author

davidhedlund commented Aug 17, 2023

image

@raveit65
Copy link
Member

raveit65 commented Aug 17, 2023

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.

@raveit65 raveit65 reopened this Aug 17, 2023
@davidhedlund
Copy link
Author

davidhedlund commented Aug 17, 2023

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
Copy link
Author

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

@raveit65
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants