Hibernation on mint 20

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
siawacsh
Level 3
Level 3
Posts: 189
Joined: Fri Sep 06, 2013 9:32 am
Location: Ireland

Hibernation on mint 20

Post by siawacsh »

Hello, I have recently upgraded from 18.3 to 20 in conjunction with SSD upgrade. Since switching to solid state about three years ago I have been following pajor's tutorials on modifying FSTAB and disabling hibernation. I have managed to do the former but his tutorial on disabling hibernation does not seem to work on mint 20.

My question is whether there is still a need to disable hibernation. Was I correct in editing the fstab to this

[qote]

# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda5 during installation
UUID=9507f9ad-c8cc-4d54-a8d4-6b5774f2bbcb / ext4 noatime,errors=remount-ro 0 1
# /home was on /dev/sda6 during installation
UUID=cb8df8ce-d857-4557-a6d7-0e76615fef1f /home ext4 noatime,errors=remount-ro 0 2
# swap was on /dev/sda1 during installation
UUID=ee54c646-e618-4ecc-b61c-2a9a7df74474 none swap sw

[/quote]
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
bt101
Level 3
Level 3
Posts: 115
Joined: Thu Feb 14, 2013 12:30 am

Re: Hibernation on mint 20

Post by bt101 »

I should ask for more information.

Why do you want to disable hibernation?
If disabling it is not working, does that mean that it is working?
If so, you should buy a lottery ticket ;-), because it usually requires jumping through a lot of hoops just to get it working.

I've only used Mint 19 and did manage to get hibernation working, but perhaps there is something about Mint 20 where it is desirable to disable it?

As for your fstab, just make sure that the UUIDs in your fstab match the UUIDs of the actual partitions from the output of the blkid command.
If they do, then the fstab should be good.
That being said, you should not need to fiddle with the fstab to disable hibernation.
siawacsh
Level 3
Level 3
Posts: 189
Joined: Fri Sep 06, 2013 9:32 am
Location: Ireland

Re: Hibernation on mint 20

Post by siawacsh »

bt101
Level 3
Level 3
Posts: 115
Joined: Thu Feb 14, 2013 12:30 am

Re: Hibernation on mint 20

Post by bt101 »

siawacsh wrote: Thu Aug 20, 2020 9:35 pm Here is some relevant reading

viewtopic.php?t=281196

https://easylinuxtipsproject.blogspot.c ... html#ID1.4
Forgive me for not reading the whole thing, but the term hibernate doesn't even appear in either of the articles.
User avatar
SMG
Level 25
Level 25
Posts: 31914
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Hibernation on mint 20

Post by SMG »

siawacsh wrote: Wed Aug 19, 2020 3:59 pmMy question is whether there is still a need to disable hibernation.
I thought hibernation was disabled by default and when I checked these LM20 tips for optimizing SSD that is what it says.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
bt101
Level 3
Level 3
Posts: 115
Joined: Thu Feb 14, 2013 12:30 am

Re: Hibernation on mint 20

Post by bt101 »

SMG wrote: Thu Aug 20, 2020 11:01 pm
siawacsh wrote: Wed Aug 19, 2020 3:59 pmMy question is whether there is still a need to disable hibernation.
I thought hibernation was disabled by default and when I checked these LM20 tips for optimizing SSD that is what it says.
Ah, now it is clearer that OP is interested in SSD wear,

Ok the fstab mods with noatime look good.

If mint20 is the same as mint19, you can disable hibernate by erasing the resume parameter (or deleting the whole line if that is the only parameter) this line in /etc/default/grub:

Code: Select all

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=putYourSwapUUIDhere"
Then rebuild grub:

Code: Select all

sudo update-grub
it's a miracle you had it working in the first place (you must be lucky).

The whole disabling hibernate to reduce wear is news to me. Perhaps others can comment, but hibernation is so infrequent compared to the thrashing that is done to the disk when running, I'm surprised it can be a concern. I find the hibernation to be useful and have run a super cheap SSD for a few years now with no problem - maybe those are famous last words and I'm on the brink of disaster ;-)
siawacsh
Level 3
Level 3
Posts: 189
Joined: Fri Sep 06, 2013 9:32 am
Location: Ireland

Re: Hibernation on mint 20

Post by siawacsh »

SMG wrote: Thu Aug 20, 2020 11:01 pm
siawacsh wrote: Wed Aug 19, 2020 3:59 pmMy question is whether there is still a need to disable hibernation.
I thought hibernation was disabled by default and when I checked these LM20 tips for optimizing SSD that is what it says.
You may be correct and I am confusing it with suspension. It is when the system logs me out after 10 mins of inactivity and I have to log back in to get access. Is suspend harmless swap free?
User avatar
SMG
Level 25
Level 25
Posts: 31914
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Hibernation on mint 20

Post by SMG »

siawacsh wrote: Sat Aug 22, 2020 8:48 pm You may be correct and I am confusing it with suspension. It is when the system logs me out after 10 mins of inactivity and I have to log back in to get access. Is suspend harmless swap free?
The setting under Power Options determines when you computer is suspended due to inactivity. The general principal for suspension is everything gets saved to RAM. Hibernation saves to disk, but LM has that turned off by default.

I do not let my laptop suspend and LM20 does not even recommend making a swap partition (due to changes in how it operates), so I haven't looked into the specifics of how or even if it is affecting my SSD. It may even depend on the technology used on your disk as to whether these changes would be helpful. You would have to get advice from others about that.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
siawacsh
Level 3
Level 3
Posts: 189
Joined: Fri Sep 06, 2013 9:32 am
Location: Ireland

Re: Hibernation on mint 20

Post by siawacsh »

