0

I'm trying to get wake on lan to work. Everything is configured as needed and it works if I switch of my computer and wake it within a few minutes. As far as I understand the problem it is a router issue, the router seems to forget the mac address and stops to forward the magic-packet. Are there any possibilities to force the router to not forget the route to the computer? (I did look into the router but I can't find any more options that could be connected with the problem. It is a poorly documented Sagemcom Fibre router.)

Ubuntu 20.04

uname -r

5.11.0-34-generic

sudo lshw -C network

*-network                 
       Beschreibung: Ethernet interface
       Produkt: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       Hersteller: Realtek Semiconductor Co., Ltd.
       Physische ID: 0
       Bus-Informationen: pci@0000:03:00.0
       Logischer Name: enp3s0
       Version: 0c
       Seriennummer: bc:ee:7b:8a:6e:f9
       Größe: 1Gbit/s
       Kapazität: 1Gbit/s
       Breite: 64 bits
       Takt: 33MHz
       Fähigkeiten: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       Konfiguration: autonegotiation=on broadcast=yes driver=r8169 driverversion=5.11.0-34-generic duplex=full firmware=rtl8168g-2_0.0.1 02/06/13 ip=192.168.1.22 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
       Ressourcen: irq:18 ioport:e000(Größe=256) memory:f7c00000-f7c00fff memory:f0000000-f0003fff
~$ dkms status
r8168, 8.048.00, 5.11.0-34-generic, x86_64: installed
~$ ls -al /boot
insgesamt 201001
drwxr-xr-x  5 root root     4096 Sep 14 06:14 .
drwxr-xr-x 20 root root     4096 Mai  4  2020 ..
-rw-r--r--  1 root root   253507 Aug 27 09:43 config-5.11.0-34-generic
drwx------  4 root root      512 Jan  1  1970 efi
drwxr-xr-x  4 root root     4096 Sep 13 20:17 grub
lrwxrwxrwx  1 root root       28 Sep  9 08:39 initrd.img -> initrd.img-5.11.0-34-generic
-rw-------  1 root root 94605589 Sep 14 06:14 initrd.img-5.11.0-34-generic
-rw-------  1 root root 94392894 Sep 14 06:13 initrd.img-5.11.0-34-generic.old-dkms
lrwxrwxrwx  1 root root       28 Sep 13 20:17 initrd.img.old -> initrd.img-5.11.0-34-generic
drwx------  2 root root    16384 Mai  4  2020 lost+found
-rw-r--r--  1 root root   182704 Aug 18  2020 memtest86+.bin
-rw-r--r--  1 root root   184380 Aug 18  2020 memtest86+.elf
-rw-r--r--  1 root root   184884 Aug 18  2020 memtest86+_multiboot.bin
-rw-------  1 root root  5836236 Aug 27 09:43 System.map-5.11.0-34-generic
lrwxrwxrwx  1 root root       25 Sep  9 08:39 vmlinuz -> vmlinuz-5.11.0-34-generic
-rw-------  1 root root 10132256 Aug 27 09:48 vmlinuz-5.11.0-34-generic
lrwxrwxrwx  1 root root       25 Sep 13 20:17 vmlinuz.old -> vmlinuz-5.11.0-34-generic

  • It is the following: https://support.sagemcom.com/fr/haut-debit/fast-5688s-sunrise.

    A sgtatic IP is assigned and port forwarding configured.

    As said it works in principle, but the router stops sending the package after a few minutes.

    – dkkkkful Sep 09 '21 at 14:18
  • What version Ubuntu? Show me uname -r and sudo lshw -C network. Start comments to me with @heynnema or I'll miss them. – heynnema Sep 09 '21 at 19:39
  • @heynnema I added the information in the question. – dkkkkful Sep 10 '21 at 09:39

1 Answers1

1

One of these should probably solve the problem. Only do one at a time, then retest.

  1. r8168-dkms

Try replacing the r8169 driver with this driver...

sudo apt update

