You are not logged in.
^
Same result as before. Though by removing "quiet" from the parameters, I could see that the last message before the hard shutdown was something about disabling console. This was before the phase with the [ Ok ] messages. Not sure if that's helpful at all. Is there a way to preserve this output between reboots?
You can use the journal of systemd.
If this is configured correctly for the user, then you can run the commands as the user. If not, you must use root.
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
Offline
okay, to recap:
You haven't removed any necessary packages, pm-utils power manager etc . .
And you tried adding resume=UUID=9d5aabc3-4ac0-4169-8b5e-7e7799a29c67 to grub and then update-grub.
And the swap # is correct for resume and fstab . . .
Nice puzzle.. .
I am using `systemctl hibernate`.
Do you need/use sudo when calling systemctl hibernate?
Offline
okay, to recap:
You haven't removed any necessary packages, pm-utils power manager etc . .
And you tried adding resume=UUID=9d5aabc3-4ac0-4169-8b5e-7e7799a29c67 to grub and then update-grub.
And the swap # is correct for resume and fstab . . .Nice puzzle.. .
I am using `systemctl hibernate`.
Do you need/use sudo when calling systemctl hibernate?
Yeah, that's exactly what I did. I also tried adding the initramfs above.
No, it works without sudo.
Offline
This machine is an old laptop with no battery, so suspending to RAM isn't useful to me.
I often suspend to ram my very old laptop with no battery, only 500MB ram, if I leave it alone for some hour...
It's an old machine that I'm still trying to get some use out of. It's enough for basic operations (except for web browsing)
Install midori or dillo... Not suitable for all web-pages though.
but yes, maybe I should recycle this thing soon.
Recycle when the it is worn out...
I guess I wasn't clear. The output from my machine is the same:
Ok, now when we know that, why do you not run hw-probe? Easiest to run it, is to upgrade to bullseye (Debian 11) and run "sudo apt install hw-probe". Read more at https://linux-hardware.org/?view=howto.
// 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
Install midori or dillo... Not suitable for all web-pages though.
I do use dillo when I can, but not many pages these days work without javascript
Ok, now when we know that, why do you not run hw-probe? Easiest to run it, is to upgrade to bullseye (Debian 11) and run "sudo apt install hw-probe". Read more at https://linux-hardware.org/?view=howto.
http://linux-hardware.org/?probe=42b7007a7e
I'm running Debian 11 from a USB without a swap partition so I can't test hibernation.
Last edited by bic (2021-10-21 21:07:44)
Offline
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
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
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
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
^^
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
^^
![]()
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
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
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
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.
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
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
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
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
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), now on Bluesky, there's also some GitStuff )
Offline
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
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