Discussion:
why does hibernate stop working and I have to manually change grub with each upgrade?
(too old to reply)
Runner
2020-10-10 00:27:02 UTC
Permalink
I like to have the ability to hibernate. I remember having to manually
reconfigure grub starting with 14.04 to get things going, but with each
upgrade, I've had to modify grub once again. I just had to modify 18.04
today after I discovered that hibernate no longer worked even though in
the menu. Is this simply overlooked or most people don't want hibernate
by default so they don't enable it?
Bit Twister
2020-10-10 01:25:29 UTC
Permalink
Post by Runner
I like to have the ability to hibernate. I remember having to manually
reconfigure grub starting with 14.04 to get things going, but with each
upgrade, I've had to modify grub once again. I just had to modify 18.04
today after I discovered that hibernate no longer worked even though in
the menu.
Why not surprise us and tell us exactly what you are changing.
Post by Runner
Is this simply overlooked or most people don't want hibernate
by default so they don't enable it?
Hmm, quick google search seems to show past problems mostly with
window/linux installs.

Are you dual booting doze and linux?
Runner
2020-10-10 04:06:27 UTC
Permalink
Post by Bit Twister
Post by Runner
I like to have the ability to hibernate. I remember having to manually
reconfigure grub starting with 14.04 to get things going, but with each
upgrade, I've had to modify grub once again. I just had to modify 18.04
today after I discovered that hibernate no longer worked even though in
the menu.
Why not surprise us and tell us exactly what you are changing.
https://superuser.com/questions/1383173/how-to-fix-hibernate-on-lubuntu-18-04

The first answer here but changing the UUID recommended there as an
option.
Post by Bit Twister
Post by Runner
Is this simply overlooked or most people don't want hibernate
by default so they don't enable it?
Hmm, quick google search seems to show past problems mostly with
window/linux installs.
Are you dual booting doze and linux?
Yes, dual boot, but I've always ended up having to modify grub or
something similar after an upgrade. It's ok, just wondered why? Maybe
something to do with dual boot then.
Bobbie Sellers
2020-10-10 04:34:19 UTC
Permalink
Post by Runner
Post by Bit Twister
I like to have the ability to hibernate.  I remember having to manually
reconfigure grub starting with 14.04 to get things going, but with each
upgrade, I've had to modify grub once again.  I just had to modify 18.04
today after I discovered that hibernate no longer worked even though in
the menu.
Why not surprise us and tell us exactly what you are changing.
https://superuser.com/questions/1383173/how-to-fix-hibernate-on-lubuntu-18-04
The first answer here but changing the UUID recommended there as an option.
Post by Bit Twister
Is this simply overlooked or most people don't want hibernate
by default so they don't enable it?
Hmm, quick google search seems to show past problems mostly with
window/linux installs.
Are you dual booting doze and linux?
Yes, dual boot, but I've always ended up having to modify grub or
something similar after an upgrade.  It's ok, just wondered why?  Maybe
something to do with dual boot then.
Windows updates will screw up your Grub as they include kernels
and the Windows boot loader must be rewritten. You can turn off updates
to Windows in several ways but you should investigate that separately,
via web search. The simplest was is to boot into Windows and use the
update section then never connect the Windows side to the net again.

bliss
--
bliss dash SF 4 ever at dslextreme dot com
Paul
2020-10-10 05:11:35 UTC
Permalink
Post by Bobbie Sellers
Post by Runner
Post by Bit Twister
Post by Runner
I like to have the ability to hibernate. I remember having to manually
reconfigure grub starting with 14.04 to get things going, but with each
upgrade, I've had to modify grub once again. I just had to modify 18.04
today after I discovered that hibernate no longer worked even though in
the menu.
Why not surprise us and tell us exactly what you are changing.
https://superuser.com/questions/1383173/how-to-fix-hibernate-on-lubuntu-18-04
The first answer here but changing the UUID recommended there as an option.
Post by Bit Twister
Post by Runner
Is this simply overlooked or most people don't want hibernate
by default so they don't enable it?
Hmm, quick google search seems to show past problems mostly with
window/linux installs.
Are you dual booting doze and linux?
Yes, dual boot, but I've always ended up having to modify grub or
something similar after an upgrade. It's ok, just wondered why?
Maybe something to do with dual boot then.
Windows updates will screw up your Grub as they include kernels
and the Windows boot loader must be rewritten. You can turn off updates
to Windows in several ways but you should investigate that separately,
via web search. The simplest was is to boot into Windows and use the
update section then never connect the Windows side to the net again.
bliss
This is *not* true.

