How to reboot while laptop lid is closed?

8 respuestas [Último envío]
lutes
Desconectado/a
se unió: 09/04/2020

I have been using a laptop with external display and input, so with its lid closed for weeks at a time. I have noticed that any attempt to reboot fails: I can hear the hard power-off and I need to open the lid to boot again. This is happening on Trisquel 9 but I am not sure I ever found myself in such a setting before.

This is not a huge extra effort to put in for the time being but I was wondering whether it was an inherent requirement of rebooting or if it was somehow related to the way power management is passed over between userspace and underlying layers, and hence possibly configurable.

I might not always be able to access the hardware physically while having to reboot. Leaving the lid open would do the trick but I have low expectations about remembering to do that. Last time I left for a while with that laptop I forgot to take the battery along.

lutes
Desconectado/a
se unió: 09/04/2020

Starting with "acpi=off" did the trick.

davidpgil
Desconectado/a
se unió: 08/26/2015

There is a setting in the Trisquel GUI to control this.

lutes
Desconectado/a
se unió: 09/04/2020

Thanks, there is indeed a setting in the power manager for what the system is supposed to do when the lid is closed.

In my usage case, the lid is already closed and the system is running. I can send it to reboot but it never reboots because of the way acpi behaves when it finds the lid closed after power-on.

That's why turning acpi off in GRUB did the trick.

davidpgil
Desconectado/a
se unió: 08/26/2015

Interesting. I use a closed lid laptop as my main computer and I reboot all the time and never have issues as longas I fixed the power settings in the GUI. Well, i'm glad you found a workaround for your situation.

lutes
Desconectado/a
se unió: 09/04/2020

> I use a closed lid laptop as my main computer and I reboot all the time and never have issues

Lucky you :)

> as longas I fixed the power settings in the GUI

The fact that (most probably) identical power settings are not associated with the same behavior is not surprising given that reboot is managed by acpi at some point before the OS itself is rebooted. Are you using a librebooted laptop maybe? I am getting curious now. Maybe you are referring to other settings, maybe it's behaving different depending on whether the battery is plugged or not - in my case it is not. My guess is still that we have different hardware with different acpi configurations.

> you found a workaround for your situation.

Workaround is probably the correct term. That workaround implies that I need to open the lid and press the power button in order to shut down (since GRUB sent acpi to collect daisies and magic mushrooms in the sleepy forest), so I only use it when I need to reboot remotely.

davidpgil
Desconectado/a
se unió: 08/26/2015

The fact that (most probably) identical power settings are not associated with the same behavior is not surprising given that reboot is managed by acpi at some point before the OS itself is rebooted. Are you using a librebooted laptop maybe? I am getting curious now. Maybe you are referring to other settings, maybe it's behaving different depending on whether the battery is plugged or not - in my case it is not. My guess is still that we have different hardware with different acpi configurations.

> I use the stock firmware. my laptop is a thinkpad w541. i use it with battery removed, but i used to leave the bettery in and had the same result.

lutes
Desconectado/a
se unió: 09/04/2020

Thanks for the follow-up.

I found this:

"For anybody that is interested, there is a magnet at the very edge of the palm rest at the bottom of the track pad, that when closed, sets off a sensor on the left side of the camera on the W541 series laptop. That is how the lid knows when it is closed. Put the magnet back in, issue resolved." [1]

So my laptop lid has a hard switch which interferes with acpi while yours seems to have a "soft" switch which can be used while the OS is running but lets acpi do its job.

[1] https://forums.lenovo.com/t5/ThinkPad-P-and-W-Series-Mobile/W541-Lid-Close-Doesn-t-Turn-Off-Display-or-sleep/td-p/3650225

davidpgil
Desconectado/a
se unió: 08/26/2015

nice sleuthing. thanks for doing the heavy lifting on this topic. i only had my experience with my laptop to share.