In gnome-control-center Power section, you can set the Power Button Action to "Power Off". The correct behavior is to show the shutdown dialog when pressing the system power button. Note that the default setting is "Suspend", which works properly.
$ gsettings get org.gnome.settings-daemon.plugins.power power-button-action 'interactive'
Oftentimes, when the Power Button Action is set to "Power Off", no action happens. I have been able to get it to work occasionally on certain boots, but I haven't figured out how yet. Here's a screencast with dmesg and journalctl running. I have budgie-desktop --debug enabled. Note journalctl shows systemd-logind logging "Power key pressed."
{F5793854}
Here's the journalctl output from the above run:
I'm trying to get full logs for a working run, but I do have this snippet saved from when it did work:
nido systemd-logind[]: Power key pressed. nido budgie-wm.desktop[]: Window manager warning: Overwriting existing binding of keysym ff61 with keysym ff61 (keycode 6b). nido budgie-wm.desktop[]: Window manager warning: Overwriting existing binding of keysym ff61 with keysym ff61 (keycode 6b). nido budgie-wm.desktop[]: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x1a0000f nido systemd[]: systemd-hostnamed.service: Succeeded. nido gsd-media-keys[]: Failed to call Shutdown on session manager: Timeout was reached nido gnome-session-binary[]: Entering running state
Notice that gnome-session-binary is being triggered. I think that's the shutdown dialog.
This was discussed in this forum post so I know it affects multiple hardware setups.
Here's my hardware information, nonetheless: