Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Latest kernels cause hibernate to run twice [SOLVED]
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
nokilli
Apprentice
Apprentice


Joined: 25 Feb 2004
Posts: 196

PostPosted: Sun Aug 03, 2014 12:27 pm    Post subject: Latest kernels cause hibernate to run twice [SOLVED] Reply with quote

I had hibernation working perfectly and for the longest time. I'm using pm-utils and I had it hooked into my /etc/acpi/default.sh script, in response to the power button being pressed.

Then I upgrade to hardened-3.14.5-r2 and what happens is that hibernate works as before, but when I go to resume it works just like before except it then immediately wants to hibernate again.

Fortunately there is an option to hit backspace to abort the hibernation, and doing this returns me to my system and everything works marvellously from that point going forward.

Recently upgraded to hardened-3.15.5-r2 hoping for new behavior but no such luck, same problem as before.

Double checked my kernel config, no changes to acpi or anything else I could conceivably see being a potential cause for this. No apparent recent changes to the pm-util scripts that I can see either.

Since I can abort the 2nd hibernation this obviously isn't as critical as some of the other issues I see here. But it is odd in that I am usually able to solve my Gentoo problems with a trip to DuckDuckGo or some such... after an hour or two of searching I find no reference to any similar behaviour.

I also seem to recall that getting hibernation to work was one of the more challenging problems I've faced on GNU/Linux, so I'm hoping for something easy, ok? Please don't tell me I have to go systemd or some such.

Thanks for reading.


Last edited by nokilli on Mon Oct 20, 2014 10:39 pm; edited 1 time in total
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Thu Aug 07, 2014 4:38 pm    Post subject: Reply with quote

Well kernel upgrades usually need newer user space utils which need to work together.

I also have a faulty 3.15.x Kernel here on my hardware which worked quite well a few weeks ago.

Well I suggest you downgrade to the latest stable kernel version which works for you, thats the easiest and fastest way.

on this box i use 3.12.x version because it has long time support and its the last version which supports my 3 year old hardware. The kernel developers decided to drop support on newer version and I am not willing to write a module for my hardware. The devs there believ that my hardware is not in use anymore and I am not willing to deal with that time consuming fix only to have a working newer kernel.

I checked the kernel.org website and there are some longtime support kernels and one of those are 3.12. When you do not need a newer version I highly recommend to stay at one of those stable releases. I myself will stay on 3.12.x as long as possible.

I may not helped you directly but I gave you a workaround for your issue. (to stay at a stable kernel.org kernel release)
Back to top
View user's profile Send private message
nokilli
Apprentice
Apprentice


Joined: 25 Feb 2004
Posts: 196

PostPosted: Mon Aug 11, 2014 12:18 am    Post subject: Reply with quote

As the issue is non-critical I think I will stay with the present kernel for now. You do however make a very good point with respect to staying with what works, and I think I will consider this well before moving past the next version with long time support.

Hardened sources perhaps complicates this somewhat, but we'll see.

Thanks for the good reply.
Back to top
View user's profile Send private message
nokilli
Apprentice
Apprentice


Joined: 25 Feb 2004
Posts: 196

PostPosted: Mon Oct 20, 2014 10:52 pm    Post subject: Reply with quote

I think I've figured this out, and so for the benefit of others...

Somewhere around kernel 3.14 they started reporting power button up events as well as power button down. You can distinguish between the two (at least on my system) by looking at the full array of variables presented to your acpi/default.sh script.

This is what you get when the power button is pushed:
Code:
button/power PBTN 00000080 00000000


And this is what you get when the power button is released:
Code:
button/power LNXPWRBN:00 00000080 00000001


My script never bothered looking at these other fields, hence, it wants to suspend-to-disk immediately after resuming because it sees a button/power event.

So the solution is to test the device field, and the relevant section in acpi/default.sh now should look something like this:
Code:
case "$group" in
        button)
                case "$action" in
                        power)
                                case "$device" in
                                        PBTN)   
                                                pm-hibernate
                                                ;;
                                esac
                                ;;


I do this and everything is back to working perfectly.
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