在路径/etc/polkit-1/localauthority/50-local.d下新建名为50-admin.pkla文件,文件内容为:
[disable suspend]Identity=unix-user:*Action=org.freedesktop.upower.suspendResultAny=noResultInactive=noResultActive=no [disable hibernate]Identity=unix-user:*Action=org.freedesktop.upower.hibernateResultAny=noResultInactive=noResultActive=no
完成上面的操作后请注销当前用户,然后重新登录,看看消失的关机键是不是又回来了。