Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Hibernate does not work after update
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
V-Li
Retired Dev
Retired Dev


Joined: 03 Jan 2006
Posts: 617

PostPosted: Wed Mar 05, 2025 10:44 pm    Post subject: Hibernate does not work after update Reply with quote

[Administrator note: this post, and the first 2 responses, were originally attached to the topic Hibernate does not work after update. However, that topic dealt with nVidia drivers preventing hibernate, and this appears to deal with logind not issuing a valid hibernate command to the system. -Hu]

I am seeing the same effect for some time that
Code:
loginctl hibernate
just locks the screen. As root the command
Code:
echo disk > /sys/power/state
works fine however. Nothing recorded on dmesg apart from "[ 123.116971] elogind-daemon[2727]: The system will hibernate now!". It used to work fine.

Running as root as no effect either, I have no NVIDIA card.

Any idea where else to look for hints?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23175

PostPosted: Thu Mar 06, 2025 2:44 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
V-Li
Retired Dev
Retired Dev


Joined: 03 Jan 2006
Posts: 617

PostPosted: Thu Mar 06, 2025 8:36 pm    Post subject: Reply with quote

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.


Downgrade 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.

A separate thread is fine by me.
Back to top
View user's profile Send private message
wjb
l33t
l33t


Joined: 10 Jul 2005
Posts: 647
Location: Fife, Scotland

PostPosted: Sat Mar 08, 2025 1:14 am    Post subject: Reply with quote

I have what looks like the same problem on a laptop with intel graphics. It was ok when I was away with it in late December, but hibernate did not work on a recent trip. The fail mode is that the screen goes black as if hibernate is doing something, then the lock screen appears almost immediately[/list].

Looking at history with "genlop -s", during the December trip (hibernate working) the laptop had:
  • sys-auth/elogind-252.9-r2
  • sys-kernel/gentoo-sources-6.6.62
  • sys-libs/pam-1.6.1


And this last trip (hibernate not working):
  • sys-auth/elogind-255.5-r2
  • sys-kernel/gentoo-sources-6.6.74
  • sys-libs/pam-1.6.1


I just tried reverting to sys-auth/elogind-252.9-r2 and hibernate now works from the KDE logout menu.
Back to top
View user's profile Send private message
V-Li
Retired Dev
Retired Dev


Joined: 03 Jan 2006
Posts: 617

PostPosted: Sun Mar 09, 2025 3:06 pm    Post subject: Reply with quote

I assume the following issue https://github.com/elogind/elogind/issues/298 might be related to this. I will try to compile with the referenced patch and let's see.
Back to top
View user's profile Send private message
V-Li
Retired Dev
Retired Dev


Joined: 03 Jan 2006
Posts: 617

PostPosted: Sun Mar 09, 2025 5:38 pm    Post subject: Reply with quote

I can confirm that applying said patch (https://github.com/enometh/elogind/commit/70abdb61ea5e9792bd6a6c621c4ab30a2a0bfb28.patch) does not help at all.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2821

PostPosted: Sun Mar 09, 2025 6:06 pm    Post subject: Reply with quote

V-Li you've provided so much information that it almost looks like you want to solve it on your own :)

Best Regards,
Georgi
Back to top
View user's profile Send private message
iromeister
n00b
n00b


Joined: 04 Feb 2017
Posts: 34
Location: Berlin

PostPosted: Mon Mar 10, 2025 10:55 am    Post subject: Reply with quote

For me
Code:
loginctl hibernate
also stopped working after upgrading the kernel to linux-6.12.16-gentoo. When I switched back to kernel linux-6.6.74-gentoo it does work again, so the kernel upgrade is at least involved in the problem, if not the sole cause.
Edit: Someone reported a bug in elogind concerning Suspend to RAM which might be related.
Back to top
View user's profile Send private message
iromeister
n00b
n00b


Joined: 04 Feb 2017
Posts: 34
Location: Berlin

PostPosted: Mon Mar 10, 2025 2:51 pm    Post subject: Reply with quote

It gets more complicated: now I downgraded pam to 1.6.1 and elogind to 252.9-r2. With those in place, loginctl hibernate seems to work with kernel 6.12.16 running - at least the screen goes blank after the usual amount of time. But my system does not resume, but instead does a clean boot. Using kernel 6.6.74 everything works as expected.
When upgrading the kernel I didn't change any of the old kernel options, only added the new ones.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2821

PostPosted: Mon Mar 10, 2025 4:24 pm    Post subject: Reply with quote

iromeister wrote:
But my system does not resume, but instead does a clean boot.


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.

I haven't tested if hibernation still works with 6.12.17 which I'm currently using, but I remember it worked with 6.13.

Best Regards,
Georgi
Back to top
View user's profile Send private message
iromeister
n00b
n00b


Joined: 04 Feb 2017
Posts: 34
Location: Berlin

PostPosted: Mon Mar 10, 2025 4:35 pm    Post subject: Reply with quote

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.


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.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2821

PostPosted: Mon Mar 10, 2025 5:43 pm    Post subject: Reply with quote

I tried with my kernel and hibernation worked. It's one version above yours - 6.12.17 but I suggest trying 6.13 as well, just in case it's something that's known and fixed there. In my case it was S3 sleep that was broken for nearly 2 years. Somebody on the forums reported it worked on 6.13 and later I found the fix was present in 6.12.17 as well. I wanted to be on the long term kernel so I switched to it.

Best Regards,
Georgi
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum