Check your /etc/systemd/logind.conf
file. It should look like this:
[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#Controllers=
#ResetControllers=cpu
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#IdleAction=ignore
#IdleActionSec=30min
Uncomment the line that says #HandlePowerKey=poweroff
and change the value to ignore
.
Then restart the logind with the command: sudo systemctl restart systemd-logind
or reboot your computer.
EDIT: how to create a new acpi handler
Create a new file in /etc/acpi/events/
. The content of the file should be:
event=<acpi_event_code>
action=<script_to_call>
where <acpi_event_code>
is the code you get using the acpi_listen
tool and <script_to_call>
is the full path to the script you wish to call when that event happens.
They must have changed something in 13.10 because it seems that I have too few files in my /etc/accpi/events folder compared to the 13.04.
/etc/acpi/powerbtn.sh
and found out that it just does nothing. The menu I’m speaking of can be summoned by the commandgnome-session-quit --power-off