如何启用服务器上的电源按钮?

如何启用服务器上的电源按钮?

我的无头 11.10 服务器上的电源按钮似乎没有任何反应,除非我按住它 5 秒钟左右,在这种情况下它会立即关闭机器。

我希望短暂按下它时,它会正常关机 ( shutdown -P now)。我该如何允许这样做?

我见过这个问题但它适用于桌面安装。

答案1

您只需要安装acpid包(sudo apt-get install acpid),它只是一个包,没有其他内容,它将处理所有电源按钮事件(acpi-support 包含更多附加包)。在 ubuntu server 11.10 上测试

https://lists.ubuntu.com/archives/ubuntu-users/2011-November/253766.html

答案2

我相信你可能需要 acpi 支持。查看以下链接以获取有关如何操作电源按钮按下事件的更多信息。

http://blog.metalight.dk/2010/07/ubuntu-lucid-custom-power-button-event/

http://test.z13media.com/2010/03/disable-power-button-on-ubuntu-server.html

相关内容