[solved] nm-applet lost connection to NetworkManager

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
saml

[solved] nm-applet lost connection to NetworkManager

Post by saml »

I run Linux Mint 13 "Maya" Cinnamon 64 bit, dualbooted via refIT on a 2011 Mac Book Air 11".

(Output from inxi:

Code: Select all

CPU~Dual core Intel Core i5-2467M CPU (-HT-MCP-) clocked at Min:800.000Mhz Max:1601.000Mhz Kernel~3.2.0-23-generic x86_64 Up~38 min Mem~699.6/3865.5MB HDD~121.3GB(12.0% used) Procs~147 Client~Shell inxi~1.7.33 
)

Suddenly by some unknown reason (only thing I can think of is possibly a suspend / power cycle), the nm-applet in the notification area disappeared. Networks which were configured to connect automatically still connects, even after rebooting, but I can not connect to networks which required me to activate them manually (like my 3G modem). The 3G modem works without problem if I boot in to OS X though.

After I go "little up-arrow in notification area > Add/Remove applets > Restore to default", the icon appears again, but only contains the button "Network settings", but does not list any available networks, even though I am actually right now connected to a wireless network that has auto-reconnect configured.

When I click the network settings button in the popup, I get a message saying: "The system network services are not compatible with this version".

NetworkManager itself is running though:

Code: Select all

$ ps -efw|grep Network
root      2362     1  0 10:34 ?        00:00:00 NetworkManager
... so it seems that somehow nm-applet lost the connection to NetworkManager.

If I try to run nm-applet manually, I get:

Code: Select all

$ nm-applet

