# nm-applet no longer automatically connects [SOLVED]

## audiodef

Pretty much the subject line. After my last @system @world update, this. It works fine - I can manually connect. It would be nice to have it automatically reconnect to the last network used, as it did before my last update. What should I check for?

----------

## engineermdr

I can confirm the problem is real as I'm having the same issue.  I haven't resolved it yet, but added a script run upon resume that runs nmcli to make the connection that works most of the time.  I don't have that laptop handy, but can provide the details later if you want.

Sometimes nm-applet won't even show me any available networks either.  Seem to just get lost at times but straightens itself out after bringing a connection up with nmcli.

----------

## Fitzcarraldo

Could you be experiencing  Gentoo Bug No. 595806 - net-misc/networkmanager-1.4.0-r1[consolekit]: doesn't automatically activate connections marked with "Automatically connect to this network when it's available". Thanks to the efforts of Herbert Wantesh, who filed a bug report upstream, NetworkManager developer Beniamino Galvani provided a patch on 12 October, which you can download and install easily:

```
# mkdir -p /etc/portage/patches/net-misc/networkmanager-1.4.0-r1

# cp /home/fitzcarraldo/Downloads/0002-session-monitor-fix-parsing-of-ConsoleKit-database.patch /etc/portage/patches/net-misc/networkmanager-1.4.0-r1/

# emerge networkmanager
```

I also had to remove NetworkManager from the default runlevel so that it didn't start before Consolekit (see the comments in the aforementioned bug report).

----------

## engineermdr

The patch works for me.  Thanks.

And I learned you can add patches in /etc/portage/patches.  Up to this point, I've been creating my own ebuilds in a local overlay for patching.  This is much simpler.

----------

## Fitzcarraldo

 *engineermdr wrote:*   

> ...I learned you can add patches in /etc/portage/patches.  Up to this point, I've been creating my own ebuilds in a local overlay for patching.  This is much simpler.

 

It's excellent, isn't it? Portage FTW.

However, that method does not work for all packages yet. It works for ebuilds with EAPI=6, and it works for an ebuild with EAPI lower than 6 if the ebuild calls epatch_user. See the following article in the Gentoo Wiki for details:

https://wiki.gentoo.org/wiki//etc/portage/patches

----------

## audiodef

Thanks for the replies. They were very helpful.   :Cool: 

----------

## engineermdr

Now today, after suspending overnight, nm-applet appeared connected, then 30-seconds or so later it bega searching and cam up with an empty list and I had no connection.  I had to manually "nmcli connection up myssid".   I made sure I had consolekit started before NetworkManager, as the bug described.  Maybe I'll try going back to the version that worked.

----------

## engineermdr

I'm tried, but am still having the same issues with older versions of networkmanager as well.  I noticed  that the radio light wasn't turning on after resume, and found this thread, https://bugzilla.redhat.com/show_bug.cgi?id=1257368, that suggested this was a kernel problem.  So I tried reverting to gentoo-sources-4.1.15 and sure enough, it's working flawlessly through several suspend/resume cycles.  I returned to networkmanager-1.4.0 with the patch and still good.

----------

## sl70

I'm having the same problem but the patch is gone from Gnome bugzilla. Any other ideas?

Ah, now I see. The bug is marked as Resolved since there were some commits submitted on Oct 13. However, the latest patch in the portage tree is Sept 29. Perhaps I'll try the testing version 1.4.2....

----------

## Fitzcarraldo

sl70,

The patch is still there: https://bug772640.bugzilla-attachments.gnome.org/attachment.cgi?id=337514

Save it as /etc/portage/patches/net-misc/networkmanager-1.4.0-r1/0002-session-monitor-fix-parsing-of-ConsoleKit-database.patch

----------

## sl70

Thanks, @Fitscarraldo. I couldn't find it. Anyway version 1.4.2 didn't work any better, so I'm thankful for this.

----------

## audiodef

What worked for me was using the allow any user option. No patch needed. I had to delete the auto-found network and manually create it so I could save that option in the settings, but that's not a big deal.

----------

