I have a fresh install of the Ubuntu 18.04 server image, on which I run apt install ubuntu-desktop to get a desktop environment. No matter what I do, NetworkManager refuses to manage the ethernet device. I want this because I want to be able to manage my OpenVPN client from my desktop.

I've tried all the answers in both of these questions to no avail:

I've traced the problem to the file /run/NetworkManager/conf.d/netplan.conf which contains the contents:

# devices managed by networkd

If I remove the unmanaged-devices line and restart NetworkManager then it works. But since /run/ is a temporary filesystem, as soon as I reboot my changes are discarded.

I have no idea where this file is coming from, and my googlefu has failed me when it comes to figuring out how to get networkd to not take control of my ethernet port.

Any suggestions?

  • Is there a line managed=false in your /etc/NetworkManager/NetworkManager.conf? – Jos Jan 25 at 14:26
  • No I already fixed that to be managed=true. But as I understand it, that is only matters if ifupdown is on the system, but Ubuntu Server uses netplan. – Erik Jan 25 at 14:27
  • 2
    Ah, actually this answer contained the solution for me: askubuntu.com/questions/1031956/… – Erik Jan 25 at 14:30
  • Actually, you should have left /etc/NetworkManager/NetworkManager.conf alone, not changed /etc/netplan/*.yaml to renderer: NetworkManager, and just edited the .yaml file in /etc/netplan and configured enp0s3 there. – heynnema Jan 25 at 18:57
  • @Erik status please – heynnema Jan 30 at 16:14

As per my comment...

You should undo your changes to /etc/NetworkManager/NetworkManager.conf...

Your /etc/netplan/*.yaml file should look like this...

  version: 2
  renderer: networkd
      dhcp4: true
      optional: true

followed by...

sudo netplan --debug generate

sudo netplan apply

Update #1:

If you're sticking with NetworkManager... then your /etc/netplan/*.yaml should look like this...

  version: 2
  renderer: NetworkManager

followed by...

sudo netplan --debug generate

sudo netplan apply

  • If renderer is networkd, wouldn't that prevent NetworkManager from managing the connection? – Erik Jan 30 at 17:02
  • @Erik yes, it's EITHER netplan OR NM, but not both. Since you're running a server, probably in a stable and unchanging environment, most servers run with netplan, hence my answer. You're running a server with a GUI added, which is somewhat unusual. – heynnema Jan 30 at 17:11
  • I'm not running a server, I just happened to have the server iso available when I was spinning up the VM and used it. – Erik Jan 30 at 19:23
  • @Erik I updated my answer. – heynnema Jan 30 at 20:59

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.