我有一台戴尔笔记本电脑,它连接到戴尔的WD19TB码头。它可以双引导到Windows 10和Kubuntu22.04(20.04也存在这个问题)。
当我从Windows中关闭笔记本电脑时,我就可以发送一个WOL数据包到码头的NIC的MAC地址。当我从Kubuntu内部关闭笔记本电脑时,这是行不通的。
当我将网络电缆直接连接到笔记本而不是码头上时,当我将WOL数据包发送到笔记本电脑的NIC时,我可以在Kubuntu内部关闭它之后唤醒它。
这里有什么问题?
ethtool表示NIC设置正确,WOL处于活动状态。
ethtool enx<mac-address>
Settings for enx<mac-address>:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Link partner advertised pause frame use: No
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Auto-negotiation: on
Port: MII
PHYAD: 32
Transceiver: internal
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00007fff (32767)
drv probe link timer ifdown ifup
rx_err tx_err tx_queued intr
tx_done rx_status pktdata hw wol
Link detected: yeslshw -class network打印
description: Ethernet interface
physical id: 14
bus info: usb@4:2.4
logical name: enx<mac-address>
serial: <mac-address>
size: 1Gbit/s
capacity: 1Gbit/s
capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8152 driverversion=v1.12.13 duplex=full firmware=rtl8153b-2 v1 10/23/19 link=yes multicast=yes port=MII speed=1Gbit/s码头是通过雷电连接的。也许Windows正在把码头放到某种待机模式中,而Kubuntu却在关闭它?
同样的问题,当让笔记本睡觉,它将不会醒来与WOL。
发布于 2022-11-13 01:45:11
默认情况下,有些网络接口没有设置WOL标志。您可以使用ethtool进行更改(可以使用apt install ethtool安装)。
若要检查是否设置了WOL标志,请使用:
ethtool <nic> | grep Wake输出应该是这样的:
Supports Wake-on: pumbg
Wake-on: g如果上面写着Wake-on: d,那就意味着局域网上的唤醒是禁用的。启用了g。您可以通过键入以下命令手动设置此标志:
ethtool -s <nic> wol g您可以设置网络接口,以便在每次系统通过编辑/etc/network/interfaces启动时启用此功能。
auto <nic>
iface <nic> ...
...
up ethtool -s <nic> wol g也许有一种更现代的方法来做这件事,但我已经使用这个设置多年了。有更多信息的Debian文章。
https://unix.stackexchange.com/questions/724083
复制相似问题