3

My computer has an Ethernet port but no WiFi devices. I just did a new installation with ubuntu-19.04-server-amd64.iso followed by apt install ubuntu-desktop.

Now, I have a working Internet connection as witnessed by ifconfig, the web browser and ping, and in the system tray on the upper right corner, I have a "Wired Unmanaged" item that has a "Connect" subitem that seems to do nothing.

The problem is that Ubuntu insists that I have "no Internet connection". Under "settings->online accounts", it says "No internet connection -- connect to set up new online accounts". Similarly, "Sofware & Updates->Livepatch" says "Livepatch requires an Internet connection". There are other places where Ubuntu behaves as if there is no Internet connection.

How do I make Ubuntu stop insisting that I have no Internet connection when I have it? There are webpages that suggests editing /etc/NetworkManager/NetworkManager.conf to for managed=true, but that didn't help at all even with rebooting.

1:42 ~$ sudo systemctl status network-manager
● NetworkManager.service - Network Manager
   Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2019-07-02 21:27:07 CST; 16min ago
     Docs: man:NetworkManager(8)
 Main PID: 1323 (NetworkManager)
    Tasks: 3 (limit: 4915)
   Memory: 13.2M
   CGroup: /system.slice/NetworkManager.service
           └─1323 /usr/sbin/NetworkManager --no-daemon

Jul 02 21:27:07 frodo NetworkManager[1323]: <info>  [1562074027.4807] manager: (enp3s0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/2)
Jul 02 21:27:07 frodo NetworkManager[1323]: <info>  [1562074027.4854] modem-manager: ModemManager available
Jul 02 21:27:07 frodo NetworkManager[1323]: <info>  [1562074027.4854] bluez: use BlueZ version 5
Jul 02 21:27:07 frodo NetworkManager[1323]: <info>  [1562074027.4857] manager: startup complete
Jul 02 21:27:07 frodo NetworkManager[1323]: <info>  [1562074027.4869] bluez5: NAP: added interface 00:1A:7D:DA:71:11
Jul 02 21:27:09 frodo NetworkManager[1323]: <info>  [1562074029.0652] device (enp3s0): carrier: link connected
Jul 02 21:27:21 frodo NetworkManager[1323]: <info>  [1562074041.2143] agent-manager: req[0x560f1faf8a60, :1.359/org.gnome.Shell.NetworkAgent/2000]: agent registered
Jul 02 21:34:00 frodo NetworkManager[1323]: <info>  [1562074440.5954] keyfile: add connection /run/NetworkManager/system-connections/Wired connection 1.nmconnection (9dcf7c66-f531-44ff-8a2e-4d08eb4acfe3,"Wired connection 1")
Jul 02 21:34:00 frodo NetworkManager[1323]: <info>  [1562074440.5964] audit: op="connection-add-activate" pid=2010 uid=2000 result="fail" reason="Connection 'Wired connection 1' is not available on device enp3s0 because device is strictly unmanaged"
Jul 02 21:34:00 frodo NetworkManager[1323]: ((src/settings/nm-settings.c:504)): assertion '<dropped>' failed

1 Answers1

5

If you wish for Network Manager to control networking, rather than netplan, remove the existing netplan file:

sudo rm /etc/netplan/*.yaml

Create a new file:

sudo nano /etc/netplan/01-network-manager-all.yaml

Add the following:

# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

Netplan is very specific about spacing, indentation, etc. Please proofread carefully twice. Save and exit nano.

After making these changes, do:

sudo netplan generate
sudo netplan apply

then

sudo service network-manager restart

or

sudo systemctl restart network-manager

It may ultimately take a reboot.

sero
  • 103
  • 4
chili555
  • 60,188
  • Don't follow the advice above if you don't have NetworkManager installed – Rempler May 15 '22 at 05:25
  • @Rempler, what do you mean ? – D.L Feb 16 '23 at 23:03
  • To me, this perfectly illustrates why the "year of the Linux desktop" is still a long time away. I installed a stock Ubuntu image on Parallels and was confronted with this issue. A few arcane commands later, the Settings app stops complaining there's no network connection. Smh. – Roy Tinker Mar 27 '23 at 22:28