# NetworkManager won't set wireless IP

## herbert12345

Hi,

I am somewhat stuck on my problem and sadly my ideas on what I can do or how to get meaningful debug output. Anyway, I had a running configuration for my home WLAN using NetworkManager. Now when NetworkManager tries to connect, it gets stuck and eventually fails at setting the network address (at least that is the last state the KDE NetworkManager plasmoid reports). nmcli just reports a timeout after 90 seconds. When use a LAN cable, NetworkManager works just fine (including dynamic IP address).

I think I have run an update and might have overlooked an information message that I should do something.

Connecting to the WLAN works fine from other devices and also via Windows from the same machine with the same network device. I have not changed anything on the WLAN settings. 

NetworkManager shows the list of surrounding wireless networks, and wireless is activated.

I am running networkmanager-0.9.8.2 and my emerge --info is:

```

Portage 2.1.12.5 (default/linux/amd64/13.0/desktop, gcc-4.6.4, glibc-2.17, 3.9.2-gentoo x86_64)

=================================================================

System uname: Linux-3.9.2-gentoo-x86_64-Intel-R-_Core-TM-_i7-2670QM_CPU_@_2.20GHz-with-gentoo-2.2

KiB Mem:     8068468 total,   4336860 free

KiB Swap:    4194300 total,   4194300 free

Timestamp of tree: Tue, 18 Jun 2013 21:15:01 +0000

ld GNU ld (GNU Binutils) 2.23.1

app-shells/bash:          4.2_p45

dev-java/java-config:     2.2.0

dev-lang/python:          2.7.5, 3.2.5, 3.3.2

dev-util/cmake:           2.8.11.1

dev-util/pkgconfig:       0.28

sys-apps/baselayout:      2.2

sys-apps/openrc:          0.11.8

sys-apps/sandbox:         2.6-r1

sys-devel/autoconf:       2.13, 2.69

sys-devel/automake:       1.11.6, 1.12.6, 1.13.4

sys-devel/binutils:       2.23.1

sys-devel/gcc:            4.5.3-r2, 4.6.4, 4.7.3

sys-devel/gcc-config:     1.8

sys-devel/libtool:        2.4.2

sys-devel/make:           3.82-r4

sys-kernel/linux-headers: 3.9 (virtual/os-headers)

sys-libs/glibc:           2.17

Repositories: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"

ACCEPT_LICENSE="* -@EULA"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-O2 -pipe -g -march=native"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/polkit-1/actions"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"

CXXFLAGS="-O2 -pipe -g -march=native"

DISTDIR="/usr/portage/distfiles"

FCFLAGS="-O2 -pipe"

FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"

FFLAGS="-O2 -pipe"

GENTOO_MIRRORS="http://ftp.halifax.rwth-aachen.de/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/"

LANG="en_US.UTF-8"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

MAKEOPTS="-j8"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY=""

SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"

USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif gpm gtk iconv ipv6 jpeg kde lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt3support qt4 readline sdl semantic-desktop session spell sse sse2 ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse synaptics wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2 python3_3" RUBY_TARGETS="jruby ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

USE_PYTHON="2.7 3.2 3.3"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

```

Any pointers would be appreciated. I am willing to provide more information but I don't know how to obtain something relevant.

Thanks in advance.

----------

## BillWho

 *herbert12345 wrote:*   

>  I think I have run an update and might have overlooked an information message that I should do something. 

 

If you have genlop installed you can check what transpired in the portage logs. You can specify by date with

```
genlop -l -u --date 06/08/2013  --date 06/21/2013
```

Any messages that would have been displayed after an update would be contained in the ebuild located at /usr/portage/category/package

Did you check the status of rfkill?

----------

## imaginasys

Can you show log of messages about your wlan interface.

e.g.   *Quote:*   

> grep wlan /var/log/messages

 

if you are on sytemd : *Quote:*   

>  journalctl _SYSTEMD_UNIT=NetworkManager.service -b -x

 

it would show info about what's going on  while trying to setup the network.

Regards,

                BT   :Mr. Green: 

----------

## herbert12345

Thank you for your replies. I tried genlop but found nothing relevant.

When trying to connect I get the following in my /var/log/messages

