Boot up wifi state

Debian User Forums

Swithed hd to ssd, and after reinstalling, wifi does not work automatically anymore. There was annoying 5 minute wait of some systemd network-target, which I changed to 1 second.

# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto wlp2s0 iface wlp2s0 inet dhcp pre-up wpa_supplicant -iwlp2s0 -c/etc/wpa_supplicant/wpa_supplicant.conf gateway 192.168.1.1 auto enp3s0 iface enp3s0 inet dhcp 

I’ve tried up, pre-up, and without any prefix to wpa_supplicant line. None has worked.

I have to start wifi manually:

# wpa_supplicant -iwlp2s0 -c/etc/wpa_supplicant/wpa_supplicant.conf & # dhclient

What is missing, how could I get wifi to work at boot?

A snippet from /var/log/messages after boot:

Mar 16 17:22:50 samsung kernel: [ 7.313927] wlp2s0: authenticate with xx:xx:xx:xx:xx Mar 16 17:22:50 samsung kernel: [ 7.321421] wlp2s0: send auth to xx:xx:xx:xx:xx (try 1/3) Mar 16 17:22:50 samsung kernel: [ 7.323515] wlp2s0: authenticated Mar 16 17:22:50 samsung kernel: [ 7.328101] wlp2s0: associate with xx:xx:xx:xx:xx (try 1/3) Mar 16 17:22:50 samsung kernel: [ 7.330590] wlp2s0: RX AssocResp from xx:xx:xx:xx:xx (capab=0x1411 status=0 aid=3) Mar 16 17:22:50 samsung kernel: [ 7.330738] wlp2s0: associated Mar 16 17:22:51 samsung kernel: [ 7.853380] wlp2s0: deauthenticating from xx:xx:xx:xx:xx by local choice (Reason: 3=DEAUTH_LEAVING) 

Head_on_a_Stick Posts: 13942 Joined: 2014-06-01 17:46 Location: /dev/chair Has thanked: 53 times Been thanked: 82 times

Re: Wifi not activated at boot

#2 Post by Head_on_a_Stick » 2019-03-16 16:08

and replace $unit.file with the name of the actual unit file(s) listed by the error message.

to see which units have failed, then use the journal to investigate more.

/etc/network/interfaces is run by networking.service

Try the method described in the Debian documentation instead:

Both methods should work though.

What about any error messages after you run

Il semble que la perfection soit atteinte non quand il n’y a plus rien à ajouter, mais quand il n’y a plus rien à retrancher.

arzgi Posts: 988 Joined: 2008-02-21 17:03 Location: Finland Been thanked: 12 times

Re: Wifi not activated at boot

#3 Post by arzgi » 2019-03-16 17:12