SMG, can you post a link where the developers suggest against creating a swap partition. BTW I have already set power options to never suspend. It still does though after ten mins.

Thanks
SS
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Hibernation on mint 20

Post by smurphos »

siawacsh wrote: Sun Aug 23, 2020 9:47 pm SMG, can you post a link where the developers suggest against creating a swap partition. BTW I have already set power options to never suspend. It still does though after ten mins.
Check your screensaver settings - it sounds like your machine is locking after inactivity (not suspending) which is a function of the screensaver.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
User avatar
SMG
Level 25
Level 25
Posts: 31914
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Hibernation on mint 20

Post by SMG »

siawacsh wrote: Sun Aug 23, 2020 9:47 pmSMG, can you post a link where the developers suggest against creating a swap partition.
I have not seen any recommendations against creating one; I commented that it is not required to have one.

A swap partition is needed if you hibernate your computer. Hibernation is now disabled by default, so that reason for swap no longer exists.

The default installation of LM20 does not create a swap partition. The answer to this Ubuntu question gives more information,Is it necessary to have a /home and /swap partitions in 20.04. A part of the answer includes, "Since 18.04, a separate swap partition in most Desktops has been superseded by a swap file within the root partition."

You have not provided any information about your hardware or install other than it is LM20. It is possible that if you have low RAM and/or high memory requirements for your software/desktop that you may benefit from swap. These two articles, All You Need To Know About Swap Partition In Linux and How Much Swap Should You Use in Linux? explain swap partitions and swap files. You are free to create a swap partition, but whether your computer benefits from it will depend on your particular set-up and usage.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
siawacsh
Level 3
Level 3
Posts: 189
Joined: Fri Sep 06, 2013 9:32 am
Location: Ireland

Re: Hibernation on mint 20

Post by siawacsh »

That was useful reading SMG, thanks!

Regarding my hardware:
6 gig of ram.

My new SSD is 1TB.
I already installed LM20 with a swap partition double the size of my memory (12 gigs). On reading the new recommendations I am now wondering whether to remove or reduce my swap file. I have found this tutorial to remove but not for reducing it to a smaller partition.
If for any reason you want to deactivate and remove the swap file, follow these steps:
First, deactivate the swap by typing: sudo swapoff -v /swapfile.
Remove the swap file entry /swapfile swap swap defaults 0 0 from the /etc/fstab file.
Finally, delete the actual swapfile file using the rm command: sudo rm /swapfile.
In relation to chrome I could not find "Preload pages for faster browsing and searching: disable it."...My version of chrome is 84.0.4147.135 (Official Build) (64-bit)

Thanks in advance

Siawacsh
User avatar
SMG
Level 25
Level 25
Posts: 31914
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Hibernation on mint 20

Post by SMG »

siawacsh wrote: Tue Aug 25, 2020 2:27 pmRegarding my hardware:
6 gig of ram.

My new SSD is 1TB.
I already installed LM20 with a swap partition double the size of my memory (12 gigs). On reading the new recommendations I am now wondering whether to remove or reduce my swap file. I have found this tutorial to remove but not for reducing it to a smaller partition.
If for any reason you want to deactivate and remove the swap file, follow these steps:
First, deactivate the swap by typing: sudo swapoff -v /swapfile.
Remove the swap file entry /swapfile swap swap defaults 0 0 from the /etc/fstab file.
Finally, delete the actual swapfile file using the rm command: sudo rm /swapfile.
A swap partition and a swap file are two different things. They accomplish a similar purpose, but are have slightly different functionality with regards to how the operating system utilizes them.

It's fine to leave what you have. I haven't really played with swap partitions or files, so others would be able to give better advice if you decide you want to change what you have. If you do a lot of graphics, gaming, or anything that has high memory requirements, it may be better for you to have the swap partition, especially if your computer goes to sleep. (Were you able to stop that from happening with smurphos's tip?)
siawacsh wrote: Tue Aug 25, 2020 2:27 pm In relation to chrome I could not find "Preload pages for faster browsing and searching: disable it."...My version of chrome is 84.0.4147.135 (Official Build) (64-bit)
I don't use chrome, so I can't provide any help with this.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
siawacsh
Level 3
Level 3
Posts: 189
Joined: Fri Sep 06, 2013 9:32 am
Location: Ireland

Re: Hibernation on mint 20

Post by siawacsh »

So can no one tell me how to turn off suspension. As mentioned, I have already set power management to never suspend. But it still does after ten mins.

I also am experiencing printer driver problems which happens each time I upgrade. It is a Samsung ML-1675 which gets detected. But only prints the usual generic messsage from firmware but nothing else. It is a I will create another thread for that.

Siawacsh
User avatar
SMG
Level 25
Level 25
Posts: 31914
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Hibernation on mint 20

Post by SMG »

siawacsh wrote: Wed Aug 26, 2020 4:35 pm So can no one tell me how to turn off suspension. As mentioned, I have already set power management to never suspend. But it still does after ten mins.
Did you try changing your screensaver setting as smurphos suggested?
smurphos wrote: Mon Aug 24, 2020 12:50 amCheck your screensaver settings - it sounds like your machine is locking after inactivity (not suspending) which is a function of the screensaver.
For the "Delay before starting the screensaver" I have mine set to "Never".
Image
A woman typing on a laptop with LM20.3 Cinnamon.
siawacsh
Level 3
Level 3
Posts: 189
Joined: Fri Sep 06, 2013 9:32 am
Location: Ireland

Re: Hibernation on mint 20

Post by siawacsh »

I missed that one. My apologies and much thanks! It was screen saver issue.

Siawacsh
Locked

Return to “Software & Applications”