这是带有OpenRC (稍后更新为systemd )的Gentoo Linux,以及ACPI +英特尔内核中的一些电源管理功能。ACPId已经启动并运行。我可以暂停使用ram 使用:
echo -n "mem" > /sys/power/state这很管用,但我需要用电源按钮才能醒过来。有没有办法从键盘事件中醒来,比如按空格键?键盘是一个无线USB键盘。我在/etc/acpi中查看了脚本的内容,但它对此没有提供任何见解。我发现的大部分信息通常都是针对笔记本电脑用户的。我真的需要像旧的pm-utils那样的东西来完成这个任务吗?仅仅使用acpid有什么问题吗?
cat /proc/acpi/wakeup
Device S-state Status Sysfs node
P0P2 S4 *disabled
P0P3 S4 *disabled pci:0000:00:06.0
P0P1 S4 *disabled pci:0000:00:1e.0
PS2K S4 *enabled pnp:00:0b
EUSB S4 *enabled pci:0000:00:1d.7
USBE S4 *enabled pci:0000:00:1a.7
P0P4 S4 *disabled pci:0000:00:1c.0
P0P5 S4 *disabled
P0P6 S4 *disabled pci:0000:00:1c.2
P0P7 S4 *disabled
P0P8 S4 *disabled
P0P9 S4 *disabled
GBEC S4 *disabled
USB0 S4 *enabled pci:0000:00:1d.0
USB1 S4 *enabled pci:0000:00:1d.1
USB2 S4 *enabled pci:0000:00:1d.2
USB3 S4 *disabled
USB4 S4 *enabled pci:0000:00:1a.0
USB5 S4 *enabled pci:0000:00:1a.1
USB6 S4 *enabled pci:0000:00:1a.2
MBT4 S4 *disabled使用了看似相关的内核选项(3.10.25-gentoo SMP,64位,IA32emul=off,no-multilib):
BIOS设置非常标准:
OpenRC被更新为systemd,内核被重新编译以支持这一点。配置也更新了就像这样。使用systemd,并不是所有情况下都需要无粘。例如,如果不运行,您可以发出systemctl suspend,其行为是.和以前一样,也就是只从电源按钮上醒来.
pstree输出:
systemd
├─acpid -f
├─at-spi-bus-laun
│ ├─dbus-daemon --config-file=/etc/at-spi2/accessibility.conf --nofork--print-addres
│ └─2*[{at-spi-bus-laun}]
├─at-spi2-registr --use-gnome-session
│ └─{at-spi2-registr}
├─dbus-daemon --system --address=systemd: --nofork --nopidfile--systemd-activation
├─dbus-daemon --fork --print-pid 5 --print-address 7 --session
├─dbus-launch --sh-syntax --exit-with-session
├─dhcpcd -q --nobackground
├─login --
│ └─bash
│ └─startx /usr/bin/startx
│ └─xinit /etc/X11/xinit/xinitrc -- /etc/X11/xinit/xserverrc :0 -auth...
│ ├─X -nolisten tcp :0 -auth /home/user/.serverauth.3329
│ └─openbox --startup /usr/libexec/openbox-autostart OPENBOX
│ ├─firefox
│ │ ├─plugin-containe ...
│ │ │ └─6*[{plugin-containe}]
│ │ └─35*[{firefox}]
│ └─vlc
│ └─4*[{vlc}]
├─lxterminal
│ ├─bash
│ │ └─htop
│ ├─bash
│ │ └─su
│ │ └─bash
│ │ └─grc /usr/lib/python-exec/python2.7/grc tail -f ...
│ │ ├─grcat /usr/lib/python-exec/python2.7/grcat conf.log
│ │ └─tail -f /var/log/emerge.log
│ ├─bash
│ ├─gnome-pty-helpe
│ └─{lxterminal}
├─mount.ntfs /dev/sdb1 /mnt/div -o rw
├─roxterm
│ ├─bash
│ │ └─su
│ │ └─bash
│ │ └─pstree -a
│ ├─gnome-pty-helpe
│ └─{roxterm}
├─systemd --user
│ └─(sd-pam)
├─systemd-journal
├─systemd-logind
├─systemd-udevd
├─wbar --pos bot-right --taskbar --isize 24
└─xcompmgr -c -C -t-5 -l-5 -r4.2 -o.55发布于 2014-01-10 22:49:07
这通常也是一个BIOS设置。您可以通过以下方式检查:
grep ^PWRB /proc/acpi/wakeup 并将其启用
echo "PWRB" > /proc/acpi/wakeup 发布于 2016-03-07 02:11:44
这主要取决于使用的硬件,而不是软件。
能够从USB键盘上的键盘事件恢复。
USB0等在/proc/acpi/wakeup中确认支持。正如您的/proc/acpi/wakeup显示的那样,BIOS支持通过USB从挂起甚至休眠(S4在第二列中)唤醒,并且大多数USB端口(第三列)都启用了唤醒,因此很有可能您的无线键盘是罪魁祸首,您在操作系统或BIOS中更改的任何内容都不会使唤醒工作。
https://unix.stackexchange.com/questions/108802
复制相似问题