~$ systemctl --failed UNIT LOAD ACTIVE SUB DESCRIPTION ● networking.service loaded failed failed Raise network interfaces 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. 1 loaded units listed. Pass --all to see loaded but inactive units, too. To show all installed unit files use 'systemctl list-unit-files'. # journalctl -u networking.service -- Logs begin at Sat 2019-03-16 19:39:54 EET, end at Sat 2019-03-16 19:47:05 EET. -- maalis 16 19:39:56 samsung systemd[1]: Starting Raise network interfaces. maalis 16 19:39:57 samsung wpa_supplicant[463]: Successfully initialized wpa_supplicant maalis 16 19:39:57 samsung dhclient[473]: Internet Systems Consortium DHCP Client 4.3.5 maalis 16 19:39:57 samsung ifup[410]: Internet Systems Consortium DHCP Client 4.3.5 maalis 16 19:39:57 samsung ifup[410]: Copyright 2004-2016 Internet Systems Consortium. maalis 16 19:39:57 samsung ifup[410]: All rights reserved. maalis 16 19:39:57 samsung ifup[410]: For info, please visit https://www.isc.org/software/dhcp/ maalis 16 19:39:57 samsung dhclient[473]: Copyright 2004-2016 Internet Systems Consortium. maalis 16 19:39:57 samsung dhclient[473]: All rights reserved. maalis 16 19:39:57 samsung dhclient[473]: For info, please visit https://www.isc.org/software/dhcp/ maalis 16 19:39:57 samsung dhclient[473]: maalis 16 19:39:57 samsung dhclient[473]: Listening on LPF/wlp2s0/00:24:d2:b5:cd:3a maalis 16 19:39:57 samsung ifup[410]: Listening on LPF/wlp2s0/00:24:d2:b5:cd:3a maalis 16 19:39:57 samsung ifup[410]: Sending on LPF/wlp2s0/00:24:d2:b5:cd:3a maalis 16 19:39:57 samsung ifup[410]: Sending on Socket/fallback maalis 16 19:39:57 samsung ifup[410]: DHCPREQUEST of 192.168.1.34 on wlp2s0 to 255.255.255.255 port 6 maalis 16 19:39:57 samsung dhclient[473]: Sending on LPF/wlp2s0/00:24:d2:b5:cd:3a maalis 16 19:39:57 samsung dhclient[473]: Sending on Socket/fallback maalis 16 19:39:57 samsung dhclient[473]: DHCPREQUEST of 192.168.1.34 on wlp2s0 to 255.255.255.255 po maalis 16 19:39:58 samsung wpa_supplicant[464]: wlp2s0: SME: Trying to authenticate with 84:16:f9:db: maalis 16 19:39:58 samsung wpa_supplicant[464]: wlp2s0: Trying to associate with 84:16:f9:db:9a:18 (S maalis 16 19:39:58 samsung wpa_supplicant[464]: wlp2s0: Associated with 84:16:f9:db:9a:18 maalis 16 19:39:58 samsung wpa_supplicant[464]: wlp2s0: WPA: Key negotiation completed with 84:16:f9: maalis 16 19:39:58 samsung wpa_supplicant[464]: wlp2s0: CTRL-EVENT-CONNECTED - Connection to 84:16:f9 maalis 16 19:40:04 samsung dhclient[473]: DHCPREQUEST of 192.168.1.34 on wlp2s0 to 255.255.255.255 po maalis 16 19:40:04 samsung ifup[410]: DHCPREQUEST of 192.168.1.34 on wlp2s0 to 255.255.255.255 port 6 maalis 16 19:40:04 samsung dhclient[473]: DHCPACK of 192.168.1.34 from 192.168.1.1 maalis 16 19:40:04 samsung ifup[410]: DHCPACK of 192.168.1.34 from 192.168.1.1 maalis 16 19:40:04 samsung ifup[410]: bound to 192.168.1.34 -- renewal in 594725643 seconds. maalis 16 19:40:04 samsung dhclient[552]: Internet Systems Consortium DHCP Client 4.3.5 maalis 16 19:40:04 samsung ifup[410]: Internet Systems Consortium DHCP Client 4.3.5 maalis 16 19:40:04 samsung ifup[410]: Copyright 2004-2016 Internet Systems Consortium. maalis 16 19:40:04 samsung ifup[410]: All rights reserved. maalis 16 19:40:04 samsung ifup[410]: For info, please visit https://www.isc.org/software/dhcp/ maalis 16 19:40:04 samsung dhclient[552]: Copyright 2004-2016 Internet Systems Consortium. maalis 16 19:40:04 samsung dhclient[552]: All rights reserved. maalis 16 19:40:04 samsung dhclient[552]: For info, please visit https://www.isc.org/software/dhcp/ maalis 16 19:40:04 samsung dhclient[552]: maalis 16 19:40:04 samsung dhclient[552]: Listening on LPF/enp3s0/00:13:77:ff:92:f3 maalis 16 19:40:04 samsung ifup[410]: Listening on LPF/enp3s0/00:13:77:ff:92:f3 maalis 16 19:40:04 samsung ifup[410]: Sending on LPF/enp3s0/00:13:77:ff:92:f3 maalis 16 19:40:04 samsung ifup[410]: Sending on Socket/fallback maalis 16 19:40:04 samsung ifup[410]: DHCPDISCOVER on enp3s0 to 255.255.255.255 port 67 interval 3 maalis 16 19:40:04 samsung dhclient[552]: Sending on LPF/enp3s0/00:13:77:ff:92:f3 maalis 16 19:40:04 samsung dhclient[552]: Sending on Socket/fallback maalis 16 19:40:04 samsung dhclient[552]: DHCPDISCOVER on enp3s0 to 255.255.255.255 port 67 interval maalis 16 19:40:07 samsung dhclient[552]: DHCPDISCOVER on enp3s0 to 255.255.255.255 port 67 interval maalis 16 19:40:07 samsung ifup[410]: DHCPDISCOVER on enp3s0 to 255.255.255.255 port 67 interval 8 maalis 16 19:40:15 samsung dhclient[552]: DHCPDISCOVER on enp3s0 to 255.255.255.255 port 67 interval maalis 16 19:40:15 samsung ifup[410]: DHCPDISCOVER on enp3s0 to 255.255.255.255 port 67 interval 14 maalis 16 19:40:29 samsung systemd[1]: networking.service: Start operation timed out. Terminating. maalis 16 19:40:29 samsung systemd[1]: networking.service: Main process exited, code=killed, status=1 maalis 16 19:40:29 samsung systemd[1]: Failed to start Raise network interfaces. maalis 16 19:40:29 samsung wpa_supplicant[464]: wlp2s0: CTRL-EVENT-DISCONNECTED bssid=84:16:f9:db:9a: maalis 16 19:40:29 samsung systemd[1]: networking.service: Unit entered failed state. maalis 16 19:40:29 samsung systemd[1]: networking.service: Failed with result 'timeout'. maalis 16 19:40:29 samsung wpa_supplicant[464]: nl80211: deinit ifname=wlp2s0 disabled_11b_rates=0 ) 
systemctl restart dhcpcd.service Failed to restart dhcpcd.service: Unit dhcpcd.service not found. 
# ifup wlp2s0 # ifup: interface wlp2s0 already configured 
# ifdown wlp2s0 # ifup wlp2s0 

