An addition:
The manual network settings are not working on boot with the same error about failed to reset the dma, but it works after restarting network using:
netplan apply
Manually after the boot.
The log of netplan apply:
Apr 21 10:08:42 nanopi-m6 systemd-timesyncd[634]: Network configuration changed, trying to establish connection.
Apr 21 10:08:42 nanopi-m6 systemd-networkd[442]: /etc/systemd/network/00-armbian-readme.network:8: Not a valid hardware address, ignoring: NONE.ABCD.NONE
Apr 21 10:08:42 nanopi-m6 systemd-networkd[442]: /etc/systemd/network/00-armbian-readme.network:8: Not a valid hardware address, ignoring: #
Apr 21 10:08:42 nanopi-m6 systemd-networkd[442]: /etc/systemd/network/00-armbian-readme.network:8: Not a valid hardware address, ignoring: Will
Apr 21 10:08:42 nanopi-m6 systemd-networkd[442]: /etc/systemd/network/00-armbian-readme.network:8: Not a valid hardware address, ignoring: never
Apr 21 10:08:42 nanopi-m6 systemd-networkd[442]: /etc/systemd/network/00-armbian-readme.network:8: Not a valid hardware address, ignoring: match
Apr 21 10:08:42 nanopi-m6 systemd-networkd[442]: /etc/systemd/network/00-armbian-readme.network:8: Not a valid hardware address, ignoring: with
Apr 21 10:08:42 nanopi-m6 systemd-networkd[442]: /etc/systemd/network/00-armbian-readme.network:8: Not a valid hardware address, ignoring: anything
Apr 21 10:08:42 nanopi-m6 systemd-networkd[442]: /etc/systemd/network/00-armbian-readme.network: No valid settings found in the [Match] section, ignoring file. To match all interfaces, add Name=* in the [Match] section.
Apr 21 10:08:42 nanopi-m6 systemd-networkd[442]: lan: Reconfiguring with /run/systemd/network/10-netplan-lan.network.
Apr 21 10:08:42 nanopi-m6 kernel: rk_gmac-dwmac fe1c0000.ethernet lan: Register MEM_TYPE_PAGE_POOL RxQ-0
Apr 21 10:08:42 nanopi-m6 kernel: phy_rtl8211f_led_fixup in
Apr 21 10:08:42 nanopi-m6 kernel: phy_rtl8211f_led_fixup in val=0x0000
Apr 21 10:08:42 nanopi-m6 kernel: rk_gmac-dwmac fe1c0000.ethernet lan: PHY [stmmac-1:01] driver [RTL8211F Gigabit Ethernet] (irq=POLL)
Apr 21 10:08:42 nanopi-m6 kernel: dwmac4: Master AXI performs any burst length
Apr 21 10:08:42 nanopi-m6 kernel: rk_gmac-dwmac fe1c0000.ethernet lan: No Safety Features support found
Apr 21 10:08:42 nanopi-m6 kernel: rk_gmac-dwmac fe1c0000.ethernet lan: IEEE 1588-2008 Advanced Timestamp supported
Apr 21 10:08:42 nanopi-m6 kernel: rk_gmac-dwmac fe1c0000.ethernet lan: registered PTP clock
Apr 21 10:08:42 nanopi-m6 kernel: rk_gmac-dwmac fe1c0000.ethernet lan: FPE workqueue start
Apr 21 10:08:42 nanopi-m6 kernel: rk_gmac-dwmac fe1c0000.ethernet lan: configuring for phy/rgmii-rxid link mode
Apr 21 10:08:42 nanopi-m6 systemd-networkd[442]: enxXXXXXXXXXXXX: Reconfiguring with /run/systemd/network/10-netplan-all-eth-interfaces.network.
Apr 21 10:08:42 nanopi-m6 systemd-networkd[442]: enxXXXXXXXXXXXX: DHCP lease lost
Apr 21 10:08:42 nanopi-m6 dbus-daemon[697]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.2' (uid=998 pid=442 comm="/lib/systemd/systemd-networkd")
Apr 21 10:08:42 nanopi-m6 systemd-networkd[442]: enxXXXXXXXXXXXX: DHCPv6 lease lost
Apr 21 10:08:42 nanopi-m6 systemd[1]: Starting systemd-hostnamed.service - Hostname Service...
Apr 21 10:08:42 nanopi-m6 systemd-networkd[442]: lan: Link UP
Apr 21 10:08:42 nanopi-m6 systemd-networkd[442]: lan: Configuring with /run/systemd/network/10-netplan-lan.network.
Apr 21 10:08:42 nanopi-m6 systemd-networkd[442]: enxXXXXXXXXXXXX: Configuring with /run/systemd/network/10-netplan-all-eth-interfaces.network.
Apr 21 10:08:42 nanopi-m6 systemd[1]: netplan-ovs-cleanup.service - OpenVSwitch configuration for cleanup was skipped because of an unmet condition check (ConditionFileIsExecutable=/usr/bin/ovs-vsctl).
Apr 21 10:08:42 nanopi-m6 dbus-daemon[697]: [system] Successfully activated service 'org.freedesktop.hostname1'
Apr 21 10:08:42 nanopi-m6 systemd[1]: Started systemd-hostnamed.service - Hostname Service.
Apr 21 10:08:42 nanopi-m6 systemd-networkd[442]: Could not set hostname: Access denied
Apr 21 10:08:42 nanopi-m6 systemd-networkd[442]: enxXXXXXXXXXXXX: DHCPv4 address 10.42.0.11/24, gateway 10.42.0.1 acquired from 10.42.0.1
Apr 21 10:08:42 nanopi-m6 systemd-networkd[442]: Could not set hostname: Access denied
Apr 21 10:08:44 nanopi-m6 systemd-resolved[633]: Using degraded feature set UDP instead of UDP+EDNS0 for DNS server 10.42.0.1.
Apr 21 10:08:46 nanopi-m6 systemd-networkd[442]: lan: Gained carrier
Apr 21 10:08:46 nanopi-m6 kernel: rk_gmac-dwmac fe1c0000.ethernet lan: Link is Up - 1Gbps/Full - flow control rx/tx
Apr 21 10:08:46 nanopi-m6 kernel: IPv6: ADDRCONF(NETDEV_CHANGE): lan: link becomes ready
Apr 21 10:08:47 nanopi-m6 systemd-networkd[442]: lan: Gained IPv6LL
Full netplan config:
root@nanopi-m6:~# netplan get
network:
version: 2
renderer: networkd
ethernets:
all-eth-interfaces:
match:
name: "enx*"
dhcp4: true
dhcp6: false
ipv6-privacy: true
lan:
match:
name: "end*"
addresses:
- "10.42.1.11/24"
nameservers:
addresses:
- 10.42.1.1
dhcp4: false
dhcp6: false
routes:
- to: "default"
via: "10.42.1.1"
UPD:
It seems to be inconsistent.
On boot, if I run netplan apply, there are 3 different results at random:
- there is no error in the log and network interface is configured correctly
- there is 1 error about failed dma reset, but netplan retries automatically and succeeds in network interface configuration on second attempt:
rk_gmac-dwmac fe1c0000.ethernet: Failed to reset the dma
rk_gmac-dwmac fe1c0000.ethernet lan: stmmac_hw_setup: DMA engine initialization failed
rk_gmac-dwmac fe1c0000.ethernet lan: __stmmac_open: Hw setup failed
- there are 2 errors about failed dma reset and netplan don't retry anymore
If I rerun netplan apply after it fails with 2 errors, then the same 3 different results at random can repeat until it succeeds.
Once network interface is configured successfully, then further netplan apply commands won't fail anymore.