You are not logged in.

#26 2021-10-22 00:53:03

rbh
Moderator
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 1,295

Re: Hibernation not working

Looks good. First scan of your model.

I'm running Debian 11 from a USB without a swap partition so I can't test hibernation.

But as I wrote erlier, you can test suspend to ram. So why not run "systemctl suspend" and check the logs if it does not work?
Especially check /var/log/pm-suspend.log and ~/.xsession-errors.
You can make an internet search for "debian troubleshoot suspend does not work" to get more tips.


// Regards rbh

Please read before requesting help: Guide to getting help,
Introduction to the Bunsenlabs Lithium Desktop and other help topics under "Help Resources" on the BunsenLabs menu

Offline

#27 2021-10-22 14:56:19

bic
Member
Registered: 2021-09-09
Posts: 13

Re: Hibernation not working

rbh wrote:

But as I wrote erlier, you can test suspend to ram. So why not run "systemctl suspend" and check the logs if it does not work?
Especially check /var/log/pm-suspend.log and ~/.xsession-errors.
You can make an internet search for "debian troubleshoot suspend does not work" to get more tips.

Suspending to RAM works on both Debian 11 and BL. It's just suspending to disk that does not work.

Last edited by bic (2021-10-22 14:56:41)

Offline

#28 2021-10-22 20:00:46

rbh
Moderator
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 1,295

Re: Hibernation not working

bic wrote:

Suspending to RAM works on both Debian 11 and BL. It's just suspending to disk that does not work.

Once again: Command "systemctl suspend" makes the computer sleep or "suspend to RAM". Read more at https://wiki.archlinux.org/title/Power_ … _hibernate

You wrote earlier about your BunsenLabs instalation: "Same thing happens with `systemctl suspend". If it now works in Debian 11 live session, is it quite possible you have some error in your system. You added RESUME... to /boot/grub/grub.cfg.  by adding it to /etc/default/grub and updating grub. Hopefully you removed it. Quit possible you made other error.

If suspend to ram works, suspend to disk should work to!
Why not test to reinstall and make sure you configure correct?


// Regards rbh

Please read before requesting help: Guide to getting help,
Introduction to the Bunsenlabs Lithium Desktop and other help topics under "Help Resources" on the BunsenLabs menu

Offline

#29 2021-10-22 20:43:45

bic
Member
Registered: 2021-09-09
Posts: 13

Re: Hibernation not working

unklar wrote:

For the previous boot (which is what you want):

journalctl -ab-1 | grep -i kill

For the current boot:

journalctl -ab | grep -i kill

For the second to last boot (and so on):

journalctl -ab-2 | grep -i kill

Tried this, but systemd reported that no persistent journal was found. So I ran `sudo mkdir /var/log/journal` as suggested here and somehow that fixed the hibernation issue. I didn't make any other changes.

Resolved.

Edit: never mind, it worked twice but now is back to the same behaviour, even with that new directory present. Very strange..

Last edited by bic (2021-10-22 21:02:21)

Offline

#30 2021-10-23 08:10:31

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 1,606

Re: Hibernation not working

^^   lol

The journal does not fix errors, it displays them.

About your problem: I remember very dark that for hibernate and suspend these packages are needed. Are they installed?

apt policy acpi-support-base acpi-support

Offline

#31 2021-10-24 00:40:27

bic
Member
Registered: 2021-09-09
Posts: 13

Re: Hibernation not working

unklar wrote:

^^   lol

The journal does not fix errors, it displays them.

That's why I was so surprised. Adding that folder did actually fix it for a few reboots. This was the first time it has worked. Maybe I just got very unlucky every other time smile

unklar wrote:

About your problem: I remember very dark that for hibernate and suspend these packages are needed. Are they installed?

apt policy acpi-support-base acpi-support

No, they weren't installed. After installing, the same issue occurs.

Offline

#32 2021-10-24 11:30:20

rbh
Moderator
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 1,295

Re: Hibernation not working

bic wrote:
unklar wrote:

The journal does not fix errors, it displays them.

That's why I was so surprised. Adding that folder did actually fix it for a few reboots. This was the first time it has worked. Maybe I just got very unlucky every other time smile

