View previous topic :: View next topic |
Author |
Message |
Pavel Cernohorsky n00b
Joined: 27 Apr 2022 Posts: 4
|
Posted: Wed Apr 27, 2022 3:53 pm Post subject: Laptop does not start on lid open after hibernate |
|
|
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 |
|
|
Ralphred Guru
Joined: 31 Dec 2013 Posts: 473
|
Posted: Wed Apr 27, 2022 6:28 pm Post subject: |
|
|
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 |
|
|
Pavel Cernohorsky n00b
Joined: 27 Apr 2022 Posts: 4
|
Posted: Wed Apr 27, 2022 7:12 pm Post subject: |
|
|
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 |
|
|
jburns Veteran
Joined: 18 Jan 2007 Posts: 1213 Location: Massachusetts USA
|
Posted: Wed Apr 27, 2022 7:48 pm Post subject: |
|
|
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 |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21518
|
Posted: Wed Apr 27, 2022 8:14 pm Post subject: |
|
|
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 |
|
|
Pavel Cernohorsky n00b
Joined: 27 Apr 2022 Posts: 4
|
Posted: Wed Apr 27, 2022 10:04 pm Post subject: |
|
|
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 |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21518
|
Posted: Thu Apr 28, 2022 1:01 am Post subject: |
|
|
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 |
|
|
Pavel Cernohorsky n00b
Joined: 27 Apr 2022 Posts: 4
|
Posted: Fri Apr 29, 2022 5:23 pm Post subject: |
|
|
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 |
|
|
|