In the power settings there is no option to perform the shutdown action when a I press the power button. I only see the options to suspend and hibernate or do nothing.
You have to edit
/etc/systemd, and change the line as shown below (remember to unhash it):
Now I'm on Manjaro, so I can't confirm if it works, but it should.
Open terminal. Type:
sudo apt-get install dconf-tools
After installing dconf-tools, on screen (desktop), click on
Applications (top left of the screen), then find and click on
dconf Editor (normally the logo is a Magnifying glass with a checked red box)
In dconf Editor, go to:
org > gnome > settings-daemon > plugins > power
Click on the value of
button-power and choose
You could put this command in the terminal:
gsettings set org.gnome.settings-daemon.plugins.power power-button-action shutdown
It should force your dconf to be set for shutdown when power button is pressed.