You are not logged in.

#1 2026-09-17 13:04:39

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 901

[netctl] netctl-ifplugd fails on resume from standby

I use netctl-ifplugd to manage the ethernet interface (external port on USB-C dongle). When I resume my laptop from standby the service fails to retrieve the ip address. Here's the full log:

$ sudo systemctl status netctl-ifplugd@eth0 -n 100
* netctl-ifplugd@eth0.service - Automatic wired network connection using netctl profiles
     Loaded: loaded (/usr/lib/systemd/system/netctl-ifplugd@.service; enabled; preset: disabled)
    Drop-In: /etc/systemd/system/netctl-ifplugd@.service.d
             `-override.conf
     Active: deactivating (stop-sigterm) (Result: exit-code) since Thu 2026-09-17 14:58:38 CEST; 51s ago
        Job: 4226
 Invocation: 80f0875f74734adc8bfa39ba3f303fb0
       Docs: man:netctl.special(7)
    Process: 69719 ExecStop=/usr/bin/ifplugd -i eth0 -k -W (code=exited, status=6)
   Main PID: 993 (ifplugd)
     Status: "online"
      Tasks: 1 (limit: 18718)
     Memory: 2.3M (peak: 11.3M)
        CPU: 331ms
     CGroup: /system.slice/system-netctl\x2difplugd.slice/netctl-ifplugd@eth0.service
             `-993 /usr/bin/ifplugd -i eth0 -r /etc/ifplugd/netctl.action -d 0 -bfIns

set 17 08:20:29 stryke systemd[1]: Starting Automatic wired network connection using netctl profiles...
set 17 08:20:30 stryke ifplugd[993]: ifplugd 0.28 initializing.
set 17 08:20:30 stryke ifplugd[993]: Using interface eth0/00:E0:4C:A2:02:4E with driver <r8152> (version: 7.2.4-arch1-2)
set 17 08:20:30 stryke ifplugd[993]: Using detection mode: SIOCETHTOOL
set 17 08:20:30 stryke ifplugd[993]: Initialization complete, link beat not detected.
set 17 08:20:34 stryke ifplugd[993]: Link beat detected.
set 17 08:20:35 stryke ifplugd[993]: Executing '/etc/ifplugd/netctl.action eth0 up'.
set 17 08:20:35 stryke ifplugd[993]: client: Starting network profile 'ethernet'...
set 17 08:20:35 stryke dhcpcd[1276]: dhcpcd-10.5.2 starting
set 17 08:20:35 stryke dhcpcd[1279]: DUID 00:01:00:01:32:20:c2:3a:9c:b6:d0:be:bd:8d
set 17 08:20:35 stryke dhcpcd[1279]: eth0: IAID 4c:a2:02:4e
set 17 08:20:35 stryke dhcpcd[1279]: eth0: soliciting a DHCP lease
set 17 08:20:35 stryke dhcpcd[1279]: eth0: offered 192.168.178.22 from 192.168.178.1
set 17 08:20:35 stryke dhcpcd[1279]: eth0: probing address 192.168.178.22/24
set 17 08:20:41 stryke dhcpcd[1279]: eth0: leased 192.168.178.22 for 864000 seconds
set 17 08:20:41 stryke dhcpcd[1279]: eth0: adding route to 192.168.178.0/24
set 17 08:20:41 stryke dhcpcd[1279]: eth0: adding default route via 192.168.178.1
set 17 08:20:42 stryke ifplugd[993]: client: Started network profile 'ethernet'
set 17 08:20:45 stryke systemd[1]: Started Automatic wired network connection using netctl profiles.
set 17 14:58:37 stryke dhcpcd[1279]: eth0: carrier lost
set 17 14:58:37 stryke dhcpcd[1279]: eth0: deleting route to 192.168.178.0/24
set 17 14:58:37 stryke dhcpcd[1279]: eth0: deleting default route via 192.168.178.1
set 17 14:58:38 stryke systemd[1]: Stopping Automatic wired network connection using netctl profiles...
set 17 14:58:38 stryke ifplugd[993]: Killing child.
set 17 14:58:41 stryke dhcpcd[1279]: eth0: carrier acquired
set 17 14:58:41 stryke dhcpcd[1279]: eth0: IAID 4c:a2:02:4e
set 17 14:58:43 stryke dhcpcd[1279]: eth0: rebinding lease of 192.168.178.22
set 17 14:58:43 stryke dhcpcd[1279]: eth0: probing address 192.168.178.22/24
set 17 14:58:44 stryke ifplugd[69719]: Failed to kill daemon. (Timer expired)
set 17 14:58:44 stryke dhcpcd[1279]: received SIGTERM, stopping
set 17 14:58:44 stryke ifplugd[993]: Killing child.
set 17 14:58:44 stryke systemd[1]: netctl-ifplugd@eth0.service: Control process exited, code=exited, status=6/NOTCONFIGURED
set 17 14:58:44 stryke dhcpcd[1279]: eth0: removing interface
set 17 14:58:44 stryke dhcpcd[1279]: script_status: /usr/lib/dhcpcd/dhcpcd-run-hooks: Terminated
set 17 14:58:44 stryke dhcpcd[1279]: dhcpcd exited
set 17 14:58:44 stryke ifplugd[993]: Program executed successfully.

