13

After one of Ubuntu updates I got my Ethernet connection unmanaged and not working when OS is loaded.

I tried different solutions, posted in internet:
No wired connection - Wired unmanaged ubuntu 18.04
https://superuser.com/questions/1429490/unmanaged-network-manager-in-ubuntu
https://forum.linuxconfig.org/t/wired-unmanaged-ubuntu-desktop-issue/1574
network manager says "device not managed"
Ethernet device not managed

Neither ow them worked.

Also I tried to activate connection using nmtui tool, but I got following error:

││ Could not activate connection:       │  │  
││ Connection 'Wired connection 1' is   │  │  
││ not available on device eth0 because │  │ 
││ device is strictly unmanaged         │  │ 

To provide more context, here is the relevant system configuration information:

~$ cat /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile

[ifupdown] managed=true

[device] wifi.scan-rand-mac-address=no

[logging] level=TRACE

~$ cat /etc/network/interfaces

interfaces(5) file used by ifup(8) and ifdown(8)

auto lo iface lo inet loopback

~$ cat /etc/NetworkManager/conf.d/10-globally-managed-devices.conf [keyfile] unmanaged-devices=none

~$ cat /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf [keyfile] unmanaged-devices=*,except:type:wifi,except:type:gsm,except:type:cdma

~$ cat /etc/netplan/.yaml cat: '/etc/netplan/.yaml': No such file or directory

~$ sudo lshw -C network -network DISABLED
description: Ethernet interface product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:02:00.0 logical name: eth1 version: 06 serial: 50:e5:49:3c:26:4e width: 64 bits clock: 33MHz capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical configuration: broadcast=yes driver=r8169 latency=0 link=no multicast=yes resources: irq:17 ioport:de00(size=256) memory:fbdff000-fbdfffff memory:fbdf8000-fbdfbfff
-network DISABLED description: Ethernet interface product: IC Plus IP100A Integrated 10/100 Ethernet MAC + PHY vendor: Sundance Technology Inc / IC Plus Corp physical id: 1 bus info: pci@0000:04:01.0 logical name: eth0 version: 31 serial: c0:4a:00:01:19:7f width: 32 bits clock: 33MHz capabilities: pm bus_master cap_list rom ethernet physical configuration: broadcast=yes driver=sundance latency=64 maxlatency=10 mingnt=10 multicast=yes resources: irq:19 ioport:ef00(size=128) memory:fbcff000-fbcff1ff memory:fbc00000-fbc0ffff

Please note both Ethernet adapters are shown as network DISABLED in lshw output.

Ubuntu version (desktop)

NAME="Ubuntu"  
VERSION="20.04.1 LTS (Focal Fossa)"

Also I tried to load previous version of the kernel. Internet worked well there. But after I ran apt upgrade and rebooted machine - internet became broken there too.

So, for now I completely have no idea what to look further. Any ideas and suggestions are very welcome.

PS:
I got internet connection working by manual run operation sudo dhclient. After that my Ethernet adapter became IP address and internet started working.
Also it causes that both my Ethernet adapters are not DISABLED anymore in lshw command output.

But the device is still unmanaged. No internet icon in the GUI. No settings available in GUI for wired connection.

So the question is still open:
How can I get my wired connection managed back?

  • Set managed=false in /etc/NetworkManager/NetworkManager.conf, and clear out (empty file) /etc/NetworkManager/conf.d/10-globally-managed-devices.conf. Also, edit your question and show me cat /etc/netplan/*.yaml. – heynnema Nov 07 '20 at 22:59
  • @heynnema I made the changes you're recommending. It gave no visible effect. I.e. network device is still unmanaged. Also I added output of cat /etc/netplan/*.yaml. In fact netplan folder is empty on my machine. – Alexander Stepaniuk Nov 08 '20 at 13:52
  • Did you reboot? Desktop or Server installation? What version Ubuntu? Edit your question and show me sudo lshw -C network. – heynnema Nov 08 '20 at 14:03
  • @heynnema I rebooted machine after configuration changes. Ubuntu version: 20.04.1 LTS Desktop (I also added this information to question). And I added the output of lshw in there. Btw, initially after reboot my both Ethernet adapters are listed as DISABLED in lshw output. But when I run dhclient - they start working and the mark DISABLED is not shown anymore in lshw output. – Alexander Stepaniuk Nov 08 '20 at 19:11
  • 1
    Status please... – heynnema Nov 11 '20 at 20:46
  • does a connection show up in

    nm-connection-editor

    if so delete it and let in reinstall.

    – pierrely Nov 13 '20 at 04:25
  • @AlexanderStepaniuk Are both ethernet adapters connected with cables? Are you using eth0 or eth1? Are you using cat 5e or cat 6 cables? Please describe your wiring from the ethernet port, all the way to the router/hub. – heynnema Nov 14 '20 at 19:18
  • @heynnemma I tried plugging to any: eth0 and eth1. The behavior was the same. Current wiring is: eth0 is plugged via cat 5, cable length is 1.2 meter, connected to router (TP-LINK AC1200) at the other end. eth1 is unplugged. – Alexander Stepaniuk Nov 14 '20 at 21:13
  • @AlexanderStepaniuk I almost missed your last comment, as you misspelled my user name. Anyway, I suspect that you have an external problem... ie: cable or router. Do you have any cat 5e or cat 6 cables that you can try? Have you rebooted the router? – heynnema Nov 15 '20 at 17:09
  • @heynnema sorry for misspelling your name. I don't think it's a cable or a router problem. Internet becomes working in unmanaged mode after manual run dhclient. I.e. everything is good on a physical level. Also everything is working good when I'm booting another OS on same machine (Ubuntu from USB, or Windows). The problem is that ethernet is unmanaged even though it is working. – Alexander Stepaniuk Nov 15 '20 at 17:51
  • @AlexanderStepaniuk But... your lshw shows link=no, AND you're using a cat 5 cable. Very possible cable/router problem. – heynnema Nov 15 '20 at 17:56
  • @heynnema I would agree :) But how and why it works with the other operating systems? Btw, I tried different cables, and both eth0 and eth1. Any setup works fine. But in one of my ubuntu setup it's getting unmanaged... – Alexander Stepaniuk Nov 16 '20 at 07:02
  • 1
    @AlexanderStepaniuk Boot to a Ubuntu Live DVD/USB. If it works there, I'd reinstall Ubuntu. – heynnema Nov 16 '20 at 14:42
  • @heynnema sure, internet works when boots from Live USB. Ok, thank you for your support. I'll try to dig it more detailed at a free time. The problem is not blocking, it has a workaround. And it's actually very interesting what went wrong with current setup. – Alexander Stepaniuk Nov 16 '20 at 19:28
  • @AlexanderStepaniuk I updated my answer. – heynnema Nov 16 '20 at 19:39

2 Answers2

14

Create a file in /etc/netplan:

sudo -H gedit /etc/netplan/networkmanager.yaml

or

sudo pico /etc/netplan/networkmanager.yaml

Place this content in that file, keeping the exact same indentation, spacing, and no tabs:

network:
  version: 2
  renderer: NetworkManager

Then, in terminal:

sudo netplan generate

sudo netplan apply

reboot

Then use the NetworkManager GUI tools to configure your "Wired Connection".

Update #1:

When booted to a Ubuntu Live DVD/USB, ethernet works fine. Will need to reinstall Ubuntu.

heynnema
  • 70,711
  • 2
    Hi @heynnema sorry for being off for the long time. The netplan installation and configuration actually didn't help. The current networking state is actually unstable: Sometimes after reboot network connection is managed and network does work. Sometimes after reboot the network connection is unmanaged and it requires running 'dhclient' to get network available. – Alexander Stepaniuk Nov 14 '20 at 17:21
  • I had the DISABLED issue. netplan generate showed a typo in one of the yaml. I don't remember ever touching it, but seems that was the cause – xvan Oct 29 '23 at 16:14
  • This solution worked well for me, except that when I go into settings and change IPv4 Method from Automatic (DHCP) to Manual, the manual connection isn't persistent across reboots and it changes back to automatic. Any advice? – guttermonk Mar 20 '24 at 23:11
  • @guttermonk What values are you setting in the Manual panel? – heynnema Mar 20 '24 at 23:47
  • @heynnema I set the address and netmask and checked the box for "Use this connection only for resources on its network." That said, I think I just found a work-around - I created a new connection and set it to connect automatically. I just tested it and it survived a reboot. It looks like any edits on the original netplan-enp8s0 connection aren't persistent, even just unchecking the connect automatically box. It goes right back to checked after reboot. Must be a permissions issue somewhere. – guttermonk Mar 21 '24 at 00:11
  • 1
    @guttermonk It's difficult to further diagnose your problem using comments. Please start a new question and describe your problem. Include a listing of all of the .yaml files in /etc/netplan, and a screenshot of the manual network panel. Ping me when that's done. – heynnema Mar 21 '24 at 00:51
10

I found this post, and tried many of the same things without any luck. What was successful for me:

nmcli n on

Now the previously managed devices are managed again.

Daniel Lawson
  • 201
  • 2
  • 2