1

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:

[keyfile]
# devices managed by networkd
unmanaged-devices+=interface-name:enp0s3,

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 '19 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. – The Vermilion Wizard Jan 25 '19 at 14:27
  • 2
    Ah, actually this answer contained the solution for me: https://askubuntu.com/questions/1031956/network-manager-not-working-when-installing-ubuntu-desktop-on-a-ubuntu-18-04-ser?rq=1 – The Vermilion Wizard Jan 25 '19 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 '19 at 18:57
  • @Erik status please – heynnema Jan 30 '19 at 16:14

1 Answers1

1

As per my comment...

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

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

network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s3:
      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...

network:
  version: 2
  renderer: NetworkManager

followed by...

sudo netplan --debug generate

sudo netplan apply

heynnema
  • 70,711