What: /sys/devices/.../power/control
Date: January 2009
Contact: Rafael J. Wysocki <[email protected]>
Description:
The /sys/devices/.../power/control attribute allows the user
space to control the run-time power management of the device.
All devices have one of the following two values for the
power/control file:
+ "auto\n" to allow the device to be power managed at run time;
+ "on\n" to prevent the device from being power managed;
The default for all devices is "auto", which means that they may
be subject to automatic power management, depending on their
drivers. Changing this attribute to "on" prevents the driver
from power managing the device at run time. Doing that while
the device is suspended causes it to be woken up.
经过一些研究,我发现了这一点:
源文档来自:内核文档
所以我找到的最终解决方案如下:
该
"$(ls /sys/class/net/ | grep -E '^e')"
块用于查找第一个'e'
设备(以太网设备卡)。更新: 最后,我管理了如何每 5 秒运行一次此脚本
root
,只需将以下脚本添加为/etc/cron.d/ethernet-control