I am seeing the same effect for some time that
Code: Select all
loginctl hibernateCode: Select all
echo disk > /sys/power/stateRunning as root as no effect either, I have no NVIDIA card.
Any idea where else to look for hints?
Code: Select all
loginctl hibernateCode: Select all
echo disk > /sys/power/stateDowngrade is not possible, I assume it used to be 246.10-r3, but I actually cannot tell if it was a kernel upgrade or elogind. So I would love to check what is going on, but cannot find a log message.Hu wrote:V-Li, all the other posts in this thread seem specific to the proprietary nVidia drivers. Since you are not using an nVidia card, I suspect you have a different problem. Shall I move your post to a new thread?
Regardless, it could be useful to know the last known good and first known bad logind versions for you. Since it does work for you using echo disk (which did not work for dabler), I think your problem is in logind, whereas the other affected users had a kernel-level problem.

Code: Select all
loginctl hibernate
When resuming, Linux kernel loads but then gets replaced by the copy in the hibernate image. That's why it needs to be pointed to the resume partition/file. How do you do that? For quite a long time CONFIG_PM_STD_PARTITION didn't work for me and I had to pass it on the kernel command line. I'm pretty sure it didn't work for a lot of the 5.x kernels. In fact I still have it in CONFIG_CMDLINE as well but I remember once I booted a kernel that didn't have it that resumed normally which prompted me that issue was resolved, at least for me.iromeister wrote:But my system does not resume, but instead does a clean boot.

I do pass it on the command line, which used to work until the upgrade to kernel 6.12.16. As I wrote above, I didn't change anything regarding the kernel config. Grub command line for 6.12.16 still has the same resume parameter as for kernel 6.6.74.logrusx wrote:That's why it needs to be pointed to the resume partition/file. How do you do that? For quite a long time CONFIG_PM_STD_PARTITION didn't work for me and I had to pass it on the kernel command line.

Code: Select all
Apr 20 17:05:53 [sudo] pam_unix(sudo:session): session closed for user root
Code: Select all
Apr 20 17:05:53 [sudo] pam_unix(sudo:session): session closed for user root
Apr 20 17:05:53 [e-hibernate] Failed to build JSON object: Invalid argument
Apr 20 17:05:53 [e-hibernate] e-hibernate: shutdown_or_sleep failed: Invalid argument
Code: Select all
echo disk > /sys/power/state

Code: Select all
CONFIG_HIBERNATION_COMP_LZ4=y
CONFIG_HIBERNATION_DEF_COMP="lz4"That option is controlled by other options, you can't control it directly.iromeister wrote:Today I made a cup of coffee and scrolled through the kernel config diff between linux-6.6.67-gentoo and linux-6.12.16-gentoo, and I found new options in kernel 6.12 that might be responsible for resume not working anymore.
The one that stands out is CONFIG_ACPI_MADT_WAKEUP which is set to yes and was not present in kernel 6.6.
That doesn't really matter.iromeister wrote:
There are also new options for compressing the hibernation image:Code: Select all
CONFIG_HIBERNATION_COMP_LZ4=y CONFIG_HIBERNATION_DEF_COMP="lz4"
No you haven't. In the kernel commit log there are explicit entries addressing the problem. It was a regression.iromeister wrote:The differences between said kernel configs are manifold, so I hope I found the needle in the haystack. Didn't have time to test it yet.


I had the same problem, the error happens in function write_efi_hibernate_location, which in my case isn't actually needed (I use UEFI boot, but resume is done through Grub2). So I disabled it with a custom patch (/etc/portage/patches/sys-auth/elogind/fix-hibernation.patch) and hibernation in GUI works again.Kruppe wrote:Code: Select all
Apr 20 17:05:53 [sudo] pam_unix(sudo:session): session closed for user root Apr 20 17:05:53 [e-hibernate] Failed to build JSON object: Invalid argument Apr 20 17:05:53 [e-hibernate] e-hibernate: shutdown_or_sleep failed: Invalid argument
Code: Select all
diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
index e68547c..011b07f 100644
--- a/src/sleep/sleep.c
+++ b/src/sleep/sleep.c
@@ -202,6 +202,8 @@ static int write_efi_hibernate_location(const HibernationDevice *hibernation_dev
struct utsname uts = {};
int r, log_level_ignore = required ? LOG_WARNING : LOG_DEBUG;
+ return 0;
+
assert(hibernation_device);
if (!is_efi_boot())