[Networkmanager] "device is strictly unmanaged"

Christian Schaubschläger christian.schaubschlaeger at gmx.at
Tue May 16 07:43:38 UTC 2023

Sorry for being unprecise.
I got this list from calling

udevadm monitor -u -k

udev version is eudev-3.2.9
Apparently there are no udev events, only kernel events.

Thanks and best regards,

Am 16.05.23 um 09:33 schrieb Andrei Borzenkov:
> On Tue, May 16, 2023 at 10:19 AM Christian Schaubschläger
> <christian.schaubschlaeger at gmx.at> wrote:
>> Good morning,
>> thanks for your quick response and for the pointer to udev; I'll try to dig in that area...
>> What I already found is this: on a system where things work fine I see this in the NM log:
>> May 16 07:38:47 smaug NetworkManager[17979]: <debug> [1684215527.6817] platform-linux: UDEV event: action 'add' subsys 'net' device 'enp0s20f0u6u3u4' (8); seqnum=3479
>> May 16 07:38:47 smaug NetworkManager[17979]: <trace> [1684215527.6817] platform-linux: udev-add[enp0s20f0u6u3u4,8]: device added
>> This reference to the UDEV add action is missing on the system where it doesn't work. However, what I _can_ see on the not-working system is that udev events are generated when I plug the USB dongle:
>> KERNEL[1049.046495] add      /bus/usb/drivers/r8152 (drivers)
>> KERNEL[1049.047226] add      /module/r8152 (module)
>> KERNEL[1049.047321] remove   /devices/pci0000:00/0000:00:16.0/0000:0b:00.0/usb4/4-1/4-1:2.0 (usb)
>> KERNEL[1049.047394] remove   /devices/pci0000:00/0000:00:16.0/0000:0b:00.0/usb4/4-1/4-1:2.1 (usb)
>> KERNEL[1049.049475] add      /module/usbnet (module)
>> KERNEL[1049.056982] add      /devices/pci0000:00/0000:00:16.0/0000:0b:00.0/usb4/4-1/4-1:1.0 (usb)
>> KERNEL[1049.177024] add      /bus/usb/drivers/cdc_ether (drivers)
>> KERNEL[1049.177715] add      /module/cdc_ether (module)
>> KERNEL[1049.179112] add      /bus/usb/drivers/r8153_ecm (drivers)
>> KERNEL[1049.179569] add      /module/r8153_ecm (module)
>> KERNEL[1049.405946] add      /devices/pci0000:00/0000:00:16.0/0000:0b:00.0/usb4/4-1/4-1:1.0/net/eth1 (net)
>> KERNEL[1049.405956] add      /devices/pci0000:00/0000:00:16.0/0000:0b:00.0/usb4/4-1/4-1:1.0/net/eth1/queues/rx-0 (queues)
>> KERNEL[1049.405960] add      /devices/pci0000:00/0000:00:16.0/0000:0b:00.0/usb4/4-1/4-1:1.0/net/eth1/queues/tx-0 (queues)
>> KERNEL[1049.406102] bind     /devices/pci0000:00/0000:00:16.0/0000:0b:00.0/usb4/4-1/4-1:1.0 (usb)
>> So for some reason these UDEV events are not propagated to NetworkManager...
> All shown events are kernel events, not udev events. udev receives
> them and should send its own events after processing. You do not say
> how you got this list so it is unknown whether you just did not
> collect udev events or udev does not generate thesm.
>> I'll try to figure out why.
>> Thanks and best regards,
>> Christian
>> Am 15.05.23 um 15:12 schrieb Thomas Haller:
>>> On Mon, 2023-05-15 at 14:24 +0200, Christian Schaubschläger wrote:
>>>> Hello everyone,
>>>> I'm having a strange issue with an USB ethernet device (Realtek
>>>> r8152) and NetworkManager (1.42.6, I've also tried older versions
>>>> with the same result). I'm not experiencing this on a particular
>>>> Linux distribution, but rather on a self-tailored Linux (based on
>>>> Linux from Scratch), so it's probably a configuration issue, but
>>>> unfortunately I'm really out of ideas what's wrong here.
>>>> So the thing is this: when I plug the mentioned USB dongle when the
>>>> system is up and running, I cannot use it with NetworkManager,
>>>> because eventually I always get the error
>>>> "Failed to activate 'eth1': Connection 'eth1' is not available on
>>>> device eth1 because device is strictly unmanaged"
>>>> I've googled this error a lot but couldn't find anything that makes
>>>> things work for me. One interesting thing is, that when I boot the
>>>> system with the USB dongle connected, everything works as expected.
>>>> Also, when I boot the system with the dongle disconnected, then plug
>>>> it, then restart the NM daemon, it works fine, too.
>>>> I've attached the NetworkManager's logs from a representative
>>>> session, where first the NM daemon starts, then I connect the dongle
>>>> (eth1), and I then issue a "nmcli d connect eth1" command.
>>>> (Note: issuing "nmcli d set eth1 managed yes" prior to connecting
>>>> doesn't help...)
>>>> Note2: on Ubuntu 22.04 everything works as expected...
>>>> Maybe somebody has an idea about what's going wrong here?
>>>> Thanks and best regards,
>>>> Christian
>>> Hi,
>>>   <debug> [1684158669.6262] platform: (eth1) signal: link   added: 6: eth1 <DOWN;broadcast,multicast> mtu 1500 arp 1 ethernet? not-init addrgenmode
>>> "not-init" means that the interface was not announced in udev.
>>> NetworkManager expects a signal from udev that the device is usable,
>>> which never comes.
>>> You certainly would expect a message like that, were it says "init".
>>> The most common reason is that you run inside a container, where /sys
>>> is not mounted as read-only. Udev usually does not run inside a
>>> container, and that is communicated by mounting /sys as read-only. See
>>> https://systemd.io/CONTAINER_INTERFACE/
>>> Note that lxc runs with /sys mounted as writeable, which notably
>>> confuses NetworkManager and can cause similar problems.
>>> Since you don't run a "normal" linux and not a common container
>>> runtime, I would suspect that udev is not properly configured.
>>> Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/networkmanager/attachments/20230516/8afc3aac/attachment.htm>

More information about the Networkmanager mailing list