I don't know how to debug this, so any help is appreciated.

Offline

#2 Yesterday 06:40:01

-thc
Member
Registered: 2017-03-15
Posts: 1,199

Re: [netctl] netctl-ifplugd fails on resume from standby

Your "full log" shows that ifplugd starts correctly (08:20:30) and the plugged in Ethernet is set up correctly (08:20:45).

All following events (14:58:37) lead to pure guesswork. Please post a link to a full system log - beginning with the pre-standby actions or a few seconds before initiating the standby.

Do you leave the Ethernet cable attached during standby?

Last edited by -thc (Yesterday 06:40:45)

Offline

#3 Yesterday 10:22:16

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 901

Re: [netctl] netctl-ifplugd fails on resume from standby

Here is dmesg from the same situation happened this morning (I omit most of the boot log since I guess it's not relevant):

[    9.936599] usbcore: registered new interface driver snd-usb-audio
[    9.993715] r8152-cfgselector 4-1.4: reset SuperSpeed USB device number 3 using xhci_hcd
[   10.052869] usbcore: registered new interface driver r8152
[   10.060677] usbcore: registered new interface driver cdc_ether
[   10.063914] usbcore: registered new interface driver r8153_ecm
[   10.192374] Bluetooth: hci0: using NVM file: qca/nvm_usb_00000302.bin
[   10.215717] Bluetooth: hci0: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported.
[   10.314946] msr: Write to unrecognized MSR 0x150 by intel-undervolt (pid: 1092), tainting CPU_OUT_OF_SPEC.
[   10.314950] msr: See https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/about for details.
[   13.684220] logitech-hidpp-device 0003:046D:4091.0005: HID++ 4.5 device connected.
[   13.706404] r8152 4-1.4:1.0 eth0: carrier on
[   15.310526] 8021q: 802.1Q VLAN Support v1.8
[   22.441162] warning: `kdeconnectd' uses wireless extensions which will stop working for Wi-Fi 7 hardware; use nl80211
[  829.175948] PM: suspend entry (deep)
[  829.386319] Filesystems sync: 0.210 seconds
[  829.390308] Freezing user space processes
[  829.391691] Freezing user space processes completed (elapsed 0.001 seconds)
[  829.391695] OOM killer disabled.
[  829.391696] Freezing remaining freezable tasks
[  829.392974] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
[  829.393015] printk: Suspending console(s) (use no_console_suspend to debug)
[  830.716967] ACPI: EC: interrupt blocked
[  830.767277] ACPI: PM: Preparing to enter system sleep state S3
[  830.774418] ACPI: EC: event blocked
[  830.774420] ACPI: EC: EC stopped
[  830.774421] ACPI: PM: Saving platform NVS memory
[  830.774497] Disabling non-boot CPUs ...
[  830.775119] ACPI Error: AE_BAD_PARAMETER, Returned by Handler for [EmbeddedControl] (20260408/evregion-303)
[  830.775130] ACPI Error: Aborting method \_SB.PCI0.LPCB.ECDV.ECR1 due to previous error (AE_BAD_PARAMETER) (20260408/psparse-543)
[  830.775138] ACPI Error: Aborting method \_SB.PCI0.LPCB.ECDV.ECR2 due to previous error (AE_BAD_PARAMETER) (20260408/psparse-543)
[  830.775144] ACPI Error: Aborting method \ECRW due to previous error (AE_BAD_PARAMETER) (20260408/psparse-543)
[  830.775149] ACPI Error: Aborting method \ECGD due to previous error (AE_BAD_PARAMETER) (20260408/psparse-543)
[  830.775156] ACPI Error: Aborting method \NEVT due to previous error (AE_BAD_PARAMETER) (20260408/psparse-543)
[  830.776224] smpboot: CPU 11 is now offline
[  830.776226] ACPI Error: Aborting method \_SB.PCI0.LPCB.ECDV._Q66 due to previous error (AE_BAD_PARAMETER) (20260408/psparse-543)
[  830.778662] smpboot: CPU 10 is now offline
[  830.781557] smpboot: CPU 9 is now offline
[  830.783821] smpboot: CPU 8 is now offline
[  830.786597] smpboot: CPU 7 is now offline
[  830.789414] smpboot: CPU 6 is now offline
[  830.791535] smpboot: CPU 5 is now offline
[  830.793823] smpboot: CPU 4 is now offline
[  830.795959] smpboot: CPU 3 is now offline
[  830.798504] smpboot: CPU 2 is now offline
[  830.800799] smpboot: CPU 1 is now offline
[  830.805123] ACPI: PM: Low-level resume complete
[  830.805202] ACPI: EC: EC started
[  830.805203] ACPI: PM: Restoring platform NVS memory
[  830.806267] Enabling non-boot CPUs ...
[  830.806299] smpboot: Booting Node 0 Processor 1 APIC 0x2
[  830.807343] CPU1 is up
[  830.807359] smpboot: Booting Node 0 Processor 2 APIC 0x4
[  830.808006] CPU2 is up
[  830.808021] smpboot: Booting Node 0 Processor 3 APIC 0x6
[  830.808682] CPU3 is up
[  830.808695] smpboot: Booting Node 0 Processor 4 APIC 0x8
[  830.809391] CPU4 is up
[  830.809406] smpboot: Booting Node 0 Processor 5 APIC 0xa
[  830.810111] CPU5 is up
[  830.810129] smpboot: Booting Node 0 Processor 6 APIC 0x1
[  830.810987] CPU6 is up
[  830.811003] smpboot: Booting Node 0 Processor 7 APIC 0x3
[  830.811742] CPU7 is up
[  830.811757] smpboot: Booting Node 0 Processor 8 APIC 0x5
[  830.812513] CPU8 is up
[  830.812530] smpboot: Booting Node 0 Processor 9 APIC 0x7
[  830.813297] CPU9 is up
[  830.813311] smpboot: Booting Node 0 Processor 10 APIC 0x9
[  830.814094] CPU10 is up
[  830.814108] smpboot: Booting Node 0 Processor 11 APIC 0xb
[  830.814908] CPU11 is up
[  830.818474] ACPI: PM: Waking up from system sleep state S3
[  832.363767] ACPI: EC: interrupt unblocked
[  832.384699] ACPI: EC: event unblocked
[  832.385024] xhci_hcd 0000:3a:00.0: xHC error in resume, USBSTS 0x411, Reinit
[  832.385028] usb usb3: root hub lost power or was reset
[  832.385029] usb usb4: root hub lost power or was reset
[  832.385642] i915 0000:00:02.0: vgaarb: VGA decodes changed: olddecodes=io,decodes=io:owns=io+mem
[  832.398172] nvme nvme0: 12/0/0 default/read/poll queues
[  832.663350] usb 1-12: reset high-speed USB device number 9 using xhci_hcd
[  832.689034] ata3: SATA link down (SStatus 4 SControl 300)
[  832.762199] usb 4-1: reset SuperSpeed USB device number 2 using xhci_hcd
[  832.898804] usb 1-1: reset high-speed USB device number 2 using xhci_hcd
[  833.248650] r8152-cfgselector 4-1.4: reset SuperSpeed USB device number 3 using xhci_hcd
[  833.265947] r8152 4-1.4:1.0: skip request firmware
[  833.319575] usb 1-1.1: reset full-speed USB device number 4 using xhci_hcd
[  833.477693] usb 1-1.2: reset full-speed USB device number 6 using xhci_hcd
[  833.600354] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_ops [i915])
[  833.603790] OOM killer enabled.
[  833.603797] Restarting tasks: Starting
[  833.608447] Restarting tasks: Done
[  833.608457] efivarfs: resyncing variable state
[  833.700524] efivarfs: finished resyncing variable state
[  833.700541] random: crng reseeded on system resumption
[  833.739689] PM: suspend exit
[  834.244803] filter_write: 9 callbacks suppressed
[  834.244807] msr: Write to unrecognized MSR 0x150 by intel-undervolt (pid: 5830), tainting CPU_OUT_OF_SPEC.
[  834.244811] msr: See https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/about for details.
[  834.454107] pci_bus 0000:04: Allocating resources
[  834.454129] pci_bus 0000:3a: Allocating resources
[  834.454206] pci_bus 0000:04: Allocating resources
[  834.454219] pci_bus 0000:3a: Allocating resources
[  837.283988] r8152 4-1.4:1.0 eth0: carrier on
[  886.087552] r8152 4-1.4:1.0 eth0: carrier off
[  893.797113] r8152 4-1.4:1.0 eth0: carrier on

I don't know if this kind of log is useful, I can provide others if needed. Thank you.

Edit: the cable is always plugged in.

Last edited by snack (Yesterday 10:22:56)

Offline

#4 Yesterday 12:16:10

-thc
Member
Registered: 2017-03-15
Posts: 1,199

Re: [netctl] netctl-ifplugd fails on resume from standby

snack wrote:

Edit: the cable is always plugged in.

Why are you using ifplugd? That service is for meant for "Ethernet not always connected" scenarios.

Please post your complete system journal for a boot covering the failed suspend:

sudo journalctl -b | nc termbin.com 9999

Offline

#5 Yesterday 12:22:04

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 901

Re: [netctl] netctl-ifplugd fails on resume from standby

I use ifplugd because it's my laptop and from time to time I need to unplug it. The "cable is always plugged in" meant that I did not unplug it during standby.

$ sudo journalctl -b | nc termbin.com 9999
https://termbin.com/wpie

Offline

#6 Yesterday 12:45:09

-thc
Member
Registered: 2017-03-15
Posts: 1,199

Re: [netctl] netctl-ifplugd fails on resume from standby

Immediately after resume systemd tries stopping ifplugd

set 18 14:13:32 stryke systemd-sleep[14711]: System returned from sleep operation 'suspend'.
set 18 14:13:32 stryke kernel: PM: suspend exit
set 18 14:13:32 stryke systemd[1]: Stopping Automatic wired network connection using netctl profiles...
set 18 14:13:32 stryke ifplugd[6788]: Killing child.

This runs into a timeout 6 seconds later while dhcpd as a child of ifplugd already tries to renew the lease

set 18 14:13:36 stryke dhcpcd[6881]: eth0: carrier acquired
set 18 14:13:36 stryke kernel: r8152 4-1.4:1.0 eth0: carrier on
set 18 14:13:36 stryke Discord[1786]: 14:13:36.153 › [GatewaySocket] Connection has reset backoff for reason: network detected online.
set 18 14:13:36 stryke Discord[1786]: 14:13:36.153 › [GatewaySocket] Setting connection state to CONNECTING
set 18 14:13:36 stryke Discord[1786]: 14:13:36.153 › [GatewaySocket] [CONNECT] wss://gateway.discord.gg, encoding: etf, version: 9, compression: zstd-stream
set 18 14:13:36 stryke dhcpcd[6881]: eth0: IAID 4c:a2:02:4e
set 18 14:13:36 stryke Discord[1786]: 14:13:36.155 › [GatewaySocket] Setting connection state to WILL_RECONNECT
set 18 14:13:36 stryke Discord[1786]: 14:13:36.156 › [GatewaySocket] [WS CLOSED] (false, 0, An error with the websocket occurred) retrying in 2.09 seconds.
set 18 14:13:36 stryke Discord[1786]: 14:13:36.795 › [WindowVisibilityVideoManager] Incoming video enabled changed, incomingVideoEnabled = false
set 18 14:13:37 stryke dhcpcd[6881]: eth0: rebinding lease of 192.168.178.22
set 18 14:13:37 stryke dhcpcd[6881]: eth0: probing address 192.168.178.22/24
set 18 14:13:38 stryke ifplugd[14885]: Failed to kill daemon. (Timer expired)
set 18 14:13:38 stryke ifplugd[6788]: Killing child.
set 18 14:13:38 stryke systemd[1]: netctl-ifplugd@eth0.service: Control process exited, code=exited, status=6/NOTCONFIGURED
set 18 14:13:38 stryke dhcpcd[6881]: received SIGTERM, stopping
set 18 14:13:38 stryke dhcpcd[6881]: eth0: removing interface
set 18 14:13:38 stryke dhcpcd[6881]: script_status: /usr/lib/dhcpcd/dhcpcd-run-hooks: Terminated
set 18 14:13:38 stryke dhcpcd[6881]: dhcpcd exited
set 18 14:13:38 stryke ifplugd[6788]: Program executed successfully.

The only thing remarkable for me is the fact that there seem to be two instances of ifplugd running. Is it possible that ifplugd runs as a service and systemd tries to start a second instance?

This looks to me like netctl/ifplugd is not build for suspend/resume scenarios. But I'm not a developer.

Last edited by -thc (Yesterday 12:46:54)

Offline

#7 Yesterday 12:47:21

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 901

Re: [netctl] netctl-ifplugd fails on resume from standby

I'm sure it worked up to some time ago, so maybe it's a regression. I'll open an issue for netctl-ifplugd on Gitlab, thank you.

Offline

#8 Yesterday 14:34:19

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,854

Re: [netctl] netctl-ifplugd fails on resume from standby

What happens if you disable netctl-auto ?

Offline

#9 Yesterday 14:40:51

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 901

Re: [netctl] netctl-ifplugd fails on resume from standby

seth wrote:

What happens if you disable netctl-auto ?

Well I have a udev rule that enables netctl-auto when the ethernet cable is disconnected and vice-versa; maybe it interferes with the resume procedure. I'll take a look later and will let you know, thanks for the tip.

Offline

Board footer

Powered by FluxBB