You are not logged in.

#1 2014-12-18 15:25:48

samtech09
Member
Registered: 2014-12-10
Posts: 50

[SOLVED] NetworkManager doesn't connect Wifi at boot

Hi all,
I am again here with a new problem.

I setup my arch box to boot into console where i login and do startx to open DE.

The problem is, NetworkManager doesn't connect to WiFi on boot.
However it is working absolutely fine under DE (KDE). As soon as DE opens, KdeWallet ask for password and then WiFi connected.

But i want to connect to WiFi in console (without X). It is quite annoying to fire DE just to do a wget.

I checked, NetworkManager service is enabled and running.
Here is output of different commands that may help


dmesg | grep wlp3s0

[    5.798296] iwlwifi 0000:03:00.0 wlp3s0: renamed from wlan0
[    9.970511] IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready
[    9.970615] bridge-wlp3s0: device is wireless, enabling SMAC
[    9.970617] bridge-wlp3s0: up
[    9.970620] bridge-wlp3s0: attached
[    9.970645] bridge-wlp3s0: disabling the bridge
[    9.983966] bridge-wlp3s0: down
[    9.983972] bridge-wlp3s0: detached

systemctl status NetworkManager

● NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled)
   Active: active (running) since Thu 2014-12-18 20:33:26 IST; 1min 35s ago
 Main PID: 341 (NetworkManager)
   CGroup: /system.slice/NetworkManager.service
           └─341 /usr/bin/NetworkManager --no-daemon

systemctl --type=service

UNIT                                                                                      LOAD   ACTIVE SUB     DESCRIPTION
bluetooth.service                                                                         loaded active running Bluetooth service
dbus.service                                                                              loaded active running D-Bus System Message Bus
getty@tty1.service                                                                        loaded active running Getty on tty1
kmod-static-nodes.service                                                                 loaded active exited  Create list of required static device nodes for the current kernel
NetworkManager.service                                                                    loaded active running Network Manager
polkit.service                                                                            loaded active running Authorization Manager
systemd-backlight@backlight:acpi_video0.service                                           loaded active exited  Load/Save Screen Backlight Brightness of backlight:acpi_video0
systemd-fsck@dev-disk-by\x2duuid-696f8115\x2d2fed\x2d4b28\x2d9fab\x2d834f9c40ece4.service loaded active exited  File System Check on /dev/disk/by-uuid/696f8115-2fed-4b28-9fab-834f9c40ece4
systemd-fsck@dev-disk-by\x2duuid-af474e61\x2d31bb\x2d484d\x2db12f\x2d2923fc9cd4f5.service loaded active exited  File System Check on /dev/disk/by-uuid/af474e61-31bb-484d-b12f-2923fc9cd4f5
systemd-journal-flush.service                                                             loaded active exited  Trigger Flushing of Journal to Persistent Storage
systemd-journald.service                                                                  loaded active running Journal Service
systemd-logind.service                                                                    loaded active running Login Service
systemd-random-seed.service                                                               loaded active exited  Load/Save Random Seed
systemd-remount-fs.service                                                                loaded active exited  Remount Root and Kernel File Systems
systemd-rfkill@rfkill0.service                                                            loaded active exited  Load/Save RF Kill Switch Status of rfkill0
systemd-rfkill@rfkill1.service                                                            loaded active exited  Load/Save RF Kill Switch Status of rfkill1
systemd-rfkill@rfkill2.service                                                            loaded active exited  Load/Save RF Kill Switch Status of rfkill2
systemd-rfkill@rfkill3.service                                                            loaded active exited  Load/Save RF Kill Switch Status of rfkill3
systemd-sysctl.service                                                                    loaded active exited  Apply Kernel Variables
systemd-tmpfiles-setup-dev.service                                                        loaded active exited  Create Static Device Nodes in /dev
systemd-tmpfiles-setup.service                                                            loaded active exited  Create Volatile Files and Directories
systemd-udev-trigger.service                                                              loaded active exited  udev Coldplug all Devices
systemd-udevd.service                                                                     loaded active running udev Kernel Device Manager
systemd-update-utmp.service                                                               loaded active exited  Update UTMP about System Boot/Shutdown
systemd-user-sessions.service                                                             loaded active exited  Permit User Sessions
systemd-vconsole-setup.service                                                            loaded active exited  Setup Virtual Console
user@1000.service                                                                         loaded active running User Manager for UID 1000
vmware.service                                                                            loaded active exited  VMware daemon
vnstat.service                                                                            loaded active running vnStat network traffic monitor
wpa_supplicant.service                                                                    loaded active running WPA supplicant

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

