Usb ethernet adapter doesn't start at boot time

Hello.

I’m facing a problem with my network, I’m using a usb to ethernet adapter and every time my system boots the network via usb is down, but the WIFI works well, I always have to make “rcnetwork restart” and then everything gets well.

This is the adapter:
imagen

#> lsusb
Bus 002 Device 003: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet

#> uname -a
Linux arantinga 6.3.2-1-default #1 SMP PREEMPT_DYNAMIC Mon May 15 15:59:38 UTC 2023 (70ea6f6) x86_64 x86_64 x86_64 GNU/Linux

Thanks in advance

Reboot, run rcnetwork restart and provide full output as root of

journalctl -b --no-pager --full

Upload to https://susepaste.org/

Thanks for you quick aswer,

here is openSUSE Paste

Did you try to wait without restarting NetworkManager?

may 25 22:17:00 localhost.localdomain NetworkManager[1735]: <info>  [1685045820.0760] device (enp0s20f0u2u4c2): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
...
may 25 22:17:00 localhost.localdomain NetworkManager[1735]: <info>  [1685045820.0775] settings: (enp0s20f0u2u4c2): created default wired connection 'Conexión cableada 1'
...
may 25 22:17:24 localhost.localdomain systemd[1]: Started Network Manager.
...
may 25 22:17:24 localhost.localdomain NetworkManager[4308]: <info>  [1685045844.2988] manager: (enp0s20f0u2u4c2): new Ethernet device (/org/freedesktop/NetworkManager/Devices/3)
may 25 22:17:24 localhost.localdomain NetworkManager[4308]: <info>  [1685045844.2990] device (enp0s20f0u2u4c2): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
...
may 25 22:17:24 localhost.localdomain kernel: IPv6: ADDRCONF(NETDEV_CHANGE): enp0s20f0u2u4c2: link becomes ready
may 25 22:17:24 localhost.localdomain NetworkManager[4308]: <info>  [1685045844.3489] device (enp0s20f0u2u4c2): carrier: link connected
may 25 22:17:24 localhost.localdomain NetworkManager[4308]: <info>  [1685045844.3490] device (enp0s20f0u2u4c2): state change: unavailable -> disconnected (reason 'carrier-changed', sys-iface-state: 'managed')
may 25 22:17:24 localhost.localdomain NetworkManager[4308]: <info>  [1685045844.3494] policy: auto-activating connection 'Conexión cableada 1' (4c970bc3-93d0-3ec9-b017-b4ce686477c5)
may 25 22:17:24 localhost.localdomain NetworkManager[4308]: <info>  [1685045844.3497] device (enp0s20f0u2u4c2): Activation: starting connection 'Conexión cableada 1' (4c970bc3-93d0-3ec9-b017-b4ce686477c5)

So NetworkManagrer detects device on boot, and later when you restart it waits for carrier. May be device needs time to detect carrier?

Thanks for your answer.

I’ve waited up to 10 minutes and nothing :sob:

Try enabling additional NetworkManager logs. Create file /etc/NetworkManager/conf.d/debug.conf with the content

[logging]
level=TRACE
domains=ALL

reboot and capture journalctl output.

I noticed after enabling debug mode, the PC booted and enable the device fine, after the second reboot it didn’t work again, so I’ll attach the journalctl output of both cases.

fine way:
https://paste.opensuse.org/pastes/e2c37b55c97a

wrong way:
https://paste.opensuse.org/pastes/dc957eb52bc8

Thanks again!

The only difference between two that I can see - in the working case interface is renamed before NetworkManager is started. Which matches what we already know - restarting NetworkManager after interface was renamed works too.

For testing you could try making NetworkManager to wait for the interface.

mkdir -p /etc/systemd/system/NetworkManager.service.d
cat << EOF > /etc/systemd/system/NetworkManager.service.d/wait-for-USB.conf
[Unit]
After=sys-subsystem-net-devices-enp0s20f0u2u4c2.device
EOF

You can remove NetworkManager debug config to avoid too much noise in logs. Try rebooting several times with the above drop-in.

Still not working :sob:, here the log:

https://paste.opensuse.org/pastes/86b7076e8a94

Thanks again for your reply and your time

Show

systemctl --no-pager cat NetworkManager.service 
systemctl --no-pager show -p After NetworkManager.service
systemctl --no-pager -t device --full

Here is:

systemctl --no-pager cat NetworkManager.service
https://paste.opensuse.org/pastes/b8a67d485f1c

systemctl --no-pager show -p After NetworkManager.service
https://paste.opensuse.org/pastes/7e2dac32b78c

systemctl --no-pager -t device --full
https://paste.opensuse.org/pastes/6c80f4006816

Thanks