Solved *** Linux Mint 21 hibernate

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
nekrub2
Level 3
Level 3
Posts: 176
Joined: Wed Nov 17, 2021 4:56 pm
Location: Zurich - Switzerland

Solved *** Linux Mint 21 hibernate

Post by nekrub2 »

Under LM 20.3 Cinnamon I added a launcher on desktop doing

pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY pm-hibernate

It prompted my password and wrote everything to the swap partition and afterwards shut down.

Unter LM 21 the password prompt is there, but afterwards it just shut down. Clicking on the start button it starts into the login window and all the open applications are closed.

Is there anything I have to modify for LM 21?
Last edited by LockBot on Thu Feb 09, 2023 11:00 pm, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
harry_fine
Level 2
Level 2
Posts: 57
Joined: Sat Aug 17, 2019 2:38 pm

Re: Linux Mint 21 hibernate

Post by harry_fine »

I was glancing at some of the new entries in dconf editor this morning to see what was new. I recall under one of the headings, probably under cinnamon or perhaps under muffin, that you could choose between shut down and hibernate.

Also some other things there that are helpful such as whether or not to open new windows full screen.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Linux Mint 21 hibernate

Post by Cosmo. »

How big is your swap?
nekrub2
Level 3
Level 3
Posts: 176
Joined: Wed Nov 17, 2021 4:56 pm
Location: Zurich - Switzerland

Re: Linux Mint 21 hibernate

Post by nekrub2 »

13 GB. Definitely enough as I have only 4GB RAM.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Linux Mint 21 hibernate

Post by Cosmo. »

Is this a swap file or a swap partition?

Are the packages hibernate and uswsusp installed? Otherwise do it.
nekrub2
Level 3
Level 3
Posts: 176
Joined: Wed Nov 17, 2021 4:56 pm
Location: Zurich - Switzerland

Re: Linux Mint 21 hibernate

Post by nekrub2 »

it is a swap partition. Cannot find hibernate and uswsusp in the software manager. Where can I find them?
Thanks a lot
nekrub2
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Linux Mint 21 hibernate

Post by Cosmo. »

I just did a check and you are right, both packages do no longer exist in the repositories.

I have here only a LM 21 test system, but I will in the next months not upgrade to it. So I did not deal with such questions and this will hardly happen in this year. Following that I must retreat here.
nekrub2
Level 3
Level 3
Posts: 176
Joined: Wed Nov 17, 2021 4:56 pm
Location: Zurich - Switzerland

Re: Linux Mint 21 hibernate

Post by nekrub2 »

Thanks anyway. Maybe I was a bit fast in upgrading and had to pay the price for it now.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Linux Mint 21 hibernate

Post by Cosmo. »

By using Timeshift you can revert.
User avatar
Qapla
Level 2
Level 2
Posts: 73
Joined: Tue Sep 14, 2021 5:35 pm
Location: San Francisco, 6,437 meters SouthEast of the future home of Starfleet Academy

Re: Linux Mint 21 hibernate

Post by Qapla »

Nekrub2, I can not speak to your use of pm-hibernate, but I can confirm the "[GUIDE] How to hibernate to a swap file in Linux Mint 19.x" posted by gm10 as viewtopic.php?f=42&t=284100 currently works in Mint 21. It requires use of a swap FILE, not swap partition, but that should not be significant. You initiate hibernation either though the Mint menu (power off), or by

Code: Select all

systemctl hibernate
for which you can easily create a launcher.
Qapla' - Success! (Klingon salutation on departure to battle)
billk
Level 1
Level 1
Posts: 8
Joined: Wed Aug 17, 2022 9:44 pm

Re: Linux Mint 21 hibernate

Post by billk »

Works great for me as well using Linux Mint 21.
nekrub2
Level 3
Level 3
Posts: 176
Joined: Wed Nov 17, 2021 4:56 pm
Location: Zurich - Switzerland

Re: Linux Mint 21 hibernate

Post by nekrub2 »

systemctrl hibernate says it failed because of rights and meanwhile a password window pops up. After the password entry the machine shuts down but I do not see it writing into the swap file. After starting the machine it comes to the login screen and on the desktop all apps are closed like a normal shutdown but on like hibernate. In this way I could do a normal shut down.
User avatar
Qapla
Level 2
Level 2
Posts: 73
Joined: Tue Sep 14, 2021 5:35 pm
Location: San Francisco, 6,437 meters SouthEast of the future home of Starfleet Academy

Re: Linux Mint 21 hibernate

Post by Qapla »

nekrub2 wrote: Thu Aug 18, 2022 9:25 pm systemctrl hibernate says it failed
If so, then you did not build the structure AS DESCRIBED IN THE REFERENCED THREAD. Did you delete your swap partition and create only a swap file? Did you run the "can hibernate" test and get a "yes" answer? I can not debug the process for you because I did not write it. I can only report my experience. I suggest you report your issues in the referenced thread. Maybe the author can help you.
Qapla' - Success! (Klingon salutation on departure to battle)
nekrub2
Level 3
Level 3
Posts: 176
Joined: Wed Nov 17, 2021 4:56 pm
Location: Zurich - Switzerland

Re: Linux Mint 21 hibernate

Post by nekrub2 »

I did not delete the swap partition as I still think an own partition for swap is better than a swap file. Furthermore I do not want to fiddle around in the grub script as I have a dual boot with Windows and have more than once to do a grub repair.
So for me the subject is closed and I will mark it as solved.
Locked

Return to “Software & Applications”