30 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

Can someone guide me?

Last edited by samtech09 (2014-12-19 14:06:05)

Offline

#2 2014-12-18 15:30:56

davidm
Member
Registered: 2009-04-25
Posts: 371

Re: [SOLVED] NetworkManager doesn't connect Wifi at boot

I haven't hit that particular use case yet but would the nmcli command be of some help?

https://wiki.archlinux.org/index.php/Ne … ager#nmcli

Offline

#3 2014-12-18 15:38:28

samtech09
Member
Registered: 2014-12-10
Posts: 50

Re: [SOLVED] NetworkManager doesn't connect Wifi at boot

davidm wrote:

I haven't hit that particular use case yet but would the nmcli command be of some help?

https://wiki.archlinux.org/index.php/Ne … ager#nmcli

Thanks davidm. I have seen that link. But with that i have to do it manually.

As NetworkMangager already saved WiFi connection profile, so can't it use it to auto connect at boot.

On my previous Debian box, it was connecting to wifi at boot without loading X. There was no such issue.
Can't i get same behavior.

Offline

#4 2014-12-18 17:22:57

samtech09
Member
Registered: 2014-12-10
Posts: 50

Re: [SOLVED] NetworkManager doesn't connect Wifi at boot

dmesg | grep wlp3s0

[    5.798296] iwlwifi 0000:03:00.0 wlp3s0: renamed from wlan0
[    9.970511] IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready
[    9.970615] bridge-wlp3s0: device is wireless, enabling SMAC
[    9.970617] bridge-wlp3s0: up
[    9.970620] bridge-wlp3s0: attached
[    9.970645] bridge-wlp3s0: disabling the bridge
[    9.983966] bridge-wlp3s0: down
[    9.983972] bridge-wlp3s0: detached

Here wlp3s0 interface is made up then again made down.
I couldn't understand the reason for it, as there is no any other network service is running except NetworkManager.

Also it looks that NetworkManager is never trying to connect WiFi during boot as i couldn't find any log entry for that.

Offline

#5 2014-12-18 20:34:47

davidm
Member
Registered: 2009-04-25
Posts: 371

Re: [SOLVED] NetworkManager doesn't connect Wifi at boot

Hi since no one else was able to help yet I will share this which I see from the Wiki:

Once the NetworkManager daemon is started, it will automatically connect to any available "system connections" that have already been configured. Any "user connections" or unconfigured connections will need nmcli or an applet to configure and connect.

Do you have system level connections defined with the necessary keys as opposed to just user connections?  Sorry I don't have specifics as on my laptop I always just used the kde applet and my desktop is wired.

edit: to add if you have the authentication info stored in your wallet I don't think networkmanager has any way to get to it until you start KDE.  I could be wrong.  Look for another way to define it at the system level perhaps?  Just a guess.

Last edited by davidm (2014-12-18 20:57:07)

Offline

#6 2014-12-19 14:05:17

samtech09
Member
Registered: 2014-12-10
Posts: 50

Re: [SOLVED] NetworkManager doesn't connect Wifi at boot

edit: to add if you have the authentication info stored in your wallet I don't think networkmanager has any way to get to it until you start KDE.  I could be wrong.  Look for another way to define it at the system level perhaps?  Just a guess.

Yes that's the reason. After going through wiki i found that, in order to auto-connect wifi in console i have to put password in connection profile.
But that's not a good practice.

So i ended up by writing a custom script which just accept ESSID and Password and connect it using nmcli.
I can directly call nmcli but i am poor on memory and may not remember command for long smile

Anyways, thank you @davidm for pointing me to right direction.

Offline

Board footer

Powered by FluxBB