I’m an idiot.
I probably shouldn’t be admitting to this, but today I found my new 12th-Gen Framework laptop had drained its battery whilst completely shutdown. This wasn’t the first time in hindsight.
So I started searching through the interwebs and found various discussions about battery issues with the 11th-Gen, and came across this thread.
This post in particular caught my attention:
$ sudo shutdown -H -P +0
-P= power off
The syntax of shutdown changed with systemd. Some things still us OLD methods
$(shutdown -h now), which doesn’t always do the things on NEW hardware.
Over the years whenever I’ve had to shutdown a server or a VM I’ve always used
shutdown -H now. I don’t remember learning
this, it’s just muscle memory by now.
So for the last couple weeks when I’ve been shutting down my laptop, I’ve been using
shutdown -H now, as Sway doesn’t have
a button for the likes of idiots like me.
Colour me surprised when I checked the man page (for the first time) of
OPTIONS The following options are understood: --help Print a short help text and exit. -H, --halt Halt the machine. -P, --poweroff Power the machine off (the default). -r, --reboot Reboot the machine. -h The same as --poweroff, but does not override the action to take if it is "halt". E.g. shutdown --reboot -h means "poweroff", but shutdown --halt -h means "halt".
Have you noticed it yet?
I’m guessing you already knew and are looking at the screen in disgust thinking I’m a fucking idiot and should be thoroughly ashamed of myself (I am 😢).
For those like me who didn’t know:
shutdown -H nowhalts the system without delay
shutdown -h nowhalts the system and POWERS IT OFF! without delay
shutdown nowALSO halts the system and powers it off without delay, since
-Pis the FUCKING DEFAULT!
All these years I could have been typing less characters and having the desired effect… 😅
This has been your monthly reminder that knowledge without understanding is about as useful as a concrete parachute.