Xubuntu 14.04 电源按钮立即关闭笔记本电脑,而不是显示关机菜单

Xubuntu 14.04 电源按钮立即关闭笔记本电脑,而不是显示关机菜单

笔记本电脑是联想 Thinkpad X120e。
lshw -short 输出
/proc/cpu信息

设置基本是标准的。没有以任何方式定制,因为我刚刚安装它。没有安装与驱动程序相关的软件包,除了用于视频加速的 mesa-vdpau-drivers 和 vdpau-va-driver。使用标准 radeon 驱动程序进行图形处理。

这是一个相当严重的问题,因为我上高中,有些非常烦人的人喜欢在我工作时跑过来按下我笔记本电脑的电源按钮。通常这会调出关机菜单,但在这里它会立即关闭电脑,甚至不需要经过正常的关机过程。如果我正在做某事,那就太糟糕了。

你知道发生了什么事吗?

答案1

看来 systemd 在 xfce 电源管理器之前启动并处理电源按钮。

尝试设置 systemd 忽略对盖子关闭或电源按钮按下的处理,编辑文件 /etc/systemd/logind.conf,从行首删除注释符号 #,并将适当的行设置为忽略:

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# See logind.conf(5) for details

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
Controllers=blkio cpu cpuacct cpuset devices freezer hugetlb memory perf_event
ResetControllers=
#InhibitDelayMaxSec=5
HandlePowerKey=ignore
HandleSuspendKey=ignore
HandleHibernateKey=ignore
HandleLidSwitch=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#IdleAction=ignore
#IdleActionSec=30min

答案2

打开晶须菜单-->设置-->电源管理器。

在“常规”选项卡中,为“按下电源按钮时”选择“询问”选项。

相关内容