Network-manager broken for desktop Ubuntu

Is there any way to get the network-manager snap to work? I’m using Ubuntu 18.04 LTS (booting from a flash drive). Apparently nobody else can really get this to work either. I didn’t see any real posts about this altho there are threads about network-manager problems (e.g. Network Manager not working anymore (Ubuntu Core 16)).

Also see

Experimented with shutting down the old preinstalled network-manager and starting the snap network-manager service but it didn’t help. Also I couldn’t connect to the internet with the new service.

In this case there’s a warning on the arping

I see people mentioning AppArmor and dmesg output in other threads, altho I haven’t seen advice on how to address the problem

UPDATE: found it at https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager/tree/snapcraft.yaml?id=3d54636a61ab8d83df424f443c669797ac63c35f - rather difficult to find as Launchpad seems full of random old stuff, but the key was to click the Snap packages link at https://code.launchpad.net/~network-manager

Does anyone know where I can find the source code for snaps such as this one? As in the yaml files and other stuff that specifies them. snap info network-manager did not help. I was thinking maybe https://code.launchpad.net/~network-manager but I don’t see it.

Just wonder why would you like to switch the deb version of network-manager to snap on Desktop?

Don’t want to distract too much from the bug report, but I want to take advantage of the wake-on-wlan feature which the NetworkManager team fixed up in more recent versions to wake up this laptop remotely and use it as a headless server for development purposes.

Currently trying to clone it down and snapcraft it with classic confinement, altho haven’t much touched snap development. Git server is a bit flakey tho? It starts off fast then slows to a crawl - is there a mirror?

Those apparmor messages vaguely look like you’re trying to talk to network manager via a snap over D-Bus from an unconfined process - are you sure that you’re using nmcli from the snap?

Yes, I’m pretty sure I’m using the snap nmcli. Version matches up.

But I now realize that the snap is actually way older than the debian version? 1.2.2 for the snap versus 1.10.6 for the deb. So I’ll try to do the wake-on-wlan with the debian version.

I assumed the snap would be newer since I thought that was sort of the point of snaps - they’re isolated and easier to keep updated. But I guess this one isn’t.

You can try the 1.10 track instead:

snap install --channel=1.10/stable network-manager

This version contains the WoWLAN feature you need.

Please note that the WoWLAN feature was developed for a specific model of Dell IoT gateway, and as such has not been tested on any other hardware, so your mileage from this feature may vary. Also note that this support requires wpa-supplicant changes which have not yet landed in the archive. Although there is a wpa-supplicant snap with these changes, it’s about to be deprecated per this thread.

Regular applications and services can still be expected to interact with Network Manager over DBus.

I think the network manager snap should be unpublished from the main store and just published to the Dell gateway store. It is not ready for consumption on a desktop system.

I don’t think NetworkManager should be unpublished from the main store, it has in fact been tested on classic systems and non-Dell hardware, it’s just that this specific feature of WoWLAN that @awe mentioned was only tested on Dell hardware.

Additionally, what I mentioned about the D-Bus denials was the denials looked like an unconfined peer was trying to talk to NetworkManager and was being denied because the rules are written only for peers that are confined and using the appropriate plug. However, upon closer inspection the issue is almost certainly what @abeato explained and is just the wrong version of NetworkManager. I also see that the policy for D-Bus with NetworkManager does explicitly allow unconfined peers to talk to NetworkManager so that’s a supported use case.

Please discuss with @abeato then. When I first published the NM 1.10 snap, the install hook explicitly prevented it from being used on Desktop. @abeato made improvements to the snap and tested on Desktop, and as such convinced me to remove the check in the install hook.

it has in fact been tested on classic systems and non-Dell hardware

You noticed that the reviews on the store are 11 1-star and a few 2 and 3-star, right? And there’s a bunch of comments saying it doesn’t work. Granted, it’s not clear these people tried very hard or used the CLI tool. But it doesn’t seem to be working for most people in the wild? Have you tried?

