LAN 喚醒在 Ubuntu 16.04 上不起作用

LAN 喚醒在 Ubuntu 16.04 上不起作用

我正在嘗試在運行 Ubuntu 16.04 的桌面上設定 LAN 喚醒。

我已經嘗試了很多,遵循不同的手冊和故障排除,但沒有運氣。

當電腦關閉或掛起時,網路卡上會亮起一盞橙色燈,偶爾會輕微閃爍。如果電腦暫停或關閉,我需要透過 LAN 恢復或開啟電腦。

我相信我在 BIOS 中啟用了 LAN 喚醒。

我認為可能相關的一些輸出,

$ sudo ethtool enp2s0 | grep Wake
    Supports Wake-on: pumbg
    Wake-on: g

$ sudo ethtool -i enp2s0 | grep bus
bus-info: 0000:02:00.0

$ cat /proc/acpi/wakeup | grep 0000:02:00.0
PXSX      S4    *enabled   pci:0000:02:00.0

$ lspci | grep Ethernet
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)

$ cat /etc/default/halt 
# Default behaviour of shutdown -h / halt. Set to "halt" or "poweroff".
HALT=poweroff
NETDOWN=no

$ sudo tcpdump -i enp2s0 '(udp and port 7) or (udp and port 9)'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on enp2s0, link-type EN10MB (Ethernet), capture size 262144 bytes
15:31:38.121365 IP <ip>.51603 > <broadcast_ip>.discard: UDP, length 102

我什至嘗試過 r8168 驅動程序,但沒有成功。

我使用以下命令發送 WOL 信號

$ wakeonlan -i <broadcast_ip> <mac_addr>

有任何想法嗎?

答案1

我相信我在 BIOS 中啟用了 LAN 喚醒。

製作當然您已在 BIOS 中啟用它,因為它是 WoL 工作的先決條件。

Wake-on: g

魔包設定必須是持久的。如果不是在重新啟動後,您可能需要嘗試在以下文件中進行設定:

/etc/netctl/profile

如下:

ExecUpPost='/usr/bin/ethtool -s interface wol g'

進一步閱讀 ArchWiki

答案2

設定WOL_DISABLE=N/etc/default/tlpNETDOWN=no/etc/default/halt

相關內容