我是一个新的 Ubuntu 13.10 用户。合上笔记本电脑的盖子不会导致计算机进入挂起模式,这意味着每次我在没有手动挂起计算机的情况下合上盖子时,电池都会耗尽。
在电源管理中设置了正确的设置——在交流和直流电源关闭盖子时暂停笔记本电脑,但这对实际行为没有影响。
对于早在 Ubuntu 11 的许多用户来说,这似乎是一个常见问题——我能找到的唯一解决方案如下。但是,作为一个新的 linux 用户,我不知道如何实际执行指令。如果有人可以提供额外的细节,那将是非常有帮助的。
提前致谢。
/etc/acpi/events/lidbtn triggers /etc/acpi/lid.sh which triggers
/etc/acpi/local/lid.sh.post at the end of the script.
/etc/acpi/local/* allows you to add your own config (e.g. required for
wmii).
generate /etc/acpi/local/lid.sh.post
make it executable and add:
\#!/bin/bash
grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]
then
/usr/sbin/pm-suspend
fi
wmii will now go to suspend mode when closing the lid. It'll
automatically wake up when opening the lid.
#!/bin/bash
load=$(cat /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT0/capacity)
min_load=20 …
Run Code Online (Sandbox Code Playgroud)