__hw_protection_trigger(9)
π
__hw_protection_trigger (a Kernel API Manual moment)
okay bestie, so this one lives in the Kernel API Manual (9 section, kernel-internals vibes β¨) and it's literally the "oh no the hardware is cooking, shut it down" function π«Ά
β¨ NAME β¨
__hw_protection_trigger β trigger an emergency system shutdown or reboot π₯π
πΈ SYNOPSIS πΈ
void __hw_protection_trigger (const char *reason , int ms_until_forced ,
enum hw_protection_action action );
that's the whole signature, no cap β void, so it doesn't hand you anything back π
π¦ ARGUMENTS π¦
reasonβ the reason of the emergency shutdown or reboot, and yep it gets printed. so like, say something useful bestie πms_until_forcedβ how long to wait for an orderly shutdown or reboot before triggering it. a negative value disables the forced shutdown or reboot entirely πactionβ the hardware protection action to be taken, it's anenum hw_protection_actionβ
π DESCRIPTION π
so the whole point: you initiate an emergency system shutdown or reboot to protect the hardware from further damage π iconic protective behavior. usage examples include a thermal protection β i.e. things are getting toasty and we're bailing π‘οΈπ₯
π NOTE π
lowkey important: the request is ignored if a protection shutdown or reboot is already pending β even if the previous request gave a large timeout for forced shutdown/reboot. so multiple requests don't stack, periodt π«
π SEE ALSO π
Kernel file ./kernel/reboot.c and all these besties:
emergency_restart(9)register_reboot_notifier(9)unregister_reboot_notifier(9)register_restart_handler(9)unregister_restart_handler(9)do_kernel_restart(9)kernel_restart(9)kernel_halt(9)register_sys_off_handler(9)unregister_sys_off_handler(9)devm_register_sys_off_handler(9)devm_register_power_off_handler(9)devm_register_restart_handler(9)register_platform_power_off(9)unregister_platform_power_off(9)do_kernel_power_off(9)kernel_can_power_off(9)kernel_power_off(9)orderly_poweroff(9)orderly_reboot(9)hw_failure_emergency_action_func(9)hw_failure_emergency_schedule(9)
π that's the page, bestie! it's from the ./kernel source tree and it's dated October 2026 β slay, go keep your hardware safe ππ«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms