LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   NIC 'loses' WOL paramater/setting/value after reboot = No WOL possible (https://www.linuxquestions.org/questions/linux-networking-3/nic-loses-wol-paramater-setting-value-after-reboot-%3D-no-wol-possible-4175687872/)

Superblond 01-02-2021 08:05 AM

NIC 'loses' WOL paramater/setting/value after reboot = No WOL possible
 
Hallo experts!

After installing the correct Linux driver for my 10GBE Marvell AQN-107 Network card (Marvell AQtion Linux driver) WOL is available and settings can be changed.

Problem: After the 1st reboot the WOL parameter ist gone and cant be changed anymore!

### Installation of the driver ###
Code:

root@NAS:~/Downloads/Marvell2$ modprobe ptp
root@NAS:~/Downloads/Marvell2$ modprobe crc_itu_t
root@NAS:~/Downloads/Marvell2$ ./dkms.sh install

Creating symlink /var/lib/dkms/atlantic/2.4.3.0/source ->
                /usr/src/atlantic-2.4.3.0

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=4.19.0-13-amd64 -C /lib/modules/4.19.0-13-amd64/build M=/var/lib/dkms/atlantic/2.4.3.0/build......
cleaning build area...

DKMS: build completed.
atlantic.ko:
Running module version sanity check.
 - Original module
  - This kernel never originally had a module by this name
 - Installation
  - Installing to /lib/modules/4.19.0-13-amd64/updates/dkms/

depmod...

DKMS: install completed.

### Checking if driver ok and NIC working ###
Code:

nexus6@NAS:~/Downloads/Marvell2$ sudo /usr/sbin/ethtool enp2s0
Settings for enp2s0:
        Supported ports: [ TP ]
        Supported link modes:  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:  100baseT/Full
                                1000baseT/Full
                                10000baseT/Full
                                2500baseT/Full
                                5000baseT/Full
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Speed: 10000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: Unknown
        Supports Wake-on: pg
        Wake-on: d

        Current message level: 0x00000005 (5)
        Current message level: 0x00000005 (5)
                              drv link
        Link detected: yes

### Setting WOL from "d" to "g" with ethtool + check ###
Code:

root@NAS:~/Downloads/Marvell2$ sudo /usr/sbin/ethtool -s enp2s0 wol g

root@NAS:~/Downloads/Marvell2$ sudo /usr/sbin/ethtool enp2s0
...snip
        Supports Wake-on: pg
        Wake-on: g


...snip

### Until now all good, then reboot and check ###
### now: after reboot & login the WOL parameter is gone ###
Code:

root@NAS:~# /usr/sbin/ethtool enp2s0
Settings for enp2s0:
        Supported ports: [ TP ]
        Supported link modes:  100baseT/Full
                                1000baseT/Full
                                10000baseT/Full
                                2500baseT/Full
                                5000baseT/Full
        Supported pause frame use: Symmetric
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  100baseT/Full
                                1000baseT/Full
                                10000baseT/Full
                                2500baseT/Full
                                5000baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported

        Speed: 10000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: Unknown
        Link detected: yes

### Try to set mode "g" ###
Code:

root@NAS:~# /usr/sbin/ethtool -s enp2s0 wol g
Cannot get current wake-on-lan settings: Operation not supported
  not setting wol
root@NAS:~#

### Configures a WOL service in /etc/systemd/system/wol@.service ###

Code:

[Unit]
Description=Wake-on-LAN
Requires=network.target
After=network.target

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

[Install]
WantedBy=multi-user.target

### and enable service ###
Code:

root@NAS:~# systemctl enable wol@enp2s0.
But nothing changed...
NIC is working perfectly at 10GBit, with no problems...execpt: I cant use WOL to wake up my designated NAS!?

### Some basic info about my System ###
Code:


root@NAS:~# cat /etc/issue
openmediavault 5.5.20-1 (Usul) \n \l
Copyright (C) 2009-2020 by Volker Theile. All rights reserved.

To manage the system visit the openmediavault web control panel:

enp2s0: 192.168.178.7
enp2s0: fe80::95a9:4eb8:5aee:c2fc

root@NAS:~# cat /proc/version
Linux version 4.19.0-13-amd64 (debian-kernel@lists.debian.org) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 4.19.160-2 (2020-11-28)

root@NAS:~# uname -a
Linux NAS.fritz.box 4.19.0-13-amd64 #1 SMP Debian 4.19.160-2 (2020-11-28) x86_64 GNU/Linux

root@NAS:~# lspci -nnk | grep -i net -A2
02:00.0 Ethernet controller [0200]: Aquantia Corp. AQC107 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion] [1d6a:d107] (rev 02)
        Subsystem: Aquantia Corp. AQC107 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion] [1d6a:0001]
        Kernel driver in use: atlantic
        Kernel modules: atlantic

root@NAS:~# ifconfig
docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:2c:80:9a:b0  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.178.7  netmask 255.255.255.0  broadcast 192.168.178.255
        inet6 2003:f8:5738:cb00:ab5e:eea6:bdaa:dc17  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::95a9:4eb8:5aee:c2fc  prefixlen 64  scopeid 0x20<link>
        ether 00:17:b6:00:52:ce  txqueuelen 1000  (Ethernet)
        RX packets 8980  bytes 1398418 (1.3 MiB)
        RX errors 0  dropped 1  overruns 0  frame 0
        TX packets 4631  bytes 1395048 (1.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Lokale Schleife)
        RX packets 588  bytes 234619 (229.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 588  bytes 234619 (229.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

?> Is it possible that the already installed OpenMediaVault NAS-Software interfere with the Debian-Core?

?> Can it be that the istalled Xfce Desktop and the Network manager in this GUI causing problems?

I appreciate any help you may provide!
Thanks
SB

berndbausch 01-02-2021 09:42 PM

Are you sure that the wol service is actually launched? You should see that in the journal or the output of systemctl status.

I can't confirm this right now, but perhaps the ethtool command results in a kernel message. Use dmesg to check.

Probably unrelated: Your unit file takes a parameter after the @ sign, but doesn't use that parameter. To remove complexity, don't put an @ in the unit file name.

Superblond 01-04-2021 11:10 AM

WOL working, but after boot settings gone or not accessable
 
Hey berndbausch!

Thx for your suggestions!

I did what you suggested and renamed the /system/wol@.service to /etc/systemd/system/wol.service
Yes, WOL is launching & working with the new wol.service, but only after the fresh install of the nic driver(!)
At 1st restart its gone & I cant access the wol-settings of my nic anymore...like before.


### here journalctl output ###
Code:

root@NAS:/lib/systemd/system-sleep# journalctl | grep wol
Jan 04 15:11:13 NAS.fritz.box systemd[1]: wol.service: Succeeded.

### and systemctl output ###
Code:

root@NAS:/lib/systemd/system-sleep# systemctl status wol 
* wol.service - Activate WOL on enp2s0 network card
  Loaded: loaded (/etc/systemd/system/wol.service; enabled; vendor preset: enabled)
  Active: inactive (dead) since Mon 2021-01-04 15:11:13 CET; 2h 21min ago
  Process: 1473 ExecStart=/usr/sbin/ethtool -s enp2s0 wol g (code=exited, status=0/SUCCESS)
 Main PID: 1473 (code=exited, status=0/SUCCESS)

Jan 04 15:11:13 NAS.fritz.box systemd[1]: Starting Activate WOL on enp2s0 network card...
Jan 04 15:11:13 NAS.fritz.box systemd[1]: wol.service: Succeeded.
Jan 04 15:11:13 NAS.fritz.box systemd[1]: Started Activate WOL on enp2s0 network card.

### checking with network manager ###
Code:

root@NAS:/lib/systemd/system-sleep# nmcli c show "Marvell 10GBE" | grep ethernet 
connection.type:                        802-3-ethernet
802-3-ethernet.port:                    --
802-3-ethernet.speed:                  0
802-3-ethernet.duplex:                  --
802-3-ethernet.auto-negotiate:          ja
802-3-ethernet.mac-address:            00:17:B6:00:52:CE
802-3-ethernet.cloned-mac-address:      --
802-3-ethernet.generate-mac-address-mask:--
802-3-ethernet.mac-address-blacklist:  --
802-3-ethernet.mtu:                    auto
802-3-ethernet.s390-subchannels:        --
802-3-ethernet.s390-nettype:            --
802-3-ethernet.s390-options:            --
802-3-ethernet.wake-on-lan:            magic
802-3-ethernet.wake-on-lan-password:


But I guess some other service, like ACPI, Systemd or openmediavault is kinda corrupting the settings while booting.

The thing is: After a fresh install & activation of the NIC-driver everything looks fine
- WOL is set to "d", but can be changes to "g" (magic packet)
- IPv4 & 6 there, open & close ports etc: ok
- 10GBE is available, performance good
- no errors no collisions, streaming of a 4k/Atmos movie file: perfect
- openmediavault is working perfectly

but on 1st boot all lost :-(

Idk, maybe the Marvell driver has a bug or wrong motherboard setting, maybe nic firmware update, wrong entries or setting in the ".conf files" for services

Will start a deep dive...

BTW: meanwhile I found like hundreds of unsolved WOL-related Posts in the internet for such an easy and normal thing to have... strange.

Thx & later
SB

jefro 01-04-2021 03:28 PM

Thoughts...

Does bios/uefi hold any setting for WOL or other wakes to include sleep modes?

Superblond 01-05-2021 04:41 AM

Hardware Bios supporting WOL -> OS is not triggering
 
3 Attachment(s)
Hi jefro, thx for your thoughts!

Yes the Bios of my motherboard IP35 pro support different WOL settings + Sx-Modes (primarily) for the Onboard-LAN NIC (s.attachment)

But I have disabled the Realtek Onboard-LAN and plugged a 10GBE PCI Marvell with AQN107-chipset in.
When I shutdown the Computer the NIC green LED in the back keeps on blinking, the orange stays on.

So I think the hardware is supporting WOL & waiting for a call from the OS, rep. Software.
The whole setup looks right, until I to use it, rep. shutdown and reboot...

Thx & l8
SB

Superblond 01-05-2021 04:34 PM

WOL working with these settings & parameters -> ACPI
 
Hello forum,
hello fellow readers,

my guess was that the interface between hard & software, i.e. drivers or frimware, or their settings prevent WOL from running and that der ACPI-Power options are interfering.

I have 1x gfx card and 1x nic in PCI-slots, so I did the below with partially success!
After "systemctl hibernate" or "suspend" I can wake up the system with a Magic Packet!

Problem: The system wakes up, tries a resume and somehow ends in a full reboot!

## checking ACPI conditionen, all ACPI settings disabled ##
Code:

nexus6@NAS:~$ sudo cat /proc/acpi/wakeup
Device        S-state          Status  Sysfs node
PCI0          S5        *disabled  no-bus:pci0000:00
PEX0          S5        *disabled  pci:0000:00:1c.0
PEX1          S5        *disabled
PEX2          S5        *disabled
PEX3          S5        *disabled
PEX4          S5        *disabled  pci:0000:00:1c.4
PEX5          S5        *disabled
HUB0          S5        *disabled  pci:0000:00:1e.0
UAR1          S5        *disabled
UAR2          S5        *disabled
IGBE          S5        *disabled
USB0          S3        *enabled  pci:0000:00:1d.0
USB1          S3        *enabled  pci:0000:00:1d.1
USB2          S3        *enabled  pci:0000:00:1d.2
USB3          S3        *enabled  pci:0000:00:1a.0
USB4          S3        *enabled  pci:0000:00:1a.1
USB5          S3        *enabled  pci:0000:00:1a.2
EHC1          S3        *enabled  pci:0000:00:1d.7
EHC2          S3        *enabled  pci:0000:00:1a.7
AZAL          S5        *disabled  pci:0000:00:1b.0

## On which PCI-Express slot is my ethernet adatpter / NIC? ##
Code:

nexus6@NAS:~$ sudo lspci -tv | grep -i ether
+-1c.0-[02]----00.0 Aquantia Corp. AQC107 NBase-T/IEEE 802.3bz Ethernet Controller [AQtion]

## OK, its PEX0 pci:0000:00:1c.0 but ACPI-"access" is disabled ##
## trying to enable wakeup setting ##
Code:

echo enabled > /sys/devices/pci0000:00/0000:00:1c.0/power/wakeup ## looks like both cmd doing the job
echo enabled > /sys/class/net/enp2s0/device/power/wakeup

## ok, check if its enabled now ##
Code:

root@NAS:~# cat /proc/acpi/wakeup
Device  S-state  Status  Sysfs node
PCI0      S5    *disabled  no-bus:pci0000:00
PEX0      S5    *enabled  pci:0000:00:1c.0
PEX1      S5    *disabled
snip...

## changes /etc/systemd/system/wol.service to ##
Code:

[Unit]
Description=Activate WOL on enp2s0 network card
After=network-online.target # network service started&online?

[Service]
Type=oneshot
ExecStart=/usr/sbin/ethtool -s enp2s0 wol g #set WOL to magic-packet

[Install]
WantedBy=basic.target


## put ACPI "enabled" in /etc/rc.local & /etc/init.d/rc.local
Code:

...snip

/usr/sbin/ethtool -s enp2s0 wol g # idk, just setting WOL for NIC here again ;-D
echo enabled > /sys/class/net/enp2s0/device/power/wakeup
echo PEX0 > /proc/acpi/wakeup  ## same as "echo enabled > /sys/devices/pci0000:00/0000:00:1c.0/power/wakeup"
echo PEX4 > /proc/acpi/wakeup  ## just in case I got the wrong PCI-slot
echo HUB0 > /proc/acpi/wakeup  ## USB-Hub(?) to test reactivate with usb mouse/keyboard

WOL is working
Resume ends in reboot

More work to do
SB

jefro 01-05-2021 07:11 PM

Does a normal resume from keyboard also reboot?

Superblond 01-11-2021 07:39 AM

WOL working with Image saving/loading via nomodeset resume=UUID=
 
2 Attachment(s)
Quote:

Originally Posted by jefro (Post 6204462)
Does a normal resume from keyboard also reboot?

Hi Jefro,
yes, the behavior with USB wake up was the same
...but I found a solution!

Solution:

I realized the reboot is the result of an not working wake up, beacause of an incomplete hibernation: the image of the hibernation status was not written, so without the last known status, there's no "wake up" possible, just a reboot with "last known good" settings!

Goal: force the a image-write to ram and to hard disk, maybe swap-partition on hibernate ...
and force a load of the image on wake up.

## show disks to potentially write the hibernate image too ##
Code:

root@NAS:~# lsblk --output NAME,FSTYPE,LABEL,UUID,MODE
NAME  FSTYPE LABEL UUID                                MODE
sda                                                      brw-rw----
|-sda1 ext4        1748b395-819b-4356-b2ad-0d2b697199a8 brw-rw----
|-sda2                                                  brw-rw----
|-sda5 ext4        f2a82520-6b55-4a76-b713-204b1655cdd6 brw-rw----
|-sda6 swap        377438db-9374-40a5-8730-0f5827a131ec brw-rw----
|-sda7 ext4        59361bac-5777-49fe-a8f5-8b0cba191153 brw-rw----
`-sda8 ext4        bc2befe7-2381-4302-b61f-9a4ebf2eaddc brw-rw----
sdb                                                      brw-rw----
`-sdb1 ext4  Video cd5c5260-e0e7-4cff-a7e5-0180323a1bce brw-rw----

OK, my swap-partition is sda6 and here I can see the UUID which I need for the next step.

The GRUB setting can be edited quite simply with the "GRUB Customizer", and/or set. I did it in the GUI via a VNC session, Not the best tool, but it works...
Code:

apt-get install grub-customizer
I added the "nomodeset"-cmd to grub-config with the UUID of the swap-partition:
https://www.linux-community.de/wp-co...gs-300x224.jpg

## after editing, the actual writing in in to GRUB ##
Code:

root@NAS:~# update-grub
## written in the /boot/grub/grub.cfg after that ##
## cat /boot/grub/grub.cfg ##
Code:

GRUB_CMDLINE_LINUX
acpi_osi=Linux nomodeset resume=UUID=377438db-9374-40a5-8730-0f5827a131ec

## or open the grub.cfg with an editor ##
Code:

...snip
        echo        'Linux 4.19.0-13-amd64 loading ...'
        linux        /boot/vmlinuz-4.19.0-13-amd64 root=UUID=1748b395-819b-4356-b2ad-0d2b697199a8 ro acpi_osi=Linux nomodeset resume=UUID=377438db-9374-40a5-8730-0f5827a131ec
        echo        'Initiale Ramdisk loading...'

...snip

## check: is it a actual setting now ##
[CODE]
root@NAS:~# cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-4.19.0-13-amd64 root=UUID=1748b395-819b-4356-b2ad-0d2b697199a8 ro acpi_osi=Linux nomodeset resume=UUID=377438db-9374-40a5-8730-0f5827a131ec
[CODE]

## check more ###
Code:

root@NAS:~# cat /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#  info -f grub -n 'Simple configuration'

GRUB_DEFAULT="0"
GRUB_TIMEOUT="5"
GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
GRUB_CMDLINE_LINUX_DEFAULT="nomodeset resume=UUID=377438db-9374-40a5-8730-0f5827a131ec"
GRUB_CMDLINE_LINUX="acpi_osi=Linux nomodeset resume=UUID=377438db-9374-40a5-8730-0f5827a131ec"

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL="console"

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE="640x480"

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID="true"

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
GRUB_DISABLE_SUBMENU="y"



## After editing, now force hibernation via CMD ##
Code:

root@NAS:~# systemctl hibernate
Please see attached pictures, I couldn't found the logs to copy from, so I took screenshots ;-D
System closes programs & some services, writes the image to ram and then to disk and then goes into hibernate.
On start the same thing vice versa...
You'll find you last cmd in the shell, open folders & files in GUI resp. VNC aso.!!!

So, this problem is solved (for me) and I will set it to SOLVED.

Thx for your help & participation
SB

jefro 01-11-2021 02:44 PM

Thanks for the update and solution.


All times are GMT -5. The time now is 10:26 AM.