Head_on_a_Stick Posts: 13942 Joined: 2014-06-01 17:46 Location: /dev/chair Has thanked: 53 times Been thanked: 82 times

Читайте также:  Buderus термостат wi fi

Re: Wifi not activated at boot

#4 Post by Head_on_a_Stick » 2019-03-16 19:14

That’s a bit vague, please list exactly what you tried and include the actual configuration file.

For clarity, I was intending that you try something like

# /etc/network/interfaces auto wlp2s0 iface wlp2s0 inet dhcp wpa-ssid "$ssid" wpa-psk "$hashed_password"

^ Replace $ssid with the name of the access point and replace $hashed_password with the password hash produced by the `wpa_passphrase` command.

Note that there shouldn’t be a need to configure the gateway because the dhcp client should do that — including a «gateway» declaration along with the dhcp directive may in fact be the cause of your problems (perhaps).

systemctl restart dhcpcd.service Failed to restart dhcpcd.service: Unit dhcpcd.service not found. 

Debian uses dhclient rather than dhcpcd.

But anyway you shouldn’t have any dhcp client enabled if you are using networking.service

Which unit files are enabled?

systemctl list-unit-files --state=enabled

How are you checking that?

Does `/sbin/iwconfig` show that you are authenticated?

# ifdown wlp2s0 # ifup wlp2s0 

So no errors after those commands then?

Your journal content seems to show that the ethernet interface is timing out, are there any problems with that connection?

Il semble que la perfection soit atteinte non quand il n’y a plus rien à ajouter, mais quand il n’y a plus rien à retrancher.

arzgi Posts: 988 Joined: 2008-02-21 17:03 Location: Finland Been thanked: 12 times

Re: Wifi not activated at boot

#5 Post by arzgi » 2019-03-16 19:20

/etc/systemd/system/network-online.target.wants/networking.service

timeout back to 5 minutes. And now it works. Thanks a lot HOAS, once more, my Guru!

Читайте также:  Wifi одна сеть несколько точек доступа

Just one minor thing, is there a way to put that wifi counsel happen in the background? As it now is very early in boot, there does not happen anything for 1 min 30 sec, what it approximately takes for wifi to get ready.

Head_on_a_Stick Posts: 13942 Joined: 2014-06-01 17:46 Location: /dev/chair Has thanked: 53 times Been thanked: 82 times

Re: Wifi not activated at boot

#6 Post by Head_on_a_Stick » 2019-03-16 19:33

arzgi wrote: is there a way to put that wifi counsel happen in the background? As it now is very early in boot, there does not happen anything for 1 min 30 sec, what it approximately takes for wifi to get ready.

I’m sorry but I don’t understand this. Can you explain some more please?

I’m sure networking.service shouldn’t take a minute and a half to start

Il semble que la perfection soit atteinte non quand il n’y a plus rien à ajouter, mais quand il n’y a plus rien à retrancher.

arzgi Posts: 988 Joined: 2008-02-21 17:03 Location: Finland Been thanked: 12 times

Re: Wifi not activated at boot

#7 Post by arzgi » 2019-03-16 19:56

Head_on_a_Stick wrote: So what was the actual problem then? How have you changed the configuration files to fix this?

Bit too hasty, sorry. Corrected /etc/network/interfaces as you suggested, then this what was in the wiki:

sudo systemctl reenable wpa_supplicant.service sudo systemctl restart wpa_supplicant.service

dhcp is not needed, thanks for clarifying.

, which gave error not online or smth like that

ethernet has worked always, well did not test when timeout was 1 second, then propbaly not.

Читайте также:  Изменить пароль имя сети wi fi

arzgi wrote: is there a way to put that wifi counsel happen in the background? As it now is very early in boot, there does not happen anything for 1 min 30 sec, what it approximately takes for wifi to get ready.

Head_on_a_Stick wrote: I’m sorry but I don’t understand this. Can you explain some more please? I

I’m sure networking.service shouldn’t take a minute and a half to start

That is the same it was before reinstall. XFCE booted fully, then I saw in gkrellm when wifi counsel happened, and it was close to minute after XFCE had loaded. I have not investigated this, I think router being on metal shelf, or actually on a wood board, which is attached to shelf frame, is not ideal, but to alter that would be too difficult. Well perhaps if I changed all my furniture, but I would have to ask my wife

EDIT: On the other hand, my phone which I keep very near this notebook, changes to wifi a _much_ sooner. So tried a usb wifi dongle, perhaps a few seconds quicker, but not much.

Источник

Оцените статью
Adblock
detector