Bash scripts for power button

neatrasm

New Member
Jan 10, 2026
14
0
1
I'm new to Proxmox and not finding satisfactory information for shutdown procedures for my Workstation.

I want to shut down everything properly when pressing or holding the physical power button.

Google Gemini is saying something about installing acpid which hasn't been in Debian since Wheezy.

Thanks
 
On my Proxmox VE, a short press of the power button does a normal graceful shut down like you are asking for. I do think this is standard Debian behavior and not Proxmox specific.
Does your "Workstation" shut down hard immediately instead? Then check the BIOS/UEFI settings of the motherboard. Usually you can influence the behavior of the short press there. The long press usually always shuts down hard immediately and cannot be changed.
 
  • Like
Reactions: beisser
shutdown -hP now works the same, but thats not what op asked for. @leesteken is right that, if the bios is configured correctly, the powerbutton will gracefully shutdown the computer unless a vm takes longer than 3 minutes to shut down, then that vm will be forcefully killed and the computer itself continues to shut down gracefully.

if it immediately powers off that means the behaviour is misconfigured in the bios and needs to be fixed there.
 
When I turn off my gaming pc, I have custom game development programs that need to be handled which I'm still building.

It seemed like a custom shutdown method would be a bash script doing something with the qemu agent from some host daemon service related to the power button.
 
Last edited: