Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Laptop does not start on lid open after hibernate
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
Pavel Cernohorsky
n00b
n00b


Joined: 27 Apr 2022
Posts: 4

PostPosted: Wed Apr 27, 2022 3:53 pm    Post subject: Laptop does not start on lid open after hibernate Reply with quote

I have elogind configuration which should put laptop into hibernation when the lid is closed. I would like it to also wake up afterwards when the lid is opened again.

The actual behaviour is that when the laptop is closed, it correctly goes to hibernation, however, when the lid is opened again, nothing happens. Only after pressing the power button the laptop starts again and properly resumes from the stored state. I have a suspicion that the problem is kernel related, because even if I bypass elogind and do directly:
Code:
echo disk > /sys/power/state

I get the same result - system goes to hibernation, but closing and opening the lid afterwards does not start the power.

The /proc/acpi/wakeup says that LID is enabled for S4.

Any configuration I am missing? Any hints what to check?
Back to top
View user's profile Send private message
Ralphred
Guru
Guru


Joined: 31 Dec 2013
Posts: 473

PostPosted: Wed Apr 27, 2022 6:28 pm    Post subject: Reply with quote

Mines the same, but I think it's to do with hibernate instead of sleep. Hibernate is powered off, so unless you can make it turn on via lid open in the bios, you're stuck pressing the button.
Back to top
View user's profile Send private message
Pavel Cernohorsky
n00b
n00b


Joined: 27 Apr 2022
Posts: 4

PostPosted: Wed Apr 27, 2022 7:12 pm    Post subject: Reply with quote

Ralphred wrote:
unless you can make it turn on via lid open in the bios, you're stuck pressing the button

I so wish I could agree with you... then I would just be able to let it be :)
However, this worked absolutely flawlessly with my old laptop (same brand actually, both Fujitsu, but the old one was now > 10 years old, really needed a replacement...). When lid was opened after poweroff, it stayed off, when after hibernation, it turned on. No special settings in BIOS. Just worked...
Back to top
View user's profile Send private message
jburns
Veteran
Veteran


Joined: 18 Jan 2007
Posts: 1213
Location: Massachusetts USA

PostPosted: Wed Apr 27, 2022 7:48 pm    Post subject: Reply with quote

There are versions of the kernel that have this problem with some laptops. Check if the kernel you are using has been masked.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21518

PostPosted: Wed Apr 27, 2022 8:14 pm    Post subject: Reply with quote

As I understood it, the mask was because the power button ceased to be responsive. OP's issue is that the power button works fine, but OP wants to have the laptop awaken on lid open. Powering up on lid open is definitely a BIOS behavior, because the system kernel is not running at that time. It might be possible that the system kernel can hint to the BIOS to do this.
Back to top
View user's profile Send private message
Pavel Cernohorsky
n00b
n00b


Joined: 27 Apr 2022
Posts: 4

PostPosted: Wed Apr 27, 2022 10:04 pm    Post subject: Reply with quote

Hu wrote:
It might be possible that the system kernel can hint to the BIOS to do this.

Oh it surely is possible. On my old laptop, I tried it just now...

Code:

~ # cat /proc/acpi/wakeup
Device   S-state     Status   Sysfs node
...
LID     S4   *enabled   platform:PNP0C0D:00

~ # echo LID > /proc/acpi/wakeup

~ # cat /proc/acpi/wakeup
Device   S-state     Status   Sysfs node
...
LID     S4   *disabled  platform:PNP0C0D:00


As you can see in the printout - normally the wakeup on lid is enabled - when I hibernate in that state, opening the lid turns the laptop on. You can toggle this behaviour (echo command) and in that case the lid opening after hibernation won't do anything (have just tried that).

So yes, kernel is somehow telling BIOS to turn the computer on for specific events when hibernating. My new laptop where this does not seem to be working any more (although *enabled state is there, nothing happens) is UEFI based, my old laptop is BIOS based. Am I missing some magical UEFI related kernel parameter? Module? Or whatnot? I had to re-configure kernel from scratch (the old laptop was very different from the new one). So maybe I am now missing something?

Does anybody know how this actually works? I mean, yes, it does work on my old laptop I am just writing from... So kernel there has to write something somewhere before hibernating to make this work... but which part of the kernel and what where?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21518

PostPosted: Thu Apr 28, 2022 1:01 am    Post subject: Reply with quote

Since this requires BIOS/UEFI assistance, the success on your old laptop does not mean that it is possible for your new laptop to do this. It may be the case that the firmware on the new laptop cannot be told to do this, no matter what you do from Linux.

I cannot address your other questions.
Back to top
View user's profile Send private message
Pavel Cernohorsky
n00b
n00b


Joined: 27 Apr 2022
Posts: 4

PostPosted: Fri Apr 29, 2022 5:23 pm    Post subject: Reply with quote

Ok, I still do not understand what precisely is happening (and I am still interested if anybody knows exact explanation of the mechanisms involved), but I was able to make things work.

While searching for hints about the problem, I found a question on one Ubuntu forum, called "Ubuntu can not wake up from sleep when I enabled UEFI fast boot". The question is unanswered, but it "solves" my problem now - I just disabled UEFI fast boot (do not mistake with Windows fast boot!) and the lid started to wake the laptop up as expected.

As mentioned before, if anybody knows how is the settings transferred from /proc/acpi/wakeup into ??? UEFI ???, I am still interested :)
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