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 on 2016-11-03
136
This bug affects 30 people
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
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.

Launchpad Janitor (janitor) wrote :

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

Changed in network-manager (Ubuntu):
status: New → Confirmed
林博仁 (buo-ren-lin) on 2016-11-03
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
林博仁 (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)

林博仁 (buo-ren-lin) wrote :

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

林博仁 (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.

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.
>

林博仁 (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
```

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
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?

Felix Bors (felix-bors) wrote :

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

sptorrent (spdyn1) wrote :

Comment #6 fixes it fine for me.
Thanks

Gareth Western (gareth-b) wrote :

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

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

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"

Spode (forums-g) 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.

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.

Chad Blackmon (chadb4184) wrote :

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

brad (dragonsawareness) wrote :

This needs fixing

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.

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

Krzysztof (krzychuz) wrote :

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

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.

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.

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 :)

Pierre Clérissi (pci06) wrote :

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

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!

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.

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!!!

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.

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

Workaround:

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

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.

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.

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

Other bug subscribers