sudo apt install dkms r8168-dkms

reboot

  1. WOL

Open terminal

nm-connection-editor

Check these settings...

enter image description here

  1. MSI

MSI/MSIX interrupts were enabled for certain ethernet cards in Ubuntu 20.xx. This can cause intermittent ethernet operation. Here's a patch to fix it. Follow the embedded instructions to install.

#!/bin/sh

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1779817

filename: r8169_disable_msi

Drop it in /etc/initramfs-tools/scripts/init-top and chmod a+x it. Add 'r8169_disable_msi'

to your kernel command line (/etc/default/grub, GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

usually.)

sudo -H gedit /etc/default/grub # to edit the file

Remember to update-initramfs and update-grub as necessary.

sudo update-initramfs -c -k $(uname -r)

sudo update-grub

reboot

For the moment it disables MSI on everything with the ID 0x10ec:0x8168, as there seems to

be no way to get the MAC version from userspace - and certainly not before the driver is

loaded. Other PCI IDs may need adding..

PREREQ="" prereqs() { echo "$PREREQ" } case $1 in

get pre-requisites

prereqs) prereqs exit 0 ;; esac

disable_msi () { for i in /sys/bus/pci/devices/*; do if [ $(cat $i/vendor) = "0x10ec" -a $(cat $i/device) = "0x8168" ]; then echo 0 >$i/msi_bus fi done }

for x in $(cat /proc/cmdline); do case ${x} in r8169_disable_msi) disable_msi break ;; esac done

heynnema
  • 70,711
  • I tried the first and got an error: DKMS: uninstall completed. Error! Problems with mkinitrd detected. Automatically uninstalling this module. DKMS: Install Failed (mkinitrd problems). Module rolled back to built state. dpkg: Fehler beim Bearbeiten des Paketes r8168-dkms (--configure): »installiertes r8168-dkms-Skript des Paketes post-installation«-Unterprozess ga b den Fehlerwert 7 zurück Trigger für man-db (2.9.1-1) werden verarbeitet ... Fehler traten auf beim Bearbeiten von: r8168-dkms E: Sub-process /usr/bin/dpkg returned an error code (1) – dkkkkful Sep 13 '21 at 18:10
  • @dkkkkful Edit your question and show me dkms status and ls -al /boot. – heynnema Sep 13 '21 at 18:15
  • this is weird, I tried a second time and as far as I know it did work this time (informations above). Unfortunately it doesn't seem to have an effect. It works for a few minutes and then stopps. Then I "tried" your second solution and I don't seem to have a internet connection. The window that opens is just empty. I do have internet, but it looks like there is no conjnection to be edited. – dkkkkful Sep 14 '21 at 05:52
  • @dkkkkful Boot to a Ubuntu Live DVD/USB and see if ethernet works reliably there. If so, reinstall Ubuntu. – heynnema Sep 14 '21 at 13:18
  • @dkkkkful Status please... – heynnema Sep 19 '21 at 13:24
  • excuse me, I had a lot going on. Ethernet works reliable, that is not the problem. By now I tried 1 and 2: no change. WOL works for a few minutes after switching of the computer, after that it stops working. If the computer is switched of it seems to communicate with the router, the led is blinking from time to time. – dkkkkful Sep 20 '21 at 16:01
  • @dkkkkful Did you try booting to a Ubuntu Live DVD/USB as I suggested? – heynnema Sep 20 '21 at 20:36
  • yes I did it looks the same, I think a wired connection is usually not managed by the computer, therefore it is "unmanaged" and you cann't edit it. I did try to create a connection, which worked for a few reboots (wol behavior did not change) and then disapeared again. – dkkkkful Oct 04 '21 at 09:53
  • @dkkkkful If you're saying that you had the same problems when booted to the Ubuntu Live USB, then the problem is not with your Ubuntu software installation, but probably a hardware problem... internal with the ethernet card.... or external with the cabling/etc. – heynnema Oct 04 '21 at 11:07