The most dangerous time for Windows 10, is every six months
when the OS is upgraded. Approx 500MB of space is carved off
the side of C: and becomes System Reserved. A copy of WinPE.wim
is put there for emergency boot (500MB partition, 350MB file).
That's in case C: is corrupted. On a GPT disk, this bumps the
sda numbers, so if the Linux to the right of Windows used to
be sda5, now it will be sda6. This makes no different to
modern Linux (which uses UUIDs). Only someone who uses
partition numbers in fstab, gets tipped over.

Windows is careful now, to only update the ESP Windows folder,
so if the folder exists, there should be (almost) no side
effects. It doesn't clear out EFI/ and have a party for itself.
It writes to EFI/Windows.

If Windows is being installed for the first time, and is installed
after Linux is installed, I can't promise anything in that case.
The OS will definitely want to assert something, and it can't
very well leave boot loading to chance, so it has to piss off
someone. It cannot limit itself to just writing a few pretty
things in the EFI/Windows area. I would expect there'd be a good
chance in that case, of needing to boot repair on the Linux side,
and have OSProber add the reference to the Windows boot load menu.

You've seen pictures from gnome-disks, of my 3TB drive with
five or six Linux partitions, two Windows partitions. And that
hasn't stopped booting.

Dual booting is a "learn by breaking" exercise. Dealing
with Windows is no different than dealing with MOKutil
when you don't want to.

Paul
Bit Twister
2020-10-10 04:57:48 UTC
Permalink
Post by Runner
Post by Bit Twister
Post by Runner
I like to have the ability to hibernate. I remember having to manually
reconfigure grub starting with 14.04 to get things going, but with each
upgrade, I've had to modify grub once again. I just had to modify 18.04
today after I discovered that hibernate no longer worked even though in
the menu.
Why not surprise us and tell us exactly what you are changing.
https://superuser.com/questions/1383173/how-to-fix-hibernate-on-lubuntu-18-04
The first answer here but changing the UUID recommended there as an
option.
That does not tell me "exactly what you are changing"

I have no idea if you are just changing UUID or adding resume=whatever

I would like to know _exactly_ what you changed then what you did
after making the change.
Runner
2020-10-10 15:07:57 UTC
Permalink
Post by Bit Twister
Post by Runner
Post by Bit Twister
Post by Runner
I like to have the ability to hibernate. I remember having to manually
reconfigure grub starting with 14.04 to get things going, but with each
upgrade, I've had to modify grub once again. I just had to modify 18.04
today after I discovered that hibernate no longer worked even though in
the menu.
Why not surprise us and tell us exactly what you are changing.
https://superuser.com/questions/1383173/how-to-fix-hibernate-on-lubuntu-18-04
The first answer here but changing the UUID recommended there as an
option.
That does not tell me "exactly what you are changing"
I have no idea if you are just changing UUID or adding resume=whatever
I would like to know _exactly_ what you changed then what you did
after making the change.
1) Opened grub sudo nano /etc/default/grub.
2) In a separate terminal, used ls -l /dev/disk/by-uuid to determine
uuid of swap partition
3) In nano, changed grub line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/disk/by-uuid/X"
with X being replaced by swap partition uuid
4) Saved modified grub and exited.
5) sudo update-grub
6) sudo update-initramfs -u
7) Tested hibernate by opening a video and pausing it, then clicking the
little spoked wheel at upper right of screen and choosing "hibernate" to
shut down.
8) Rebooted to find video still present at paused point so hibernate
working again.
Bit Twister
2020-10-10 16:14:39 UTC
Permalink
Read last 4 lines of this reply, I'll wait . . . . . . . . . . . . . . .
Post by Runner
1) Opened grub sudo nano /etc/default/grub.
2) In a separate terminal, used ls -l /dev/disk/by-uuid to determine
uuid of swap partition
FYI: You might want to look into using lsblk. Lots of options that
you could use in an alias. Try this in a wide terminal

lsblk -o NAME,TYPE,FSTYPE,MOUNTPOINT,LABEL,PARTLABEL,UUID,PTUUID

Run "lsblk --help" for other options.
Post by Runner
3) In nano, changed grub line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/disk/by-uuid/X"
with X being replaced by swap partition uuid
Ok, for whatever reason you Distribution is not setting resume argument.
I have seen a distribution replacing GRUB_CMDLINE_LINUX_DEFAULT and
wiping out user modifications.

