network-manager does not manage ethernet and bluetooth interfaces when Ubuntu 16.10 is installed using chroot/netboot method

Bug #1638842 reported by Raphaël Jakse
172
This bug affects 39 people
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Hello,

I installed Ubuntu 16.10 using a chroot. I use network-manager to manage connections. My system is up-to-date (so I use network-manager 1.2.4-0ubuntu1).

Wifi works perfectly but I cannot connect to wired networks and using my phone's Bluetooth connection. Corresponding devices are said to be unmanaged by network-manager. nmcli dev outputs:

DEVICE TYPE STATE CONNECTION
enp1s0 ethernet unmanaged --
wlp2s0 wifi disconnected --
6C:9B:02:2C:EE:2C bt unmanaged --
hfp/org/bluez/hci0/dev_6C_9B_02_2C_EE_2C gsm unmanaged --
lo loopback unmanaged --

The following command has no effect:
sudo nmcli dev set enp1s0 managed yes

I can connect to a wired connection by doing:
ifconfig enp1s0 up
dhclient enp1s0

There is nothing in the file /etc/network/interfaces.

Everything works perfectly if I downgrade network-manager to this version: network-manager_1.2.2-0ubuntu0.16.04.3_amd64.deb (http://packages.ubuntu.com/xenial-updates/amd64/network-manager/download). I had to install libreadline6 and downgrade nplan to meet dependencies.

I don't know what to join to this bug report so please ask in case anything is needed.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in network-manager (Ubuntu):
status: New → Confirmed
summary: - network-manager does not manage ethernet and bluetooth interfaces
+ network-manager does not manage ethernet and bluetooth interfaces when
+ Ubuntu 16.10 is installed using chroot/netboot method
Revision history for this message
林博仁(Buo-ren, Lin) (buo-ren-lin) wrote :

Hi, I believe I have the same issue, however there's differences that you installed Ubuntu 16.10 using chroot, while I installed Ubuntu 16.10 using netboot(and then tasksel ubuntu-desktop), here are the investigation results:

## Possible Cause ##
The problem seems to be lies on the new override config introduced in 16.10:

```
  * debian/10-globally-managed-devices.conf: ship a default config to
    explicitly unmanage anything that is not wifi or wwan: we definitely want
    NM to manage wifi and mobile data; and probably don't want it to touch
    wired in many cases.
```

which is installed at /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf , with the following content:

```
[keyfile]
unmanaged-devices=*,except:type:wifi,except:type:wwan
```

that unmanages all network interfaces except wifi and wwan, thus bluetooth interface in your case and ethernet case in my case are all unmanaged by default.

According to the future changelog by Martin Pitt:

```
  * network-manager.postinst: Don't create
    /etc/NetworkManager/conf.d/10-globally-managed-devices.conf override on
    new installations. We don't want NM to manage non-wifi/wwan on
    servers/cloud instances, and for desktops live-build now installs a
    netplan policy snippet to let NM handle all devices.
```

This is designed to not let NM manage those interfaces except in a desktop edition(possibly because servers normally uses the ifupdown mechanism to manage networking), what I'm confused is:

* Why there's the need to do so when ifupdown NM plugin already provides the ability to unmanages the network interfaces that have settings in /etc/network/interfaces?
* Why the config still working after user installs *ubuntu-desktop, rendering those network-interfaces unmanaged even when it is clearly not for server/cloud usage?

## Workaround ##
Remove /etc/NetworkManager/conf.d/10-globally-managed-devices.conf, it works(TM)

Revision history for this message
林博仁(Buo-ren, Lin) (buo-ren-lin) wrote :

Subscribing Martin Pitt as they wrote the second changelog, no offense.

Revision history for this message
林博仁(Buo-ren, Lin) (buo-ren-lin) wrote :

Update Workaround in #2, in fact you need to remove /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf instead.

Revision history for this message
Raphaël Jakse (raphael-jakse) wrote : Re: [Bug 1638842] Re: network-manager does not manage ethernet and bluetooth interfaces when Ubuntu 16.10 is installed using chroot/netboot method

I just upgraded network-manager to test your workaround but I cannot
reproduce this bug anymore. I tried to restart networking and the
network-manager services. I also tried to purge network-manager and
reinstall it again. I didn't try to reboot.

The bug might affect new installations only.
Maybe network-manager remembers which devices it has already managed and
keeps managing them? Or the previous version of network-manager creates
configuration files that makes the new version work correctly?

Still, cat
/usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf
effectively gives me:

[keyfile]
unmanaged-devices=*,except:type:wifi,except:type:wwan

I don't know if this file was present when I was using the previous
version of network-manager. The new version of network-manager works
correctly with this file so it seems there is something else involved.

Le 03/11/2016 à 17:05, 林博仁 a écrit :
> Update Workaround in #2, in fact you need to remove
> /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf instead.
>

Revision history for this message
林博仁(Buo-ren, Lin) (buo-ren-lin) wrote :

Update Workaround in #2 (again), the proper way to deal with it is to create a blank file with the same name under /etc/NetworkManager/conf.d , in command-line:

```
# touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf
```

Revision history for this message
Martin Pitt (pitti) wrote :

Comment #6 is the correct solution. On desktop images we want NM to manage everything, thus the installer creates /etc/NetworkManager/conf.d/10-globally-managed-devices.conf. But on a server, container, or similar environment we do NOT want NM to suddenly take over existing connections from netplan, networkd, or ifupdown -- there it should be restricted to wifi and 3G.

Changed in network-manager (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
Julian Taylor (jtaylor) wrote :

I just upgraded from 16.04 desktop to 16.10 and the file /etc/NetworkManager/conf.d/10-globally-managed-devices.conf was not created so my wired network did not work.
Creating the file fixed this issue.
Is the file supposed to be created on desktop upgrades?

Revision history for this message
Felix Bors (felix-bors) wrote :

Same as post #8; this fixed it for me too...
thanks

Revision history for this message
sptorrent (spdyn1) wrote :

Comment #6 fixes it fine for me.
Thanks

Revision history for this message
Gareth Western (gareth-b) wrote :

Same problem after an upgrade from 16.04 to 16.10 via "do-release-upgrade". #6 fixes the issue.

Revision history for this message
Martin Anderson (martin-anderson) wrote :

This problem also occurs when installing from the alternative CD install. Comment #4 worked for me.

Revision history for this message
Diego (gran-diego) wrote :

Same problem here, as stated in https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1658921

Five computers (2 laptops and 3 desktops), upgraded from 16.04. No chroot. Comment #6 did the trick.

I can't believe this is tagged as "won't fix"

Revision history for this message
Spode (forums-g-deactivatedaccount) wrote :

#4 worked for me, but refusing to fix this is ridiculous. Not everyone is going to have alternative web access to search for the fix and there will be laptop owners who will not discover the network port is not working until they have a problem with their router configuration.

Please reconsider this status tag.

Revision history for this message
Andrei (andrei-doom) wrote :

I just upgraded 16.04 to 16.10 and had to search and find the solution on my fucking smartphone instead of the PC because somebody decided to change the way the network manager *manages* the network interfaces. Good job, you've just wasted tens of people's hours for nothing. I hope somebody's really proud of themselves. I swear to god, as soon as Android manages to take a big chunk out of the Linux desktop market share, Ubuntu goes right out of the SSD on my machine. I've just about had enough of this crap.

Revision history for this message
Chad Blackmon (chadb4184) wrote :

Comment #6 fixed it for me. Just needed to restart NetworkManager.service after creating the blank file.

Revision history for this message
brad (dragonsawareness) wrote :

This needs fixing

Revision history for this message
gerardo (geestbos) wrote :

Same problem after an upgrade from 16.04 to 16.10 via "do-release-upgrade". However in my case the issue occurred not for Ethernet or Bluetooth, but for Mobile Broadband (device ttyUSB2 of type gsm over interface ppp0). So, the changelog comment 'we definitely want NM to manage wifi and mobile data' is not really holding. Could it be the author erroneously supposed mobile data is only transferred over the wwan interface? In that case, the issue should indeed be fixed.

Revision history for this message
Miguel Rubio-Roy (mrubioroy) wrote :

Same problem after an upgrade from 16.04 to 16.10 via "do-release-upgrade". Ethernet and WiFi not managed.
Solved it creating blank file at /etc/NetworkManager/conf.d/10-globally-managed-devices.conf
as per comment #6

Revision history for this message
Krzysztof (krzychuz) wrote :

I have lost 3 days to find out this solution. Fix it ASAP!

Revision history for this message
Paul (paulr-ta) wrote :

Setting unmanaged-devices=none in {BASE}usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf worked for me in getting NetworkManager to manage the ethernet port, though I don't know if that messes anything else up. :^)

This was for a Ubuntu 16.10 hybrid USB build.

Revision history for this message
Fred (fred911) wrote :

I did a fresh install of 16.04 and an upgrade to 16.1 with no other changes. I too lost the wired connection completely (including the applet). I can confirm that fix #6 worked flawlessly.

Revision history for this message
Mark Tidd (paddy.stone) wrote :

Thank you.. this was annoying me no end, post #6 was very helpful, especially me being relatively new to ubuntu and linux in general. Why on earth it managed to save everything else on upgrading from 16.04 to 16.10 but ethernet, is bordering on stupidity. If I hadn't found this fix I would probably have ended up doing a fresh install in the hopes that I would be able to use ethernet again, I mean wifi is actually OK for me, but when I need to transfer files to my server/NAS I don't want to be using wifi instead of cat6 Gigabit cable.
Anyway, won't go on, but thank you #6 (buo-ren-lin) for the save, appreciate it :)

Revision history for this message
Pierre Clérissi (pci06) wrote :

Hi,
may be a fix could be to remove network-manager from server setup.

Revision history for this message
Jeffrey Blanchard (jeffreyblanchard) wrote :

I just got a new Dell loaded with 16.04. Using wireless I updated to 16.10 then tried to get on our wired network. I ran into this problem and comment #6 worked. Thank you!

Revision history for this message
Lincoln Rickwood (lincolnrickwood) wrote :

On 2017-04-15 I upgraded from 16.04 to 16.10 on the way to 17.04. This issue was the one and only problem I encountered.

In my case I started the wired interface manually (sudo ifconfig enp3s0 up && sudo dhclient epn3s0), got on-line and found this page. Message 6 above worked perfectly, and it's an easy fix once one knows what to do - but not until then.

It would be a very good idea to fix this, because as observed above it's a disproportionate nuisance as it prevents web access, hindering the the search for a fix and for neophytes - exactly the people we want to get using Linux - that could drive them away.

Revision history for this message
andrew (voland62) wrote :

I get this after 16.04→16.10→17.04.

#15 helped me to fix and to understand why Ubuntu will never be upper than 1% on desktop. This crap happens every, [EVERY, Carl!] major release or upgrade! Before this, it was video drivers, and black screen, today - absence of network, I remember when GRUB was moving to GRUB2 I had to manually manage partitions, to get the whole system up(remember this GRUB configs...). They fixed non-Latin fonts in tty only in recent years..........

Martin Pitt thinks than it will be good... I think that this is not Martin Pitt! His real name is Yn Chin Pu - top hacker from N.Korea with his best friend Ali Achbar bin-Musa from ISIS! This guys want to bury our lovely distro, and they were successful with Uniti8 and Mir!

Trump, please, hit the Fat Kim!!!

Revision history for this message
Raphaël Jakse (raphael-jakse) wrote :

You are getting completely mad. Yn Chin Pu would not have Internet connectivity from North Korea, and it would not be because NetworkManager does not want its Ethernet interface to join the network.

But because of Feature #1638842, North Korea might want to consider NetworkManager for managing their outside connections though.

Revision history for this message
guderian (foros2004) wrote :

I have also had this problem after upgrade from 16.04 to 16.10.
Ethernet and WiFi not managed.

I solved it with the command:

touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf

I was about to reinstall 16.04

Please fix it

Revision history for this message
ajavierbarragan (ajavierbarragan) wrote :

Workaround:

Create an empty file /etc/NetworkManager/conf.d/10-globally-managed-devices.conf and restart Network-Manager

Revision history for this message
ianfas (ianfas) wrote :

I was also affected by this after doing a release upgrade of my system. Very very annoying and I was searching for ever until I found this.

Revision history for this message
Marco Bianchi (marcolondonuk) wrote :

I have tried all the above but did not work for me? I was running Ubuntu 16.04.2 LTS Xenial with no problem until two days ago. Then, after I did a routine software update which I was prompted to do but Ubuntu software updater, I had an error saying something went wrong. After I rebooted the machine, I had no longer ethernet.

My card is realtek.

The command below
sudo lshw -C network

gave me -network UNCLAIMED

and doing ifconfig i do not see any ethernet connection there.

For now, I was able to get on the web and post this message to you only because I had a backup exact copy of my 120gb SSD, hence I was able to just change the SSD and get back to the Ubuntu system I had BEFORE the update. I think this is a serious bug in Ubuntu, if did not have backup, would have caused a lot of inconvenience, with me being unable to go on the web using my Desktop PC.

Revision history for this message
Forceflow (baertman) wrote :

Installed 17.04 using minimal server install CD, wanted to use networkmanager to manage my interfaces, encountered this pesky bug. I had removed any mention of my wired interface in /etc/network/interfaces, and still it wouldn't show up in NetworkManager.

If this is supposed to be default behavior, I do not approve. It is confusing and pretty hard to fix if you don't have the slightest idea where to look.

Revision history for this message
peacecop kalmer: (peacecop-kalmer) wrote :

I confirm the bug on 17.04. Creating the file /etc/NetworkManager/conf.d/10-globally-managed-devices.conf didn't solve the problem.

Revision history for this message
tropos (wido-launchpad) wrote :

Upgrade from 16.04 to 16.10 to 17.04 and my UMTS modem would not connect. Creating an empty /etc/NetworkManager/conf.d/10-globally-managed-devices.conf solved my problem.

$ nmcli device show
GENERAL.DEVICE: ttyACM0
GENERAL.TYPE: gsm
GENERAL.HWADDR: (unknown)
GENERAL.MTU: 0
GENERAL.STATE: 100 (connected)
GENERAL.CONNECTION: *edited*
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/3
IP4.ADDRESS[1]: *edited*/28
IP4.GATEWAY: *edited*
IP4.DNS[1]: *edited*
IP4.DNS[2]: *edited*

Revision history for this message
Silje (siljexnord) wrote :

I also came across this bug on 17.10. Creating an empty /etc/NetworkManager/conf.d/10-globally-managed-devices.conf file did not work. But when I copied the file from /usr/lib and changed the value "unmanaged-devices" to none, I was able to manage all my network devices again using NM.

Revision history for this message
RamOn RabasO Meca (ramon-spanto) wrote :

Ubuntu 17.10 here, final solution for me was #36.

Not enough with a blank file in /etc/NetworkManager/conf.d/10-globally-managed-devices.conf and not solved modifying directly on /usr/lib/. I had to cp the file from /usr/lib to /etc/ and modify "unmanaged-devices" to none there, as Silje said.

Thanks!

Revision history for this message
Xyverz (xyverz) wrote :

Ubuntu Mate 17.10 and comment #36 worked for me as well. Although I did remove the file in /lib, thanks to somebody posting it here before I was able to recreate it.

Revision history for this message
m jyothi sankar reddy (jyothisankar453) wrote :

I am on Ubuntu 18.04,

The problem still persists after trying the above solutions(comment #36 & comment #30).
root@(none):~# nmcli d s
DEVICE TYPE STATE CONNECTION
eth0 ethernet unmanaged --
eth1 ethernet unmanaged --
lo loopback unmanaged --

Anyone with latest Ubuntu version(18.04) faced this issue ??

Revision history for this message
mrvst (maravento) wrote :

The same problem in Ubuntu 18.04. File /etc/NetworkManager/conf.d/10-globally-managed-devices.conf does not solve the problem

Revision history for this message
m jyothi sankar reddy (jyothisankar453) wrote :

Hi there,

Anyone found work around solution for the problem mentioned in comment #39 ??

Revision history for this message
Roman (thezub) wrote :

I've experienced this bug in a clean install of 18.04 via the server edition first then adding a GUI. In the past editing /etc/NetworkManager/NetworkManager.conf and setting managed=true was the solution, that doesn't work anymore. Instead, first I needed to create a file under /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf and put the following text in it:

[keyfile]
unmanaged-devices=*,except:type:wifi,except:type:wwan

then copy that file to /etc/NetworkManager/conf.d/10-globally-managed-devices.conf

and then edit the file /etc/NetworkManager/conf.d/10-globally-managed-devices.conf and change the line to say unmanaged-devices=none

that is finally, at long last what solved it for me.

Revision history for this message
hob4bit (hob4bit-googlemail) wrote :

This bug still exists on Ubuntu 18.04.1. The problem is when network-manager is upgraded this the fix in /etc/NetworkManager/conf.d/10-globally-managed-devices.conf is over-written:

network-manager 1.10.6-2ubuntu1.1

A better workaround for this BUG that the developers refused to fix is:

   echo -e "[keyfile]\nunmanaged-devices=none\n" > \
       /usr/lib/NetworkManager/conf.d/11-fix-managed-devices.conf
   systemctl restart network-manager && sleep 1 && nmcli dev

Revision history for this message
Matias (matias631) wrote :

Workaround: in ubuntu 18.4

Create an empty file /etc/NetworkManager/conf.d/10-globally-managed-devices.
Create an file /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with content:

network: {config: disabled}

Work for me,

Revision history for this message
Maxim (maxim-switz) wrote :

So I created a network bootable installation based on the 18.04.2 LTS desktop download and I have the exact same problem. However none of the workarounds are working for me. I have tried emptying the 10-globally-managed-devices.conf file in both locations, included the "unmanaged-devices=none" in one or the other or both locations and also tried the workaround described in comment #43 but none of this is working.

I'm thinking there's something else we might be missing...

Also manually using nmcli to set the device to managed doesn't work.

Revision history for this message
Maxim (maxim-switz) wrote :

actually this is what fixed this problem for me. In the file /etc/NetworkManager/NetworkManager.conf I changed managed=false to managed=true

Revision history for this message
Doug B (ve3gob) wrote :

I tried all these suggestion, no joy.
Why won't dev fix? Please at least tell us what we're doing wrong. I may have to install Desktop version because KVM/QEMU isn't playing nice with seeing the network connection. Now what, reinstall every server manually that I use on my hosts so those KVMs work. I was hoping to avoid using VBox.

Revision history for this message
BZHipHop (elouan-keryell) wrote :

Comment #6 fixed for me, thanks a lot buo-ren-lin

Revision history for this message
Samuel Alves Gonçalves (samuelalvesg) wrote :

New Install from netboot method ubuntu 20.04 focal same error, I did everything, but nothing worked

Revision history for this message
Rohit Vashisht (loonycrd) wrote :

I use debootstrap and chroot to install. Just migrated from Debian where this issue doesn't exist on any branch. Installed Ubuntu 20.04 and the bug is still there. I was able to fix it using the instructions given in post #6.

Revision history for this message
spinylumpsucker (bill-nec-labs) wrote :

I'm adding an observation here because the NetworkManager work-around thread is here and not in #1676547.

Confirmed with additional information: Ubuntu 20.04 workstation ISO (downloaded August 2020) exhibits the issue when run in the LiveCD "Trial" mode. The Gnome "Settings" UI does not by default show the "Wired" menu by default even if the underlying NIC is not servicing DHCP. The network icon is also missing from the top status bar.

This behavior differs from Ubuntu 16.04 & 18.04 LiveCD ISO images.

In my test cases, copying /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf to /etc/NetworkManager/conf.d and then setting "unmanaged-devices=all" followed by restarting NetworkManager causes the menu to appear.

It is worth pointing out that once installed the menu appears as expected once rebooted, so this issue is specific to the LiveCD instance and not the installed instance.

I'm not going to try to guess why the developers decided to hide this functionality in the LiveCD, but I for one am disappointed because I am working in a mixed DHCP/VLAN network environment where static IP addresses are the rule rather than the exception.

Revision history for this message
Jesse Richey (raistlind2x) wrote :

None of these solutions are working and I'm on 22.10 with kernel 5.19. This is pretty absurd. I used NetworkManager 3 years ago on a Raspberry Pi to build out a custom LTE solution using a Sierra Wireless CAT6 module... and yet for something I can't have NetworkManager manage wifi on an intel nuc?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.