You are not logged in.
Pages: 1
Topic closed
My onboard network adapter gets powered down completely by ArchLinux, making it unable to receive and act on Wake-On-Lan (WOL) signals. WOL itself is set up fine (ethtool check).
WoL itself works fine when using Windows or Mint. But once I shutdown from Archlinux, it stops working. As it immediately works again once I boot&shutdown from one of the other OSs, I'm pretty sure the full-powerdown is the issue.
When I tried Ubuntu Server after being frustrated by this issue in Archlinux, I found suggestions that simply adding
NETDOWN=no
to
/etc/default/halt
fixed the issue reliably. This worked for me as well, strengthening my suspicion that the NIC gets power-starved so it can't monitor WOL.
Sadly, I'm stubborn and really want to use ArchLinux for this machine, so I hope you can help me out.
How can I replicate above fix in ArchLinux?
I'm not sure if and which logs would help with this issue, so please just ask if you think some of them useful.
Thanks, everyone, in advance .
Last edited by Senshi (2019-01-21 11:57:52)
Offline
What do you use to manage your network card ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
WoL itself was already on by default, I didn't have to set anything specifically for it, so there was no need to make it persistent by those means (it is on g after every boot).
I use the systemd-networkd service for the wired connection, which in turn uses the super barebone example profile
/etc/systemd/network/20-wired.network
[Match]
Name=enp2s0
[Network]
DHCP=ipv4
ethtool enp2s0
returns
Settings for enp2s0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Link partner advertised pause frame use: Symmetric Receive-only
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000033 (51)
drv probe ifdown ifup
Link detected: yes
That's the extent of the setup I did for the connection (aside setting up a straightforward dhcpcd@enp2s0.service ).
Offline
Do you have a realtek or alx card ?
post lspci -k output.
Does WoL work under archlinux if you let the system suspend or hibernate ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
lspci -k | grep Ethernet
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 02)
Subsystem: ASUSTeK Computer Inc. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
Kernel driver in use: r8169
Kernel modules: r8169
Hibernate doesn't work for me (not enough swap), and WoL does not work from suspend either.
Last edited by Senshi (2019-01-15 12:29:13)
Offline
This is beginning to look like a variation on the issue described in the wiki.
https://wiki.archlinux.org/index.php/Wa … AN#Realtek
https://wiki.archlinux.org/index.php/Ne … OL_problem
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Yes, except came to believe it is not. I had the same thoughts as you and spent days following the wikis advice and all its variations on all the Realtek issues, but if you read those issues carefully, they are all different from what I describe.
My WoL is not "ruined" by Windows. It's the other way around. After shutting down from Windows, WoL works fine.
I am not suffering from the NIC being down after Archlinux boots or WoL being marked disabled after boot.
I am also not suffering from any of the more peculiar issues such as an unreliable link or similar.
My issue is that ArchLinux itself erroneously powers down the NIC fully upon shutdown/suspend instead of keeping it on standby to monitor for WoL. Which would also explain why the Ubuntu solution of NETDOWN=no on halt fixed it perfectly (solution from ubuntuusers wiki [DE]). I found something else that sounds like it could work here: http://forums.debian.net/viewtopic.php?f=5&t=133978, but I do not know if and how I can apply this solution on ArchLinux and if it's even the right way to go.
Offline
The debian forum thread solution only works with very specific network cards and seems to use a program they wrote themselves [1].
The netdown=no solution appears to be intended for pre-systemd setups.
Many realtek wired chipsets can be controlled by 2 drivers : r8168 and r8169 .
archlinux kernel used to have both included , but that's no longer the case.
install https://www.archlinux.org/packages/comm … _64/r8168/ , blacklist r8169 and reboot.
Check if r8168 module supports your card and which kernel parameters it allows .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
I already tried the r8168 driver as described in the wiki (double-checking it actually runs the r8168). It works just the same as the r8169, but does nothing to help with the power-down issue, which is why I went back to the r8169 (actually did a clean reinstall of ArchLinux right after my Ubuntu experiment). What do you mean by kernel params?
Offline
The kernel and it's modules have special settings called kernel paramaters .
https://wiki.archlinux.org/index.php/Kernel_module
every kernel module lists the parameters it supports through modinfo command.
If you run modinfo r8169, you'll see it supports 2 parameters only, neither of which has to do with WoL .
According to our wake on lan wiki page, the r8168 does have a parameter to enable WoL.
post the output of modinfo r8168 (no need for sudo or root) to verify.
You can then apply that parameter and see if it helps.
If it doesn't , we may have to look into ways to replicate netdown=no with systemd halt (which will be much harder).
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
modinfo r8168
filename: /lib/modules/4.20.1-arch1-1-ARCH/extramodules/r8168.ko.xz
version: 8.046.00-NAPI
license: GPL
description: RealTek RTL-8168 Gigabit Ethernet driver
author: Realtek and the Linux r8168 crew <netdev@vger.kernel.org>
srcversion: EEF16FD7BFA162691D9F9DD
alias: pci:v00001186d00004300sv00001186sd00004B10bc*sc*i*
alias: pci:v000010ECd00008161sv*sd*bc*sc*i*
alias: pci:v000010ECd00008168sv*sd*bc*sc*i*
depends:
name: r8168
vermagic: 4.20.1-arch1-1-ARCH SMP preempt mod_unload modversions
parm: speed_mode:force phy operation. Deprecated by ethtool (8). (uint)
parm: duplex_mode:force phy operation. Deprecated by ethtool (8). (uint)
parm: autoneg_mode:force phy operation. Deprecated by ethtool (8). (uint)
parm: advertising_mode:force phy operation. Deprecated by ethtool (8). (uint)
parm: aspm:Enable ASPM. (int)
parm: s5wol:Enable Shutdown Wake On Lan. (int)
parm: s5_keep_curr_mac:Enable Shutdown Keep Current MAC Address. (int)
parm: rx_copybreak:Copy breakpoint for copy-only-tiny-frames (int)
parm: use_dac:Enable PCI DAC. Unsafe on 32 bit PCI slot. (int)
parm: timer_count:Timer Interrupt Interval. (int)
parm: eee_enable:Enable Energy Efficient Ethernet. (int)
parm: hwoptimize:Enable HW optimization function. (ulong)
parm: s0_magic_packet:Enable S0 Magic Packet. (int)
parm: debug:Debug verbosity level (0=none, ..., 16=all) (int)
I found this command which should tell me if and what params are active:
systool -v -m r8168
Module = "r8168"
Attributes:
coresize = "540672"
initsize = "0"
initstate = "live"
refcnt = "0"
srcversion = "EEF16FD7BFA162691D9F9DD"
taint = "OE"
uevent = <store method only>
version = "8.046.00-NAPI"
Sections:
.bss = "0xffffffffc08066c0"
.data.once = "0xffffffffc0806378"
.data = "0xffffffffc0806000"
.exit.text = "0xffffffffc07fdbc9"
.gnu.linkonce.this_module= "0xffffffffc0806380"
.init.text = "0xffffffffc074d000"
.note.Linux = "0xffffffffc07fe024"
.note.gnu.build-id = "0xffffffffc07fe000"
.orc_unwind = "0xffffffffc0802b68"
.orc_unwind_ip = "0xffffffffc0800e00"
.parainstructions = "0xffffffffc0800b50"
.rodata = "0xffffffffc07fe040"
.rodata.str1.1 = "0xffffffffc07ff548"
.rodata.str1.8 = "0xffffffffc0800570"
.smp_locks = "0xffffffffc0800b14"
.strtab = "0xffffffffc0750a48"
.symtab = "0xffffffffc074e000"
.text = "0xffffffffc0786000"
.text.unlikely = "0xffffffffc07fda0d"
__bug_table = "0xffffffffc08061e0"
__mcount_loc = "0xffffffffc07fffea"
__param = "0xffffffffc0800bd0"
It misses the params section, making me believe the parameter has not been set?
modprobe r8168 s5wol=1 does not change anything in the output of above command.
Adding
options r8168 s5wol=1
to /etc/modprobe.d/r8168settings.conf
by itself does not seem to do anything either. I guess I'm missing a step to make sure this is applied properly?
Offline
Not sure, I have found other modules that don't list parameters with systool (igb is one of them)
I think you should change title to get more attention, someting like "WoL not working with suspend/shutdown" .
Give the system power, but don't boot it yet .
Does the network led on the card / router light up ?
Boot up the system to console login / multi-user target , does the led stay the same ?
If it changes during boot , at what points does it do that ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
I started over from scratch with the r8168 driver, and this time it worked after setting the s5wol=1 flag . It now works as expected from all power states (even after AC loss), just what I aimed for ( on-demand media&DL homeserver setup ). It still doesn't show the parameters using systool, but I can definitely confirm the issue being with this single flag. Once I unset it, it stops working.
Sorry for not replying here that I have found a fix, and a tremendous thank you for pointing me in the right direction <3 .
The NIC lights do not light up when the system is shut down, by the way. Same happened in Windows, though. But with the flag set the first (orange) light comes on during POST (even when started by WoL), without it the lights only start once the OS starts booting. Maybe helpful for anyone else that stumbles over the same issue with this particular mainboard & NIC.
Last edited by Senshi (2019-01-21 11:59:20)
Offline
Thank you Senshi and Lone_Wolf for posting all the debugging details, the thread helped me greatly to fix a similar issue. I had a slight variation of the problem: WoL working after shutdown but not from suspend. In my case it was enough to just replace r8169 with r8168 to get WoL working consistently. I din't have to set the module parameter.
Offline
I meet the same problem but the method above did not help.
lsmod and lspci output:
~ # ❯❯❯ lsmod | grep r816
r8168 565248 0
~ # ❯❯❯
~ # ❯❯❯ lspci -k | tail -n 4
0b:00.1 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 12)
Subsystem: CLEVO/KAPOK Computer Device 50f3
Kernel driver in use: r8168
Kernel modules: r8169, r8168
~ # ❯❯❯
I only using r8168 module and append s5wol=1 parameter with the module.
lilo@manjaro ~ ❯❯❯ cat /etc/modprobe.d/r8168.conf ✘ 130
options r8168 s5wol=1
lilo@manjaro ~ ❯❯❯
The module info here:
lilo@manjaro ~ ❯❯❯ modinfo r8168
filename: /lib/modules/5.9.16-1-MANJARO/extramodules/r8168.ko.gz
version: 8.048.03-NAPI
license: GPL
description: RealTek RTL-8168 Gigabit Ethernet driver
author: Realtek and the Linux r8168 crew <netdev@vger.kernel.org>
srcversion: 0085636A8EF6EA50433E5FA
alias: pci:v00001186d00004300sv00001186sd00004B10bc*sc*i*
alias: pci:v000010ECd00002600sv*sd*bc*sc*i*
alias: pci:v000010ECd00002502sv*sd*bc*sc*i*
alias: pci:v000010ECd00008161sv*sd*bc*sc*i*
alias: pci:v000010ECd00008168sv*sd*bc*sc*i*
depends:
retpoline: Y
name: r8168
vermagic: 5.9.16-1-MANJARO SMP preempt mod_unload modversions
parm: speed_mode:force phy operation. Deprecated by ethtool (8). (uint)
parm: duplex_mode:force phy operation. Deprecated by ethtool (8). (uint)
parm: autoneg_mode:force phy operation. Deprecated by ethtool (8). (uint)
parm: advertising_mode:force phy operation. Deprecated by ethtool (8). (uint)
parm: aspm:Enable ASPM. (int)
parm: s5wol:Enable Shutdown Wake On Lan. (int)
parm: s5_keep_curr_mac:Enable Shutdown Keep Current MAC Address. (int)
parm: rx_copybreak:Copy breakpoint for copy-only-tiny-frames (int)
parm: use_dac:Enable PCI DAC. Unsafe on 32 bit PCI slot. (int)
parm: timer_count:Timer Interrupt Interval. (int)
parm: eee_enable:Enable Energy Efficient Ethernet. (int)
parm: hwoptimize:Enable HW optimization function. (ulong)
parm: s0_magic_packet:Enable S0 Magic Packet. (int)
parm: debug:Debug verbosity level (0=none, ..., 16=all) (int)
lilo@manjaro ~ ❯❯❯
And wakeup is enabled
~ # ❯❯❯ cat /sys/class/net/enp11s0f1/device/power/wakeup
enabled
~ # ❯❯❯
The ethtool info here:
~ # ❯❯❯ ethtool enp11s0f1
Settings for enp11s0f1:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric Receive-only
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: Twisted Pair
PHYAD: 0
Transceiver: internal
MDI-X: Unknown
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000033 (51)
drv probe ifdown ifup
Link detected: yes
~ # ❯❯❯
Appending, the WOL works on Windows environment well.
Last edited by lilogo (2021-02-25 09:23:54)
Offline
Please do not necrobump old solved threads, and while you are at it, don't ask your question here but go to the appropriate Manjaro boards.
https://bbs.archlinux.org/misc.php?action=rules
Closing.
Offline
Pages: 1
Topic closed