If you were to look through scripts in /etc/grub.d/ you might notice
that GRUB_CMDLINE_LINUX is in front of GRUB_CMDLINE_LINUX_DEFAULT.

As a result you can put whatever you like to add into that variable
and it will be added to the boot line. For example:

$ grep GRUB_CMDLINE_LINUX /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT=noiswmd
GRUB_CMDLINE_LINUX="ipv6.disable=1 audit=0 splash=off plymouth.enable=0
noresume mitigations=off vblank_mode=0 "


Fun fact, anytime you do an install, swap will probably get formatted.
as a result swap's UUID has a new value and Label is erased.
Same thing happens when any partition is formatted.

If you wanted to negate that kind of problem you can use the partition
uuid or PARTLABEL in those situations.

For example
$ grep swap /etc/fstab
PARTLABEL=swap swap swap defaults,nofail 0 0

I do not use resume, but I suggest that you can add
GRUB_CMDLINE_LINUX="resume=PARTLABEL=swap"
to /etc/default/grub
and remove resume=whatever from GRUB_CMDLINE_LINUX_DEFAULT

That assumes you have set a partition label for swap.

I find it handy to use gparted for setting media label and partition names.
Post by Runner
4) Saved modified grub and exited.
5) sudo update-grub
Good, anytime /etc/default/grub is changed that has to be done.

--
The warranty and liability expired as you read this message.
If the above breaks your system, it's yours and you keep both pieces.
Practice safe computing. Backup the file before you change it.
Do a, man command_here or cat command_here, before using it.
Runner
2020-10-10 17:25:11 UTC
Permalink
Post by Bit Twister
Read last 4 lines of this reply, I'll wait . . . . . . . . . . . . . . .
I did and I know how manipulating grub can be. That's why I always make
a recent back up before even doing something as simple as was done here.
Post by Bit Twister
FYI: You might want to look into using lsblk. Lots of options that
you could use in an alias. Try this in a wide terminal
lsblk -o NAME,TYPE,FSTYPE,MOUNTPOINT,LABEL,PARTLABEL,UUID,PTUUID
Interesting, just tried it. Wouldn't go at first as PTUUID reported as
"unknown column", but once that was removed, showed plenty of info.
Post by Bit Twister
Ok, for whatever reason you Distribution is not setting resume argument.
I have seen a distribution replacing GRUB_CMDLINE_LINUX_DEFAULT and
wiping out user modifications.
Hmmm, now I'm thinking that I might have replaced grub during the
upgrade. IIRC, there was a question during the process as to whether I
wanted the new grub or keep the existing one.
Post by Bit Twister
If you were to look through scripts in /etc/grub.d/ you might notice
that GRUB_CMDLINE_LINUX is in front of GRUB_CMDLINE_LINUX_DEFAULT.
As a result you can put whatever you like to add into that variable
$ grep GRUB_CMDLINE_LINUX /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT=noiswmd
GRUB_CMDLINE_LINUX="ipv6.disable=1 audit=0 splash=off plymouth.enable=0
noresume mitigations=off vblank_mode=0 "
Fun fact, anytime you do an install, swap will probably get formatted.
as a result swap's UUID has a new value and Label is erased.
Same thing happens when any partition is formatted.
Especially since I think I also installed the new grub!
Post by Bit Twister
If you wanted to negate that kind of problem you can use the partition
uuid or PARTLABEL in those situations.
For example
$ grep swap /etc/fstab
PARTLABEL=swap swap swap defaults,nofail 0 0
I do not use resume, but I suggest that you can add
GRUB_CMDLINE_LINUX="resume=PARTLABEL=swap"
to /etc/default/grub
and remove resume=whatever from GRUB_CMDLINE_LINUX_DEFAULT
That assumes you have set a partition label for swap.
I find it handy to use gparted for setting media label and partition names.
Post by Runner
4) Saved modified grub and exited.
5) sudo update-grub
Good, anytime /etc/default/grub is changed that has to be done.
Thanks for the info. Knowing that I'll be upgrading again at some
future time, I'm sure I'll be referring back to prior posts with any
issues that might pop up.
Andrei Z.
2020-10-10 16:24:41 UTC
Permalink
I like to have the ability to hibernate.  I remember having to manually
reconfigure grub starting with 14.04 to get things going, but with each
upgrade, I've had to modify grub once again.  I just had to modify 18.04
today after I discovered that hibernate no longer worked even though in
the menu.  Is this simply overlooked or most people don't want hibernate
by default so they don't enable it?
man initramfs.conf