```

Jun 21 17:19:28 erwin-linux NetworkManager[1853]: <info> Activation (wlan0) starting connection 'XXXXXXX'

Jun 21 17:19:28 erwin-linux NetworkManager[1853]: <info> (wlan0): device state change: disconnected -> prepare (reason 'none') [30 40 0]

Jun 21 17:19:28 erwin-linux NetworkManager[1853]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) scheduled...

Jun 21 17:19:28 erwin-linux NetworkManager[1853]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) started...

Jun 21 17:19:28 erwin-linux NetworkManager[1853]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) scheduled...

Jun 21 17:19:28 erwin-linux NetworkManager[1853]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) complete.

Jun 21 17:19:28 erwin-linux NetworkManager[1853]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) starting...

Jun 21 17:19:28 erwin-linux NetworkManager[1853]: <info> (wlan0): device state change: prepare -> config (reason 'none') [40 50 0]

Jun 21 17:19:28 erwin-linux NetworkManager[1853]: <info> Activation (wlan0/wireless): access point 'XXXXXXXX' has security, but secrets are required.

Jun 21 17:19:28 erwin-linux NetworkManager[1853]: <info> (wlan0): device state change: config -> need-auth (reason 'none') [50 60 0]

Jun 21 17:19:28 erwin-linux NetworkManager[1853]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) complete.

Jun 21 17:19:29 erwin-linux NetworkManager[1853]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) scheduled...

Jun 21 17:19:29 erwin-linux NetworkManager[1853]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) started...

Jun 21 17:19:29 erwin-linux NetworkManager[1853]: <info> (wlan0): device state change: need-auth -> prepare (reason 'none') [60 40 0]

Jun 21 17:19:29 erwin-linux NetworkManager[1853]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) scheduled...

Jun 21 17:19:29 erwin-linux NetworkManager[1853]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) complete.

Jun 21 17:19:29 erwin-linux NetworkManager[1853]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) starting...

Jun 21 17:19:29 erwin-linux NetworkManager[1853]: <info> (wlan0): device state change: prepare -> config (reason 'none') [40 50 0]

Jun 21 17:19:29 erwin-linux NetworkManager[1853]: <info> Activation (wlan0/wireless): connection 'XXXXXXXXX' has security, and secrets exist.  No new secrets needed.

Jun 21 17:19:29 erwin-linux NetworkManager[1853]: <info> Config: added 'ssid' value 'XXXXXXXXXXX'

Jun 21 17:19:29 erwin-linux NetworkManager[1853]: <info> Config: added 'scan_ssid' value '1'

Jun 21 17:19:29 erwin-linux NetworkManager[1853]: <info> Config: added 'key_mgmt' value 'WPA-PSK'

Jun 21 17:19:29 erwin-linux NetworkManager[1853]: <info> Config: added 'psk' value '<omitted>'

Jun 21 17:19:29 erwin-linux NetworkManager[1853]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) complete.

Jun 21 17:19:29 erwin-linux NetworkManager[1853]: <info> Config: set interface ap_scan to 1

Jun 21 17:19:29 erwin-linux NetworkManager[1853]: <info> (wlan0): supplicant interface state: disconnected -> scanning

Jun 21 17:19:32 erwin-linux kernel: [  258.051150] wlan0: authenticate with XX:XX:XX:XX:XX:XX

Jun 21 17:19:32 erwin-linux kernel: [  258.051157] wlan0: capabilities/regulatory prevented using AP HT/VHT configuration, downgraded

Jun 21 17:19:32 erwin-linux kernel: [  258.054194] wlan0: send auth to XX:XX:XX:XX:XX:XX (try 1/3)

Jun 21 17:19:32 erwin-linux NetworkManager[1853]: <info> (wlan0): supplicant interface state: scanning -> authenticating

Jun 21 17:19:32 erwin-linux kernel: [  258.055740] wlan0: authenticated

Jun 21 17:19:32 erwin-linux kernel: [  258.056116] wlan0: associate with XX:XX:XX:XX:XX:XX (try 1/3)

Jun 21 17:19:32 erwin-linux kernel: [  258.058741] wlan0: RX AssocResp from XX:XX:XX:XX:XX:XX (capab=0x431 status=0 aid=1)

Jun 21 17:19:32 erwin-linux NetworkManager[1853]: <info> (wlan0): supplicant interface state: authenticating -> associating

Jun 21 17:19:32 erwin-linux kernel: [  258.077245] wlan0: associated

Jun 21 17:19:32 erwin-linux NetworkManager[1853]: <info> (wlan0): supplicant interface state: associating -> 4-way handshake

Jun 21 17:19:32 erwin-linux NetworkManager[1853]: <info> (wlan0): supplicant interface state: 4-way handshake -> completed

Jun 21 17:19:32 erwin-linux NetworkManager[1853]: <info> Activation (wlan0/wireless) Stage 2 of 5 (Device Configure) successful.  Connected to wireless network 'HomeLAN0815'.

Jun 21 17:19:32 erwin-linux NetworkManager[1853]: <info> Activation (wlan0) Stage 3 of 5 (IP Configure Start) scheduled.

Jun 21 17:19:32 erwin-linux NetworkManager[1853]: <info> Activation (wlan0) Stage 3 of 5 (IP Configure Start) started...

Jun 21 17:19:32 erwin-linux NetworkManager[1853]: <info> (wlan0): device state change: config -> ip-config (reason 'none') [50 70 0]

Jun 21 17:19:32 erwin-linux NetworkManager[1853]: <info> Activation (wlan0) Beginning DHCPv4 transaction (timeout in 45 seconds)

Jun 21 17:19:32 erwin-linux NetworkManager[1853]: <info> dhcpcd started with pid 2761

Jun 21 17:19:32 erwin-linux NetworkManager[1853]: <info> Activation (wlan0) Stage 3 of 5 (IP Configure Start) complete.

Jun 21 17:19:32 erwin-linux dhcpcd[2761]: version 5.99.7 starting

Jun 21 17:19:32 erwin-linux dhcpcd[2761]: wlan0: soliciting an IPv6 Router

Jun 21 17:19:32 erwin-linux NetworkManager[1853]: <info> (wlan0): DHCPv4 state changed nbi -> preinit

Jun 21 17:19:32 erwin-linux dhcpcd[2761]: wlan0: rebinding lease of 192.168.178.25

Jun 21 17:19:37 erwin-linux dhcpcd[2761]: wlan0: soliciting a DHCP lease

Jun 21 17:19:37 erwin-linux dhcpcd[2761]: wlan0: offered 192.168.178.25 from 192.168.178.1

Jun 21 17:19:44 erwin-linux dhcpcd[2761]: wlan0: no IPv6 Routers available

Jun 21 17:20:01 erwin-linux cron[2764]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons)

Jun 21 17:20:02 erwin-linux dhcpcd[2761]: timed out

Jun 21 17:20:02 erwin-linux dhcpcd[2761]: exited

Jun 21 17:20:02 erwin-linux NetworkManager[1853]: <info> (wlan0): DHCPv4 client pid 2761 exited with status 1

Jun 21 17:20:02 erwin-linux NetworkManager[1853]: <info> Activation (wlan0) Stage 4 of 5 (IPv4 Configure Timeout) scheduled...

Jun 21 17:20:02 erwin-linux NetworkManager[1853]: <info> Activation (wlan0) Stage 4 of 5 (IPv4 Configure Timeout) started...

Jun 21 17:20:02 erwin-linux NetworkManager[1853]: <info> (wlan0): device state change: ip-config -> failed (reason 'ip-config-unavailable') [70 120 5]

Jun 21 17:20:02 erwin-linux NetworkManager[1853]: <warn> Activation (wlan0) failed for connection 'XXXXXXXXXX'

Jun 21 17:20:02 erwin-linux NetworkManager[1853]: <info> Activation (wlan0) Stage 4 of 5 (IPv4 Configure Timeout) complete.

Jun 21 17:20:02 erwin-linux NetworkManager[1853]: <info> (wlan0): device state change: failed -> disconnected (reason 'none') [120 30 0]

Jun 21 17:20:02 erwin-linux NetworkManager[1853]: <info> (wlan0): deactivating device (reason 'none') [0]

Jun 21 17:20:02 erwin-linux kernel: [  288.081379] wlan0: deauthenticating from XX:XX:XX:XX:XX:XX by local choice (reason=3)

Jun 21 17:20:02 erwin-linux kernel: [  288.103764] cfg80211: Calling CRDA to update world regulatory domain

Jun 21 17:20:02 erwin-linux NetworkManager[1853]: <warn> Connection disconnected (reason -3)

Jun 21 17:20:02 erwin-linux NetworkManager[1853]: <info> (wlan0): supplicant interface state: completed -> disconnected

Jun 21 17:20:02 erwin-linux NetworkManager[1853]: <warn> Connection disconnected (reason -3)

Jun 21 17:20:02 erwin-linux kernel: [  288.108202] cfg80211: World regulatory domain updated:

Jun 21 17:20:02 erwin-linux kernel: [  288.108206] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)

Jun 21 17:20:02 erwin-linux kernel: [  288.108208] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

Jun 21 17:20:02 erwin-linux kernel: [  288.108210] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

Jun 21 17:20:02 erwin-linux kernel: [  288.108211] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)

Jun 21 17:20:02 erwin-linux kernel: [  288.108212] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

Jun 21 17:20:02 erwin-linux kernel: [  288.108213] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

```

I don't know what to do about rfkill. And apparently I am not on systemd.

I googled and found this post, which proposes to set the IPv6 configuration to "Link local" instead of "Disabled". EDIT: Still does not work. I can connect to the wireless network using a static IP address though.

Following a PM I got, here is the output of rc-update:

```

       NetworkManager |      default                 

             bootmisc | boot                         

                cupsd |      default                 

                 dbus |      default                 

                devfs |                       sysinit

                dmesg |                       sysinit

                 fsck | boot                         

             hostname | boot                         

              hwclock | boot                         

              keymaps | boot                         

            killprocs |              shutdown        

                local |      default                 

           localmount | boot                         

              modules | boot                         

             mount-ro |              shutdown        

                 mtab | boot                         

               net.lo | boot                         

             netmount |      default                             

               procfs | boot                         

                 root | boot                         

            savecache |              shutdown        

                 sshd |      default                 

                 swap | boot                         

            swapfiles | boot                         

               sysctl | boot                         

                sysfs |                       sysinit

            syslog-ng |      default                 

         termencoding | boot                         

       tmpfiles.setup | boot                                   

                 udev |                       sysinit

           udev-mount |                       sysinit

              urandom | boot                         

           vixie-cron |      default                 

                  xdm |      default   

```

----------

## Velasticus