** (nm-applet:3594): WARNING **: Could not initialize NMClient /org/freedesktop/NetworkManager: Rejected send message, 2 matched rules; type="method_call", sender=":1.74" (uid=1000 pid=3594 comm="nm-applet ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination="org.freedesktop.NetworkManager" (uid=0 pid=2362 comm="NetworkManager ")
** Message: applet now removed from the notification area
** Message: using fallback from indicator to GtkStatusIcon
** Message: applet now embedded in the notification area

** (nm-applet:3594): WARNING **: updated_properties: error reading NMClient properties: Rejected send message, 2 matched rules; type="method_call", sender=":1.74" (uid=1000 pid=3594 comm="nm-applet ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination="org.freedesktop.NetworkManager" (uid=0 pid=3966 comm="NetworkManager ")
** Message: NM appeared
And a few of these:

Code: Select all

** (nm-applet:3594): WARNING **: updated_properties: error reading NMClient properties: Rejected send message, 2 matched rules; type="method_call", sender=":1.74" (uid=1000 pid=3594 comm="nm-applet ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination="org.freedesktop.NetworkManager" (uid=0 pid=3966 comm="NetworkManager ")
** Message: NM appeared
By some googling, I already tried the following:
  • Edit

    Code: Select all

    /etc/NetworkManager/NetworkManager.conf
    and change

    Code: Select all

    managed=false
    under [ifupdown] to

    Code: Select all

    managed=true
    , and restart. No success.
  • Code: Select all

    sudo apt-get purge network-manager-gnome; sudo apt-get install network-manager-gnome
  • Code: Select all

    sudo apt-get purge network-manager; sudo apt-get install network-manager
  • Code: Select all

    sudo dpkg-reconfigure network-manager-gnome
  • Code: Select all

    sudo dpkg-reconfigure network-manager
No success.

I also tried installing the WiCD network manager:

Code: Select all

sudo apt-get install wicd
... but that only lists available wifi networks, and does not work with my 3G modem, so not a solution for me :/

Any hints?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
saml

Re: nm-applet lost connection to NetworkManager

Post by saml »

Strange ... inspired by the tip in https://bbs.archlinux.org/viewtopic.php ... 0#p1141910 , i did change some "deny":s to "allow", in /etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf , and now everything works fine again, after a reboot!

Here is my diff, before and after the change:

Code: Select all

# cd /etc/dbus-1/system.d/
# diff -u org.freedesktop.NetworkManager.conf{.orig,}
--- org.freedesktop.NetworkManager.conf.orig	2012-08-24 13:15:10.860276523 +0200
+++ org.freedesktop.NetworkManager.conf	2012-08-24 13:34:34.108014060 +0200
@@ -117,19 +117,19 @@
                 <allow send_destination="org.freedesktop.NetworkManager"
                        send_interface="org.freedesktop.NetworkManager.AgentManager"/>
 
-                <deny send_destination="org.freedesktop.NetworkManager"
+                <allow send_destination="org.freedesktop.NetworkManager"
                        send_interface="org.freedesktop.NetworkManager"
                        send_member="SetLogging"/>
 
-                <deny send_destination="org.freedesktop.NetworkManager"
+                <allow send_destination="org.freedesktop.NetworkManager"
                        send_interface="org.freedesktop.NetworkManager"
                        send_member="Sleep"/>
 
-                <deny send_destination="org.freedesktop.NetworkManager"
+                <allow send_destination="org.freedesktop.NetworkManager"
                        send_interface="org.freedesktop.NetworkManager"
                        send_member="sleep"/>
 
-                <deny send_destination="org.freedesktop.NetworkManager"
+                <allow send_destination="org.freedesktop.NetworkManager"
                        send_interface="org.freedesktop.NetworkManager"
                        send_member="wake"/>
         </policy>
This feels scary though. How can this has happened, and will these changes have problematic side effects somehow?
slackjp
Level 1
Level 1
Posts: 6
Joined: Sat Feb 05, 2011 1:00 pm

Re: [solved] nm-applet lost connection to NetworkManager

Post by slackjp »

In my Mint 13.0 Maya all Network configuration, automatic or manual went away from my control, after being working fine for months in my laptop. No problems in my desktop. Caused by a wrong update ?? No idea. No particular wrong doing (It recalls me the nightmares I suffered using Mint Debian LMDE after rolling updates before quitting it forever: never again in office/productivity systems: keyring and/or legacy nvidia drivers broken for months dealing to reduced usage of my main computer !)

1.- I modified NetworkManager.conf folloging your post, but also deleting a line avoiding line autoconf of MAC addresss of my eth0 card
2.- I did a 'sudo service network-manager stop' and a 'sudo service network-manager start'
3.- The network manager icon re-appeared and is fully functional
4.- At least wired ethernet is now working enabling to update and reinstall packages from the net
5.- After this success I will try to reinstall the whole network support...

ps. I've been a long time user of Slackware (I'have the '94 CD edition...). I moved to Linux Mint looking for a more simple way to have a functional and always updated office PC, requiring less hand-tunning, and with comfortable dependency-checking and a large package repository. Mint 13.0 was a long term support version. isn't it ?? Mint 11.0 and 12.0 worked fine, but the Mint's 6 month cycle was a temptation to upgrade to 13.0. It has lasted only 6 months in my laptop. Linux Mint Debian had been a nightmare: no more retries. I'm thinking to move back to Slackware 14.0/Zenwalk 7.2: their core applications have been stable, or you if prefer less fashionable but delivering. Zenwalk now uses kernel 3.4.x with BFS, so it is more 'advanced' than its contemporary Mint 14.0. I will give a try to Mint 14.0 in my wife's PC... Don't tell her ...
Slackjp, computer hobbyist
Barcelona, Catalonia, lang=ca_ES
Linux Mint 20.1, ex-LMDE, ex-Maemo, ex-Slackware since 1994, ex-Gentoo (holy shit), W10 victim,
MacOSx, AmigaOS, Unixes HP/Sun/ATT, Mac Os, MS-Win, Oasis (aka, Theos), MS-DOS, and CP/M.
M3K

Re: [solved] nm-applet lost connection to NetworkManager

Post by M3K »

I agree with the above poster.
Leaving windows after 15 years tried ubuntu and just about everything else over the years.
Would have used pure UNiX if it was more supported and not so much resource hungry.

Tried LMDE and on the first install after a package upgrade it broke midway and was never able to boot up again. So that was the end of that.
Linux mint works well if you dont want to mess around and get your system to a higher performance level.
installing simple programs crashes the system slows it down causes a list of endless issues spent 8 hours today trying to recover from a stupid nm-applet error
done every thing from reinstalling cinnamon to purging the files finally i was able to install Lxde and boot into my account.
To tell you the truth its the cinnamon desktop and the way the the root and user account is handled not to mention the way terminal sets everything out for a better experiance. The rest is all eye candy.

A simple script in the recovery option to set every thing back to the original setup if any thing breaks with a fail safe boot option would be great.
mint wont even let me access the cinnamon desktop in fail-safe mode so much for a user friendly desktop.

Shame how all this nagging bugs actually let down a good idea and quite a good operating system.

Debian with some Mint ports looks like the way to go.
User avatar
Spearmint2
Level 16
Level 16
Posts: 6900
Joined: Sat May 04, 2013 1:41 pm
Location: Maryland, USA

Re: [solved] nm-applet lost connection to NetworkManager

Post by Spearmint2 »

thanks slackjp,

I lost my nm-applet today and your advice is what quickly got it back, but had to also reset my Network Connections. Not sure why I lost it, but was setting different connections for each user, so they'd not all use the same IP address. Different IP address assignments allowed me to adjust "access" for internet permissions and time restrictions on my router for each user, which is easier, instead of doing in linux. Somehow that broke the applet, even though the networking was still active in the background.

Mint 17 MATE user
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....
User avatar
Spearmint2
Level 16
Level 16
Posts: 6900
Joined: Sat May 04, 2013 1:41 pm
Location: Maryland, USA

Re: [solved] nm-applet lost connection to NetworkManager

Post by Spearmint2 »

I found this later and it's solved my nm-applet problem totally!

https://awesome.naquadah.org/wiki/Nm-applet
The new version of nm-applet requires polkit to be running in background in order to correctly work. add your username to the netdev group

Code: Select all

sudo adduser username netdev
If one tries to run nm-applet as a non-root user then it will often show no networks, this is because of its security policies. It is possible to run it using "sudo nm-applet", however this will not allow you to autostart it.

To allow the user to run nm-applet on without root privileges the following files need to be edited:

/etc/dbus-1/system.d/NetworkManager.conf
/etc/dbus-1/system.d/NetworkManagerInfo.conf
/etc/dbus-1/system.d/nm-applet.conf
/etc/dbus-1/system.d/nm-avahi-autoipd.conf
/etc/dbus-1/system.d/nm-dhcp-client.conf

In each file, copy the section of text which starts with <policy user="root"> and ends with </policy>. Paste it immediately below the </policy> line, and change the <policy user="root"> line to your username, i.e. <policy user="fred">, where "fred" is your username. For example:

Code: Select all

<policy user="root">
  <allow own="org.freedesktop.nm_dhcp_client"/>
  <allow send_interface="org.freedesktop.nm_dhcp_client"/>
</policy>
<policy user="fred">
  <allow own="org.freedesktop.nm_dhcp_client"/>
  <allow send_interface="org.freedesktop.nm_dhcp_client"/>
</policy>
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....
dkpw

Re: [solved] nm-applet lost connection to NetworkManager

Post by dkpw »

Hi,

mine suddenly disappeared in Mint 17 MATE and there were enough clues on this page to recover the menu icon.

I did this:
1. I modified NetworkManager.conf to change the manage option to TRUE.
2. I had to (re-?)install network-manager-gnome.
3. I stopped and restarted the network-manager service.
4. Logged out and in and there were two nm-applet icons on the menu bar.
5. I deleted the second instance from the Startup Applications list.

The duplication probably arose, I suspect, from running nm-applet as root and my user account while testing.
All my previous configurations were retained.

Thanks to the previous contributors.

David
Locked

Return to “Cinnamon”