VARIABLES FOR LOCAL BOOT
RESUME
Specifies the device used for suspend-to-disk (hibernation), which the
initramfs code should attempt to resume from. If this is not defined or
is set to auto, mkinitramfs will automatically select the largest
available swap partition. Set it to none to disable resume from disk.

If /etc/initramfs-tools/conf.d/resume exists, check its content.

After creating/modifying this file
sudo update-initramfs -u
Anssi Saari
2020-10-12 10:41:02 UTC
Permalink
Post by Runner
I like to have the ability to hibernate. I remember having to
manually reconfigure grub starting with 14.04 to get things going, but
with each upgrade, I've had to modify grub once again.
Just curious, is this each Ubuntu version update? On my Kubuntu laptop I
do seem to have a resume= setting in /etc/default/grub but I don't
remember editing that file by hand. I also have a file
/etc/initramfs-tools/conf.d/resume with the same resume parameter as in
/etc/default/grub.

This laptop's been running Kubuntu since 15.10 at least, since then I've
upgraded to 16.04 LTS and 18.04 LTS.
Andrei Z.
2020-10-12 12:33:03 UTC
Permalink
Post by Anssi Saari
Post by Runner
I like to have the ability to hibernate. I remember having to
manually reconfigure grub starting with 14.04 to get things going, but
with each upgrade, I've had to modify grub once again.
Just curious, is this each Ubuntu version update? On my Kubuntu laptop I
do seem to have a resume= setting in /etc/default/grub but I don't
remember editing that file by hand. I also have a file
/etc/initramfs-tools/conf.d/resume with the same resume parameter as in
/etc/default/grub.
This laptop's been running Kubuntu since 15.10 at least, since then I've
upgraded to 16.04 LTS and 18.04 LTS.
Mint 20 (based on Ubuntu 20.04). By default

/usr/share/grub/default/grub --> /etc/default/grub
no 'resume='

/etc/initramfs-tools/conf.d
is empty.

I happened to see on Mint 19 /etc/initramfs-tools/conf.d/resume
with RESUME=UUID=...
and no partition with this UUID (some installation error).

I do not use Hibernation. To avoid the swap partition check during boot
/etc/initramfs-tools/conf.d/resume was created with RESUME=none
Runner
2020-10-12 20:04:07 UTC
Permalink
Post by Anssi Saari
Post by Runner
I like to have the ability to hibernate. I remember having to
manually reconfigure grub starting with 14.04 to get things going, but
with each upgrade, I've had to modify grub once again.
Just curious, is this each Ubuntu version update?
I have to reconfigure grub after an upgrade, not with each update.
However, as I pointed out to Bit Twister, I think I may also be opting
to replace grub at the time and not keep the original. I bet if I kept
the original, I wouldn't be left with having to reconfig hibernate.
Brad Endarchy
2020-10-12 19:15:10 UTC
Permalink
I like to have the ability to hibernate.  I remember having to manually
reconfigure grub starting with 14.04 to get things going, but with each
upgrade, I've had to modify grub once again.  I just had to modify 18.04
today after I discovered that hibernate no longer worked even though in
the menu.  Is this simply overlooked or most people don't want hibernate
by default so they don't enable it?
I have to think that fewer people use hibernate versus suspend (or even
really know/tell the difference). Considering few people are going long
periods of time without shutting down or being on power, I think the
overall utility of it isn't as appealing as focusing suspend.

In my personal experience, regardless of OS (Ubuntu, Mac, Win),
hibernate and I have never been friends. Always ends up being more of a
pain in my ass personally. Whereas suspend/sleep has worked flawless in
every OS.
Runner
2020-10-12 20:05:18 UTC
Permalink
Post by Brad Endarchy
I like to have the ability to hibernate.  I remember having to manually
reconfigure grub starting with 14.04 to get things going, but with each
upgrade, I've had to modify grub once again.  I just had to modify 18.04
today after I discovered that hibernate no longer worked even though in
the menu.  Is this simply overlooked or most people don't want hibernate
by default so they don't enable it?
I have to think that fewer people use hibernate versus suspend (or even
really know/tell the difference). Considering few people are going long
periods of time without shutting down or being on power, I think the
overall utility of it isn't as appealing as focusing suspend.
In my personal experience, regardless of OS (Ubuntu, Mac, Win),
hibernate and I have never been friends. Always ends up being more of a
pain in my ass personally. Whereas suspend/sleep has worked flawless in
every OS.
Once I configure hibernate, I have never had an issue in Ubuntu. Not
that I use it that often, but when I do it works fine.

Continue reading on narkive:
Loading...