Note: I'm having the same exact problem after an upgrade to Gnome 3.8 (which updated NetworkManager in course).

If I turn off NM, nm-applet, etc. and run wpa_supplicant by itself then it works. However, when running under NetworkManager it reports that it cannot connect and gives the same (reason=3) error in the logs.

I've tried turning IPV6 off and setting it to link-local without success.

I'll attach logs if requested but they look nearly identical to herbert's logs.

Hopefully someone can point me in the right direction. In the meantime I'll try netctl to replace NetworkManager.

----------

## stens

Hi,

I also experienced with the same issue.

NM is not able to connect to WiFi and strangely it can not connect to LAN at work, but LAN is fine at home  :Surprised: 

Everything pointed to DHCP, so I changed the use flags for networkmanager:

```
 net-misc/networkmanager dhclient -dhcpcd 
```

Now at least WiFi is fine and the laptop still connects to LAN at home. I'll see if it can connect at work.

StenS

----------

## 666threesixes666

"everything pointed to dhcp" thats why i PM'ed to post what was loading upon init, and NM invokes dhcp not a rc script that should be removed.  dhclient, dhcpcd, potato tomato....    im stumped, as his rc-update doesn't show dhcp scripts that need removed.

seems like reason3 went away for me when i moved up kernel versions to 3.9.9 & moved to udev ugly unreasonable names.

----------

## st3f4n2006

what dhcpcd version you have and config you have? using the latest (5.99) i had problems getting an correct ip (it seems that the my dhcpcd was sending some weird MAC to the server - we use ipv4 and the client sent ipv6 unique id/ mac).

I had to disable "duid" in /etc/dhcpcd.conf and now everything works fine without any ipv6 configs (default NetworkManager)

----------

## Martux

Is there any fix for this yet? Having this issue now on two machines, with two different NICs and it's starting to get disgusting.

How does one set a static IP for wireless (with Networkmanager)? Troubleshooting and emerging different versions is pretty tough with no Internet...

----------

## 666threesixes666

manually assign ip address for nm-applet (and i imagine kde's networkmanagement) attempt to connect to access point, cancel....  right click "edit connections" nm-applet....  click ap name, edit...

could you mask the newer versions, and revert back to 5.6.4 (where im not experiencing these problems?)

----------