When it comes to linux, errors is very seldom caused by unluck. They are mostly caused by faulty programming, faulty configuration or faulty hardware.
You have two unrelated events that occured. The one did not cause the other.


bic wrote:
unklar wrote:

About your problem: I remember very dark that for hibernate and suspend these packages are needed. Are they installed?

apt policy acpi-support-base acpi-support

No, they weren't installed. After installing, the same issue occurs.

Package apt, is not needed for handling acpi-events like hibernate/suspend. It is essentiell for installing packages, should be installed when installing from install media. Without that package, you would not be able to install the other packages! So, it could not have been missing!

Maybe unklar intended to write "acpi"? I) don't have acpi, acpi-support-base and acpi-support installed in one VM. Command "systemctl hibernate", put it to sleep and when waking up, I could resume where i left. So, I don't think they are necessary for hibernate. That VM, has notbeen altered since installed. I like to keep a "reference bl box"...

Are you constantly on the move, wanting to hibernate the pc, until next time you connect to power, or do you have a static place you can use?

In the first place, you have somereading to do, as i recomended before. Both serach for debuging hibernate and your logs. i prefer also to disable boot splash screen.
(Edit /etc/default/grub. Find the line GRUB_CMDLINE_LINUX_DEFAULT=, delete splash and quiet.)
If you can use the pc in oneand the sameplace, use suspendto ram, while you try to find the causeof the misbehaving. Du you reale have enogh swap space? Try to enlarge it to 2xRAM or 2.5xRAM. If it becoms slowerdue to more swapping, decrease swappines:

Check first what your swappines is: "cat /proc/sys/vm/swappiness". Probably 60.
To lower it, Edit /etc/sysctl.conf.find the line vm.swappiness =. If it does not exist, add it last. Try lower to 40. Command "sudo sysctl -p", changes to the new walue, else you need to reboot.

If you dont want to put some effort to solve the problem, try to get a new used, working battery or pc.

Else I recommend you again to reinstall. At least when Beryllium (Debian 11) is launched. If you don't use windows, delete the partion.


// Regards rbh

Please read before requesting help: Guide to getting help,
Introduction to the Bunsenlabs Lithium Desktop and other help topics under "Help Resources" on the BunsenLabs menu

Offline

#33 2021-10-24 14:34:43

bic
Member
Registered: 2021-09-09
Posts: 13

Re: Hibernation not working

You have two unrelated events that occured. The one did not cause the other.

Even if they didn't cause each other, I wonder why they're correlated. It's strange that it worked twice after making that change but not before.

Are you constantly on the move, wanting to hibernate the pc, until next time you connect to power, or do you have a static place you can use?

I almost always move around when using this PC so hibernating to RAM isn't useful to me.


Package apt, is not needed for handling acpi-events like hibernate/suspend. It is essentiell for installing packages, should be installed when installing from install media. Without that package, you would not be able to install the other packages! So, it could not have been missing!

Maybe unklar intended to write "acpi"? I) don't have acpi, acpi-support-base and acpi-support installed in one VM. Command "systemctl hibernate", put it to sleep and when waking up, I could resume where i left. So, I don't think they are necessary for hibernate. That VM, has notbeen altered since installed. I like to keep a "reference bl box"...

I think the `apt policy` was just the command to check whether the other packages in the string are installed.

Both serach for debuging hibernate and your logs.

Well I already did all I know how to do before creating this thread.

Else I recommend you again to reinstall. At least when Beryllium (Debian 11) is launched. If you don't use windows, delete the partion.

Yeah, at this point I'm waiting for Beryllium to do a fresh install. I can't commit much more time to this so that compromise is OK for me. Thanks for the help so far. I'll update this thread with the results after I do a fresh install.

Offline

#34 2021-10-24 21:00:42

rbh
Moderator
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 1,295

Re: Hibernation not working

bic wrote:

Even if they didn't cause each other, I wonder why they're correlated. It's strange that it worked twice after making that change but not before.

The only correlation is that they appeared after each other. We humans tend to interpret meaning in meaningless events. Portent and omens had in older days important messages to mankind...

I almost always move around when using this PC so hibernating to RAM isn't useful to me.

