Shutdown results in reboot

jbo@

Developer
I just got my hands on a fresh Lenovo ThinkPad X1 Carbon Gen 9. I installed FreeBSD 13.0-RELEASE on it. When I execute poweroff, the system does shut down but it immediately boots again afterwards.

TPM and most other stuff is disabled.

Any ideas?
 
Have a look at the sysctl(8) hw.efi.poweroff uid.
Setting that to false did the trick.
While looking at this option I came across this relevant thread (for reference): https://forums.freebsd.org/threads/mainboard-restarts-by-itself-after-freebsd-shutdown.79614/
Given that this is enabled by default; what are the downsides/disadvantages of going through good old ACPI instead of using EFI for poweroff?

Does it do the same with 14.0-CURRENT?
I don't know :)
 
Same thing on my Elitebook 840.

init 0 doesn't restart unless I close the lid, then it boots again , i have to wait a bit and then close it.

Isn't power off just init 0?
 
Isn't power off just init 0?
No, init 0 halts the system. shutdown -p now powers down the system:
Code:
     -p      The system is halted and the power is turned off (hardware
             support required, otherwise the system is halted) at the
             specified time.
 
Code:
     Calling “poweroff” is equivalent to running:

           shutdown -p now
poweroff(8)

Yes, that resulted in the same behavior (booting again after shutdown) unless `hw.efi.poweroff` is set to `0`.
Need to try this on a one test machine I have. It has the uncanny habit of turning itself back on after a shutdown -p now too.
 
@jbodenmann "shutdown -p now" works on my X1 carbon Gen 9 machine.
Well, not to be nit-picky but it also works on my machine - it just boots again after successfully shutting down :p

I do however assume that in your case the machine does not boot up again?
What's the value of hw.efi.poweroff on your machine?
 
it just boots again after successfully shutting down
Mine shows that same behaviour depending on a BIOS setting. It's a setting named 'AC back' under the power managemant options. It determines what happens when power comes back after a power loss. It has three options. The first is 'memory, the system returns to its last known awake state' (according to the booklet). This option gives the behaviour that you describe. The other options are 'always on' (switches on when power returns) and 'always off' (stay off when power returns). The latter is the default. You may have some similar options in your BIOS.
 
Back
Top