解决Ubuntu关机后无法WOL开机问题

sudo apt install net-tools
ifconfig
sudo apt install ethtool
查看当前WOL模式:
sudo ethtool enp6s0 | grep Wake-on
	Supports Wake-on: pumbg
	Wake-on: d

切换到兼容性最好的g模式:
sudo ethtool -s enp6s0 wol g
sudo ethtool enp6s0 | grep Wake-on
	Supports Wake-on: pumbg
	Wake-on: g

关机测试可以正常WOL开机了。

每次重启后又会变回d模式,创建服务自动设置:
sudo vi /etc/systemd/system/wolmode.service
[Unit]
Description=wol mode service

[Service]
Type=oneshot
ExecStart=/sbin/ethtool -s enp6s0 wol g

[Install]
WantedBy=basic.target

sudo systemctl enable wolmode
sudo systemctl start wolmode

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注