AQtion icon indicating copy to clipboard operation
AQtion copied to clipboard

Wake on lan not working on linux with AQC113C

Open Slashic opened this issue 1 year ago • 19 comments

I tried different distros with different kernel versions, all behave the same.

Wake On Lan doesn't work and the NIC is shut down on Poweroff or Suspend. This works perfectly fine on Windows 10 on the same hardware.

I also tried to use the driver provided on the official website, but they're not compiling as described in this issue: https://github.com/Aquantia/AQtion/issues/69

Here are the configurations on Fedora 41 KDE Spin: Linux: 6.12.11-200.fc41.x86_64

Also tested on Linux Mint 22 & Ubuntu 24.04

>ethtool enp6s0
Settings for enp6s0:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Full
                                100baseT/Full
                                1000baseT/Full
                                10000baseT/Full
                                2500baseT/Full
                                5000baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Full
                                100baseT/Full
                                1000baseT/Full
                                10000baseT/Full
                                2500baseT/Full
                                5000baseT/Full
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Full
                                             100baseT/Full
                                             1000baseT/Full
                                             10000baseT/Full
                                             2500baseT/Full
                                             5000baseT/Full
        Link partner advertised pause frame use: No
        Link partner advertised auto-negotiation: No
        Link partner advertised FEC modes: Not reported
        Speed: 10000Mb/s
        Duplex: Full
        Auto-negotiation: on
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        MDI-X: Unknown
        Supports Wake-on: pg
        Wake-on: g
        Current message level: 0x00000005 (5)
                               drv link
        Link detected: yes

ACPI:

>cat /proc/acpi/wakeup
Device  S-state   Status   Sysfs node
PEG1      S4    *enabled   pci:0000:00:01.0
PEGP      S4    *enabled   pci:0000:01:00.0
PEG2      S4    *disabled
PEGP      S4    *disabled
PEG0      S4    *enabled   pci:0000:00:06.0
PEGP      S4    *disabled  pci:0000:04:00.0
RP09      S4    *disabled  pci:0000:00:1d.0
PXSX      S4    *disabled
RP10      S4    *disabled
PXSX      S4    *disabled
RP11      S4    *disabled
PXSX      S4    *disabled
RP12      S4    *disabled
PXSX      S4    *disabled
RP13      S4    *enabled   pci:0000:00:1d.4
PXSX      S4    *disabled  pci:0000:08:00.0
RP14      S4    *disabled
PXSX      S4    *disabled
RP15      S4    *disabled
PXSX      S4    *disabled
RP16      S4    *disabled
PXSX      S4    *disabled
RP01      S4    *enabled   pci:0000:00:1c.0
PXSX      S4    *enabled  pci:0000:06:00.0
RP02      S4    *disabled
PXSX      S4    *disabled
RP03      S4    *disabled
PXSX      S4    *disabled
RP04      S4    *disabled
PXSX      S4    *disabled
RP05      S4    *disabled
PXSX      S4    *disabled
RP06      S4    *disabled
PXSX      S4    *disabled
RP07      S4    *disabled
PXSX      S4    *disabled
RP08      S4    *disabled
PXSX      S4    *disabled
RP17      S4    *disabled
PXSX      S4    *disabled
RP18      S4    *disabled
PXSX      S4    *disabled
RP19      S4    *disabled
PXSX      S4    *disabled
RP20      S4    *disabled
PXSX      S4    *disabled
RP21      S4    *disabled
PXSX      S4    *disabled
RP22      S4    *disabled
PXSX      S4    *disabled
RP23      S4    *disabled
PXSX      S4    *disabled
RP24      S4    *disabled
PXSX      S4    *disabled
RP25      S4    *enabled   pci:0000:00:1a.0
PXSX      S4    *disabled  pci:0000:05:00.0
RP26      S4    *disabled
PXSX      S4    *disabled
RP27      S4    *disabled
PXSX      S4    *disabled
RP28      S4    *disabled
PXSX      S4    *disabled
XHCI      S4    *enabled   pci:0000:00:14.0
XDCI      S4    *disabled
HDAS      S4    *disabled  pci:0000:00:1f.3
CNVW      S4    *disabled  pci:0000:00:14.3
AWAC      S4    *enabled   platform:ACPI000E:00

Infos:

>ethtool -i enp6s0
driver: atlantic
version: 6.12.11-200.fc41.x86_64
firmware-version: 1.3.7
expansion-rom-version: 
bus-info: 0000:06:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: yes

Slashic avatar Feb 12 '25 14:02 Slashic

  1. What vesrsion of AQtion driver do you use?
  2. How did you solve issue "atlantic: module verification failed: signature and/or required key missing - tainting kernel"?

epox33d avatar Feb 15 '25 11:02 epox33d

About the driver version, these are embedded ones in the kernel itself, i suppose it shows the kernel version instead of the standalone one you normally have here.

I didn't compile the driver as i was stuck on that error, but i see you managed to find some c files to get a build alas not working.

Slashic avatar Feb 15 '25 12:02 Slashic

Can you show your modinfo atlantic, lsmod | grep atlantic and lspci -nn | grep 1d6a:04c0 output? Just like this:

root@******:~# modinfo atlantic
filename:       /lib/modules/6.1.0-31-amd64/updates/drivers/net/ethernet/aquantia/atlantic/atlantic.ko
description:    Marvell (Aquantia) Corporation(R) Network Driver
author:         Marvell
version:        2.5.12.0
license:        GPL v2
firmware:       mrvl/91B1.fw
firmware:       mrvl/87B1.fw
firmware:       mrvl/80B1.fw
srcversion:     257DE98845AFD5081AC22C8
alias:          pci:v00001D6Ad000003C0sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000093C0sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000094C0sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000011C0sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000012C0sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000034C0sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000014C0sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000000C0sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000004C0sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000092B1sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000091B1sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000089B1sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000088B1sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000087B1sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000080B1sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000012B1sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000011B1sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000009B1sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000008B1sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000007B1sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000000B1sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad0000D109sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad0000D108sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad0000D107sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad0000D100sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad00000001sv*sd*bc*sc*i*
depends:        macsec,crc-itu-t
retpoline:      Y
name:           atlantic
vermagic:       6.1.0-31-amd64 SMP preempt mod_unload modversions
parm:           aq_ptp_offset_forced:Force to use the driver parameters (uint)
parm:           aq_ptp_offset_100:PTP offset for 100M (uint)
parm:           aq_ptp_offset_1000:PTP offset for 1G (uint)
parm:           aq_ptp_offset_2500:PTP offset for 2,5G (uint)
parm:           aq_ptp_offset_5000:PTP offset for 5G (uint)
parm:           aq_ptp_offset_10000:PTP offset for 10G (uint)
parm:           aq_ptp_gpio_hightime:PTP GPIO high time (uint)
parm:           sleep_delay:uint
parm:           aq_itr:Interrupt throttling mode (uint)
parm:           aq_itr_tx:TX interrupt throttle rate (uint)
parm:           aq_itr_rx:RX interrupt throttle rate (uint)
parm:           aq_rxpageorder:RX page order override (uint)
parm:           aq_rx_refill_thres:RX refill threshold (uint)
parm:           debug:Default debug msglevel (uint)
parm:           aq_fw_did:Use FW image for this DID (array of uint)
parm:           aq_fw_sid:Use provisioning data for this SID (array of uint)
parm:           aq_force_host_boot:Force host boot (array of uint)
parm:           aq_enable_wa:Quirk bits to enable HW workarounds (int)
parm:           aq_enable_ptp:Enable PTP (bool)
root@******:~# lsmod | grep atlantic
atlantic              344064  0
macsec                 61440  1 atlantic
crc_itu_t              16384  1 atlantic
root@******:~# lspci -nn | grep 1d6a:04c0
root@******:~#

epox33d avatar Feb 15 '25 15:02 epox33d

Here they are:

filename:       /lib/modules/6.12.13-200.fc41.x86_64/kernel/drivers/net/ethernet/aquantia/atlantic/atlantic.ko.xz
description:    Marvell (Aquantia) Corporation(R) Network Driver
author:         Marvell
license:        GPL v2
alias:          pci:v00001D6Ad000011C0sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000034C0sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000012C0sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000014C0sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000004C0sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000093C0sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000094C0sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000000C0sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000092B1sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000091B1sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000089B1sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000088B1sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000087B1sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000080B1sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000012B1sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000011B1sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000009B1sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000008B1sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000007B1sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad000000B1sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad0000D109sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad0000D108sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad0000D107sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad0000D100sv*sd*bc*sc*i*
alias:          pci:v00001D6Ad00000001sv*sd*bc*sc*i*
depends:        macsec
intree:         Y
name:           atlantic
retpoline:      Y
vermagic:       6.12.13-200.fc41.x86_64 SMP preempt mod_unload 
sig_id:         PKCS#7
signer:         Fedora kernel signing key
sig_key:       
sig_hashalgo:   sha256
signature:      
parm:           aq_itr:Interrupt throttling mode (uint)
parm:           aq_itr_tx:TX interrupt throttle rate (uint)
parm:           aq_itr_rx:RX interrupt throttle rate (uint)
atlantic              344064  0
macsec                 73728  1 atlantic
lspci -nn | grep 06:00.0
06:00.0 Ethernet controller [0200]: Aquantia Corp. AQC113C NBase-T/IEEE 802.3an Ethernet Controller [Marvell Scalable mGig] [1d6a:14c0] (rev 03)

