random-archer / mkinitcpio-systemd-tool

Provisioning tool for systemd in initramfs (systemd-tool)
https://www.archlinux.org/packages/community/any/mkinitcpio-systemd-tool/
Other
112 stars 27 forks source link

Wireless interface name not restored after initrd #86

Open FeralHedgehog opened 3 years ago

FeralHedgehog commented 3 years ago

Hello! After following Case: Wireless and adding iwlmvm to the MODULES array in mkinitcpio.conf remote unlocking works as expected, however the interface doesn't get renamed when the system continues booting with the following error:

systemd-udevd[414]: wlan0: Failed to rename network interface 2 from 'wlan0' to 'wlp1s0': Device or resource busy

This results in lack of network connectivity until iwlwifi is manually removed and then added again with modprobe.

I noticed that flushing and disabling the interface through the debug shell prevents the issue from occurring and that the initrd-network.service has them as ExecStop statements. These aren't executed however as the service remains active (exited) after initrd. Could this be the cause?

Thanks!

FeralHedgehog commented 3 years ago

Found a workaround: I copied the ExecStop lines from initrd-network.service to initrd-wifi.service. Since initrd-wifi shuts down correctly after initrd, the lines are executed and the interface gets renamed.