@abeato when I tried the non-snap deb version 1.10.6, I didn’t see any setting the way I could see a setting for wake-on-lan (ethernet, described at https://wiki.archlinux.org/index.php/Wake-on-LAN#NetworkManager).

I tried the 1.10.6 snap version as suggested and it’s still broken. I didn’t see any dmesg errors in this case, but I couldn’t connect - either to the CLI or the internet. The dmesg logs you see here are from when I was trying the 1.2.2 version, as you can see from the difference in time logs - 13:10 versus 13.20 for active.

@jcrben,

  1. Check that all interfaces are connected with snap connections --all
  2. Try with sudo

Finally, note that this snap was designed and tested essentially for Ubuntu Core. There is actually little reason to use it on desktop in general. Said this, WoWLAN from suspend should work.

Regular applications and services can still be expected to interact with Network Manager over DBus.
I think the network manager snap should be unpublished from the main store and just published to the Dell gateway store. It is not ready for consumption on a desktop system.

This snap is not only used by Dell, but also in many Ubuntu Core systems. The store is not only for Desktop. We cannot, and we shouldn’t, unpublish it.

2 Likes

@abeato it didn’t work with sudo; I’m not sure what I would be be looking for in the snap connections --all; in any case, the internet doesn’t work regardless of nmcli.

Said this, WoWLAN from suspend should work.

Is there any reason it shouldn’t work with the default deb version? There’s no setting that I can set to “magic”. I’ve been using the regular ethernet wake-on-lan without problems, but that has a setting that I can set to magic. Is the only way to set the setting with the snap hook https://docs.ubuntu.com/core/en/stacks/network/network-manager/docs/reference/snap-configuration/wowlan? In which case it would require the snap, which doesn’t work for me. NOTE: I did run iw phy0 wowlan enable magic-packet; iw phy0 wowlan show confirms enabled

It only takes a few minutes to try out the snap - if someone could try it on desktop and it actually worked, I might be more inclined to experiment. I can’t even clone down the git repository to tweak it to classic.

A store which has apps which work only for one of two different platforms with no indication of which platform it works on doesn’t sound too useful - hopefully there’s a feature request logged to show the platform that an app works for. There’s clearly a bunch of frustrated users who have unsuccessfully tried to get the networkmanager snap working on desktop linux, regardless of whether they should. I’m more concerned by the publication of broken apps than I am about this specific feature.

Would it be best to log this as a bug in Launchpad so someone can investigate eventually? I know the backlog is long and there are higher-priority items.

@abeato it didn’t work with sudo; I’m not sure what I would be be looking for in the snap connections --all; in any case, the internet doesn’t work regardless of nmcli.

We’ve tried to explain that this snap was created, tested, and published to the Snap Store for use on Ubuntu Core. Yes, it can be made to work on a Desktop system, but it’s not for the faint of heart. Note this is specifically called out on the installation page for the snap:

The NetworkManager snap is currently available from the Ubuntu Store. It can be installed on any system that supports snaps but is only recommended on Ubuntu Core at the moment.

Is there any reason it shouldn’t work with the default deb version? There’s no setting that I can set to “magic”. I’ve been using the regular ethernet wake-on-lan without problems, but that has a setting that I can set to magic.

It doesn’t work with the default deb version in bionic because that version of NetworkManager was released before the WoWLAN code was written. It’s since been merged into upstream NetworkManager, but is only present in versions 1.14 or greater, which means you’d have to at minimum use the disco release of Ubuntu (ie. 19.04) which provides network-manager 1.16.0-0ubuntu2.

But even if you did that, it’s likely that it still won’t work as WoWLAN is highly dependent on the WiFi driver and physical hardware having been designed to support WoWLAN. Are you absolutely sure both fully support WoWLAN?

My suggestion to you would be to use WoLAN instead and just continue to use the deb from the archive, or update to a newer version of Ubuntu and try to get it WoWLAN working there first.

1 Like