Update 2023.03.17: a reader of this blog, W0CKY, came up with a much better solution:
sudo setkeycodes 55 116
I packaged that into a script:
#!/bin/bash if [[ $EUID -ne 0 ]]; then echo re-running as root exec sudo /bin/bash "$0" "$@" else echo rewriting key codes setkeycodes 55 116 fi
… configured sudoers to run the script without sudo…
… and am running the script after login.
After an BIOS update, the Acer Nitro 5’s power button doesn’t work any more under Ubuntu 20.04. The smart folks at Mint figured out  what’s wrong, but I couldn’t get their solution working and I’ve long given up on opening launchpad bugs just to watch them triage. Also I love a good workaround, so here it is!
First – and to my good luck – every time the power button is pressed, syslog will print this message:
Unknown key pressed (translated set 2, code 0x55 on isa0060/serio0)
So the action plan is to write a script which tails syslog, greps for the exact message and run a suspend or shutdown command. The script should be started when the user logs on.
The script is on github . For convenience I registered it with the “Startup Application” Gnome desktop app which runs the script after the user logs into the desktop environment.
 Power button does not work after BIOS update (acer nitro 5)
 acer nitro 5 power button workaround script
2 thoughts on “Acer Nitro 5 power button broken in Ubuntu 20.04”
i found a real solution
do “sudo setkeycodes 55 116” in terminal
Thank you, that worked well!