Slashic avatar Feb 18 '25 09:02 Slashic

@Slashic did you find a solution here? i just got my thunderbolt adapter and i can't compile the driver on the latest ubuntu build and kernel, same issues as https://github.com/Aquantia/AQtion/issues/69 and just by plug and playing it simply doesn't work

rursache avatar Mar 04 '25 16:03 rursache

No solution yet, i tried various distros and kernel version, they all have that same embedded driver version that is i believe taken from these and fixed by kernel maintainers. I gave up on wake on lan with Marvell NICs, i spent too much time on this already.

Slashic avatar Mar 05 '25 16:03 Slashic

WOL doesn't appear to work with the upstream driver. I suppose there is some bug there. When I used the official Marvell driver, which needs patches mentioned in https://github.com/Aquantia/AQtion/issues/69, it started working right away.

zeroepoch avatar Jun 11 '25 22:06 zeroepoch

I was able to get WOL working on the upstream Linux kernel (well 6.14.9-300.fc42.x86_64) using the following patch, which adds the missing WOL power function for ATL2 that I noticed was in this driver. This patch applies to Linux master as well without changes or fuzz.

diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_hw.h b/drivers/net/ethernet/aquantia/atlantic/aq_hw.h
index 42c0efc1b455..4e66fd9b2ab1 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_hw.h
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_hw.h
@@ -113,6 +113,8 @@ struct aq_stats_s {
 #define AQ_HW_POWER_STATE_D0   0U
 #define AQ_HW_POWER_STATE_D3   3U
 
+#define	AQ_FW_WAKE_ON_LINK_RTPM BIT(10)
+
 #define AQ_HW_FLAG_STARTED     0x00000004U
 #define AQ_HW_FLAG_STOPPING    0x00000008U
 #define AQ_HW_FLAG_RESETTING   0x00000010U
diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2_utils_fw.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2_utils_fw.c
index 52e2070a4a2f..6a2dbb652015 100644
--- a/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2_utils_fw.c
+++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2_utils_fw.c
@@ -462,6 +462,44 @@ static int aq_a2_fw_get_mac_temp(struct aq_hw_s *self, int *temp)
 	return aq_a2_fw_get_phy_temp(self, temp);
 }
 
