Closed andruska closed 1 year ago
At first glance, the difference between 252 and 253 system logs is that 253 shows:
Mar 04 00:01:11 book systemd-networkd[320]: profile: Unmanaging interface. ← wireguard profile
Mar 04 00:01:11 book systemd-networkd[320]: enp0s31f6: Unmanaging interface.
Mar 04 00:01:11 book systemd-networkd[320]: lo: Unmanaging interface.
The log and your comment in the above suggest that you do not use networkd to manage the WireGuard interface, that is, you have no .network or .netdev file for the WireGuard interface. Right? (If so, I guess this is not a bug in networkd, but you also said downgrading systemd to v252 fixes the issue. hmm...)
Could you enable to generate debugging logs of networkd by creating the following drop-in:
# /etc/systemd/system/systemd-networkd.service.d/override.conf
[Service]
Environment=SYSTEMD_LOG_LEVEL=debug
then, please provide the generated logs.
you also said downgrading systemd to v252 fixes the issue. hmm...
Thats was the reason, I reported this to systemd. At first I also thought that the problem was something else. But systemd downgrade solved this problem.
you do not use networkd to manage the WireGuard interface, that is, you have no .network or .netdev file for the WireGuard interface. Right?
Yes, this is intentional to separate handling of wireguard from systemd-networkd. This allows me to easily toggle the wireguard on and off.
Still not sure why it does not work, but should be caused by a39a9ac8065c29330207838b70fe388bde2bc254...
Ah, maybe this one.
Mar 04 04:08:57 Elitebook systemd-networkd[328]: Removing foreign routing policy rule (configured,marked): priority: 32764, 0.0.0.0/0 -> 0.0.0.0/0, iif: n/a, oif: n/a, table: main(25>
Mar 04 04:08:57 Elitebook systemd-networkd[328]: Removing foreign routing policy rule (configured,marked): priority: 32765, 0.0.0.0/0 -> 0.0.0.0/0, iif: n/a, oif: n/a, table: 51820
Mar 04 04:08:57 Elitebook systemd-networkd[328]: Removing foreign routing policy rule (configured,marked): priority: 32765, ::/0 -> ::/0, iif: n/a, oif: n/a, table: 51820
Mar 04 04:08:57 Elitebook systemd-networkd[328]: Removing foreign routing policy rule (configured,marked): priority: 32764, ::/0 -> ::/0, iif: n/a, oif: n/a, table: main(254)
I guess, wg service creates routing policy rules, and networkd removes them on after sleep. That should also happen when simply calling networkctl reconfigure UNMANAGED_INTERFACE
. Unfortunately, this cannot be fixed (but see the last sentence), as routing policy rules are kind of global setting, and we cannot support multiple services manage it simultaneously.
So, please use ManageForeignRoutingPolicyRules=no
in /etc/systemd/networkd.conf.
Let's close this, at least tentatively, as there is nothing we can do.
@andruska Feel free to request to reopen this if ManageForeignRoutingPolicyRules=no
does not work for you.
Works, thanks !
Let's close this, at least tentatively, as there is nothing we can do.
@andruska Feel free to request to reopen this if
ManageForeignRoutingPolicyRules=no
does not work for you.
Hello. I have a similar problem and I edited the networkd.conf file, but it didn't help. After waking up from sleep mode, I still have to reconnect the VPN. Are there any other tips for fixing this?
systemd version the issue has been seen with
253
Used distribution
Archlinux
Linux kernel version used
6.0.8, 6.1.12, 6.2.1
CPU architectures issue was seen on
x86_64
Component
other
Expected behaviour you didn't see
No response
Unexpected behaviour you saw
After upgrading
systemd
from 252 to 253Wireguard
stopped resuming from sleep (suspend, hibernation) cycle.journalctl -u wg-quick@profile.service
shows exactly same state as it was before sleep. I getWireguard
back restartingwg-quick
service bysystemctl restart wg-quick@profile.service
.For networking i use
systemd-networkd
,systemd-resolved
,iwd
,wg-quick
. Tested with kernels 6.0.8, 6.1.12, 6.2.1.Downgrading to 252 Wireguard works again as expected.
Steps to reproduce the problem
Configurations:
Additional program output to the terminal or log subsystem illustrating the issue