No, you suspend to RAM and hibernate to disk or du both (hybrid)

I think the `apt policy` was just the command to check whether the other packages in the string are installed.

Ah, true.

Well I already did all I know how to do before creating this thread.

But you have been a little sparse with info of the content of your logs..

But, I noticed another laptop did not suspended anymore when closing the lid.
It had package uswsusp installed.
Command "systemctl hibernate", did nothing, no error.
Command "s2disk", gave error, something about no such device.
I checked /etc/uswsusp.conf. it contained "resume device = /dev/disk/by-uuid/f89e1b48-5a92-499e-8454-b3830a9393fe".

My swapfile today has other uuid.
After editing  /etc/uswsusp.conf, I also added "resume = UUID..." to /etc/default/grub. Then after runing "update-grub2" and "update-initramfs -u", s2disk and suspend to ram worked.

Worth to try.


// Regards rbh

Please read before requesting help: Guide to getting help,
Introduction to the Bunsenlabs Lithium Desktop and other help topics under "Help Resources" on the BunsenLabs menu

Offline

#35 2021-10-24 21:46:26

rbh
Moderator
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 1,295

Re: Hibernation not working

Saw now that  uswsusp, is only in oldstable (debian 10, buster)


// Regards rbh

Please read before requesting help: Guide to getting help,
Introduction to the Bunsenlabs Lithium Desktop and other help topics under "Help Resources" on the BunsenLabs menu

Offline

#36 2021-10-25 04:34:18

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,424
Website

Re: Hibernation not working

rbh wrote:

Du you reale have enogh swap space? Try to enlarge it to 2xRAM or 2.5xRAM. If it becoms slowerdue to more swapping, decrease swappines:
Check first what your swappines is: "cat /proc/sys/vm/swappiness". Probably 60.
To lower it, Edit /etc/sysctl.conf.find the line vm.swappiness =. If it does not exist, add it last. Try lower to 40. Command "sudo sysctl -p", changes to the new walue, else you need to reboot.

@rbh posted good advice, but I should mention that /etc/sysctl.conf may not be respected by modern systems using systemd, and swappiness itself might be becoming irrelevant?
https://github.com/systemd/systemd/issues/9276
https://www.howtogeek.com/449691/what-i … change-it/


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#37 2021-10-25 10:30:39

rbh
Moderator
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 1,295

Re: Hibernation not working

Some updates...

Adding variable RESUME= to grub.cfg, is oldstyle. Not necessary on system with systemd.
If you add swap or recreate it after installation, you have to update /boot/initrd.img-* with command "update-initramfs -u".
If you have only one swap partion, you do not need to edit /etc/initramfs-tools/conf.d/resume. Updating initramfs, will search for swap and add location to initrd, and tell you which swap it found.
It is only if you want to override the default, yo have to edit /etc/initramfs-tools/conf.d/resume.

@bic, if it is very awkward that you can't hibernate, why not reinstall now? It does not take som much time, most of the installation goes without interaction...
Or install to an external HD. It is quite handy to have.


// Regards rbh

Please read before requesting help: Guide to getting help,
Introduction to the Bunsenlabs Lithium Desktop and other help topics under "Help Resources" on the BunsenLabs menu

Offline

#38 2021-10-25 16:26:36

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 1,496

Re: Hibernation not working

bic wrote:

I used to have Windows XP on this machine, and hibernation worked fine on that. It's set up for dual-boot now, but I don't use Windows anymore.

Dual boot with XP? Does hibernation still work in XP?

@bic - when you boot normally (not after hibernating) do you see any messages along the lines of "no resume device specified", or "no swap found"?

You posted this:

# swap was on /dev/sda6 during installation
UUID=9d5aabc3-4ac0-4169-8b5e-7e7799a29c67 none            swap    sw              0       0

so you're using that UUID in grub to specify the resume device? Try changing that UUID to /dev/sda6. My Arch install would not recognize the UUID designation in grub for resume; I had to specify the partition.

Last edited by PackRat (2021-10-25 16:35:16)


You must unlearn what you have learned.
    -- yoda

Offline

Board footer

Powered by FluxBB