+static int aq_a2_fw_set_wol_params(struct aq_hw_s *self, const u8 *mac, u32 wol)
+{
+	struct link_control_s link_control;
+	struct mac_address_aligned_s mac_address;
+	struct wake_on_lan_s wake_on_lan;
+
+	memcpy(mac_address.aligned.mac_address, mac, ETH_ALEN);
+	hw_atl2_shared_buffer_write(self, mac_address, mac_address);
+
+	memset(&wake_on_lan, 0, sizeof(wake_on_lan));
+
+	if (wol & WAKE_MAGIC)
+		wake_on_lan.wake_on_magic_packet = 1U;
+
+	if (wol & (WAKE_PHY | AQ_FW_WAKE_ON_LINK_RTPM))
+		wake_on_lan.wake_on_link_up = 1U;
+
+	hw_atl2_shared_buffer_write(self, sleep_proxy, wake_on_lan);
+
+	hw_atl2_shared_buffer_get(self, link_control, link_control);
+	link_control.mode = AQ_HOST_MODE_SLEEP_PROXY;
+	hw_atl2_shared_buffer_write(self, link_control, link_control);
+
+	return hw_atl2_shared_buffer_finish_ack(self);
+}
+
+static int aq_a2_fw_set_power(struct aq_hw_s *self, unsigned int power_state,
+			      const u8 *mac)
+{
+	int err = 0;
+	u32 wol = self->aq_nic_cfg->wol;
+
+	if (wol)
+		err = aq_a2_fw_set_wol_params(self, mac, wol);
+
+	return err;
+}
+
 static int aq_a2_fw_set_eee_rate(struct aq_hw_s *self, u32 speed)
 {
 	struct link_options_s link_options;
@@ -605,6 +643,7 @@ const struct aq_fw_ops aq_a2_fw_ops = {
 	.set_state          = aq_a2_fw_set_state,
 	.update_link_status = aq_a2_fw_update_link_status,
 	.update_stats       = aq_a2_fw_update_stats,
+	.set_power          = aq_a2_fw_set_power,
 	.get_mac_temp       = aq_a2_fw_get_mac_temp,
 	.get_phy_temp       = aq_a2_fw_get_phy_temp,
 	.set_eee_rate       = aq_a2_fw_set_eee_rate,

zeroepoch avatar Jun 12 '25 03:06 zeroepoch

Can confirm that the patch applied to the current Arch kernel (6.15.2.arch1-1) also works on my hardware (GIGABYTE B850 AI TOP with dual AQC113C). Thank you! 👍

@zeroepoch Do you intend to upstream your patch? If not me or someone else could also take care of that part.

Bobo1239 avatar Jun 14 '25 14:06 Bobo1239

Yep, I'm going to try and start the upstream process next week. I have a friend who has worked on other network changes upstream who is going to help me through the process.

I also tried this on a NICGIGA AQC113C (https://www.amazon.com/dp/B0D87439N7) and it worked as well. I previously made the change on a TP-Link TX401 which has a AQC113, FYI.

zeroepoch avatar Jun 15 '25 00:06 zeroepoch

I case anyone comes across this issue who is using Fedora, I've created some akmod packages that build the patched atlantic driver. With akmod packages it will rebuild the kernel module each time you update the kernel. At least until the snapshot I took of the upstream Linux kernel is incompatible, at which point I'll need to refresh the snapshot. As others suggested I would like to get this patch upstreamed, but this is my solution until then, and it was something I wanted to play with at some point anyway (akmods and Copr).

Links:

  • My Fedora Copr project: https://copr.fedorainfracloud.org/coprs/ework/atlantic-kmod/
    • Package source: https://github.com/zeroepoch/atlantic-kmod
  • Patch in my fork of the kernel: https://github.com/zeroepoch/net-next/commit/3a01ee5f80233feb9bce2a39526a59e8f2d9f6d5

zeroepoch avatar Jun 15 '25 08:06 zeroepoch

Just to say that Wake-on-LAN doesn't work either with the AQC113CS under Debian/unstable with its 6.12.33+deb13-amd64 kernel.

disset% lspci -nn | grep AQC
0000:01:00.0 Ethernet controller [0200]: Aquantia Corp. AQtion AQC113CS NBase-T/IEEE 802.3an Ethernet Controller [Antigua 10G] [1d6a:94c0] (rev 03)

The machine (a Dell Precision 5860 Tower) has a second Ethernet interface, for which Wake-on-LAN is working (same network and configuration: the only thing I did was to plug the Ethernet cable into the other port).

vinc17fr avatar Jun 23 '25 15:06 vinc17fr

Just to say that Wake-on-LAN doesn't work either with the AQC113CS under Debian/unstable with its 6.12.33+deb13-amd64 kernel.

@vinc17fr, if you're able and willing to try the patch I posted earlier and rebuild the atlantic kernel module that would help to confirm this works for AQC113CS as well.

zeroepoch avatar Jun 23 '25 17:06 zeroepoch

FYI, I submitted the patch to the netdev mailing list.

https://lore.kernel.org/netdev/[email protected]/

zeroepoch avatar Jun 29 '25 06:06 zeroepoch

I recently added a NICGIGA 10G Base-T PCI-e Network Card, Marvell AQC113 Controller card in my UNRAID NAS server and also am experiencing that it DOES NOT respond to WOL sent to it. I have no idea how or if there is a way to fix this on UNRAID which uses Slackware Linux. If anyone knows a way to fix WOL with these AQC113C and AQC113Cs cards, I'd be happy to apply and try it. I have no way or knowledge to compile any source code mods though. So hopefully there is some way just to get UNRAID to update their kernel device drivers for this particular chipset.

infobits avatar Jul 26 '25 18:07 infobits

So hopefully there is some way just to get UNRAID to update their kernel device drivers for this particular chipset.

If you're unfamiliar with how to compile a kernel module there might not be much other options right now. I believe my patch may land in kernel 6.17, so the other option is wait until that kernel version is released and UNRAID picks it up. That could be a while though.

zeroepoch avatar Jul 27 '25 01:07 zeroepoch

My patch is included in 6.17-rc1 so this issue should be resolved once the 6.17 kernel starts shipping.

zeroepoch avatar Aug 10 '25 23:08 zeroepoch

@Slashic the WOL fix has been included in 6.17-rc1, 6.16.2, 6.15.11, and 6.12.43 so far with some other long-term branches pending from the commit emails I received. As the reporter, do you have permission to close this issue now?

Update: This fix has now been included in the latest stable kernel packages (6.16.3) for Arch Linux and Fedora 42. Linux distros such as these should start to allow WoL out of the box.

zeroepoch avatar Aug 21 '25 05:08 zeroepoch

I just want to mention FWIW that my UNRAID server is on Linux kernel 6.12.24 with UNRAID's OS version 7.1.4 currently and the WOL does not work for this Marvell AQC113 Controller, NICGIGA 10Gb Ethernet Adapter. I think it is related to what is mentioned elsewhere in this thread that it looks like the adapter card is actually powered off when I put the UNRAID into sleep mode. Therefore since the adapter powers off when in sleep mode on this system, there is no way it will detect an incoming Wake Up packet(s).

infobits avatar Aug 21 '25 16:08 infobits