FS#36038 - [netctl] netctl-auto@ Reconnect fails after cycling rfkill hardware block
Attached to Project:
Arch Linux
Opened by Eric Waller (ewaller) - Friday, 05 July 2013, 19:00 GMT
Last edited by Jelle van der Waa (jelly) - Friday, 11 August 2023, 15:46 GMT
Opened by Eric Waller (ewaller) - Friday, 05 July 2013, 19:00 GMT
Last edited by Jelle van der Waa (jelly) - Friday, 11 August 2023, 15:46 GMT
|
Details
Description:
Using netctl-auto, a connection to a wireless AP is established normally. While running, the hardware switch is pressed, bringing the connection down. When the switch is again pressed, the driver notices the removal of the block, but the netctl framework does not bring the network back up. Logs seem to indicate that the framework notes the interface going down, and tries to place it back up. Warnings indicate that there was a software attempt to enable the radio, but that it remains blocked and to unblock it manually. After unblocking it manually, the wireless driver notices, but the netctl framework takes no action. To bring the network back up, the NIC must be down'ed, then up'ed. Additional info: netctl 1.1-1 wpa_actiond 1.4-2 b43-firmware 5.100.138-2 Broadcom wireless: ewaller$@$odin ~ 1010 %lspci -nn |grep Broad 02:00.0 Network controller [0280]: Broadcom Corporation BCM4312 802.11b/g LP-PHY [14e4:4315] (rev 01) ewaller$@$odin ~ 1011 % lsmod | grep b43 b43 362628 0 bcma 32930 1 b43 mac80211 487726 1 b43 cfg80211 452332 2 b43,mac80211 ssb 55243 1 b43 pcmcia 45708 2 b43,ssb mmc_core 94486 4 b43,ssb,sdhci,sdhci_pci uname -a: Linux odin 3.9.8-1-ARCH #1 SMP PREEMPT Thu Jun 27 21:37:31 CEST 2013 x86_64 GNU/Linux Steps to reproduce: --> Boot, connect and run normally. --> Press Radio Switch on Laptop to kill connection. Jul 05 11:25:19 odin kernel: ieee80211 phy0: wlan0: No probe response from AP c4:3d:c7:5d:eb:8f after 500ms, disconnecting. Jul 05 11:25:19 odin wpa_actiond[383]: Interface 'wlan0' lost connection to network 'Woodlyn' Jul 05 11:25:19 odin kernel: cfg80211: Calling CRDA to update world regulatory domain Jul 05 11:25:19 odin kernel: cfg80211: World regulatory domain updated: Jul 05 11:25:19 odin kernel: cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp) Jul 05 11:25:19 odin kernel: cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) Jul 05 11:25:19 odin kernel: cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm) Jul 05 11:25:19 odin kernel: cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm) Jul 05 11:25:19 odin kernel: cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) Jul 05 11:25:19 odin kernel: cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) Jul 05 11:25:19 odin kernel: cfg80211: Calling CRDA for country: US Jul 05 11:25:19 odin kernel: cfg80211: Regulatory domain changed to country: US Jul 05 11:25:19 odin kernel: cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp) Jul 05 11:25:19 odin kernel: cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm) Jul 05 11:25:19 odin kernel: cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm) Jul 05 11:25:19 odin kernel: cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) Jul 05 11:25:19 odin kernel: cfg80211: (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) Jul 05 11:25:19 odin kernel: cfg80211: (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) Jul 05 11:25:19 odin kernel: cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm) Jul 05 11:25:19 odin kernel: cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4000 mBm) Jul 05 11:25:19 odin kernel: b43-phy0: Radio hardware status changed to DISABLED Jul 05 11:25:19 odin kernel: b43-phy0: Radio turned on by software Jul 05 11:25:19 odin kernel: b43-phy0: The hardware RF-kill button still turns the radio physically off. Press the button to turn it on. Jul 05 11:25:19 odin avahi-daemon[317]: Interface wlan0.IPv4 no longer relevant for mDNS. --> Press button to re-enable network. Nothing happens until the network is brought down and then brought back up by hand Jul 05 11:26:19 odin kernel: b43-phy0: Radio hardware status changed to ENABLED Jul 05 11:26:55 odin sudo[5101]: ewaller : TTY=pts/3 ; PWD=/home/ewaller ; USER=root ; COMMAND=/usr/bin/ip link set down wlan0 Jul 05 11:26:55 odin sudo[5101]: pam_unix(sudo:session): session opened for user root by (uid=0) Jul 05 11:26:55 odin sudo[5101]: pam_unix(sudo:session): session closed for user root Jul 05 11:27:06 odin sudo[5103]: ewaller : TTY=pts/3 ; PWD=/home/ewaller ; USER=root ; COMMAND=/usr/bin/ip link set up wlan0 Jul 05 11:27:06 odin sudo[5103]: pam_unix(sudo:session): session opened for user root by (uid=0) Jul 05 11:27:06 odin kernel: b43-phy0: Loading firmware version 666.2 (2011-02-23 01:15:07) Jul 05 11:27:10 odin sudo[5103]: pam_unix(sudo:session): session closed for user root Jul 05 11:27:10 odin kernel: IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready Jul 05 11:27:17 odin kernel: wlan0: authenticate with c4:3d:c7:5d:eb:8f Jul 05 11:27:17 odin kernel: wlan0: send auth to c4:3d:c7:5d:eb:8f (try 1/3) Jul 05 11:27:17 odin kernel: wlan0: authenticated Jul 05 11:27:17 odin kernel: wlan0: associate with c4:3d:c7:5d:eb:8f (try 1/3) Jul 05 11:27:17 odin kernel: wlan0: RX AssocResp from c4:3d:c7:5d:eb:8f (capab=0x411 status=0 aid=4) Jul 05 11:27:17 odin kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready Jul 05 11:27:17 odin kernel: wlan0: associated Jul 05 11:27:17 odin wpa_actiond[383]: Interface 'wlan0' connected to network 'Woodlyn' |
This task depends upon
Closed by Jelle van der Waa (jelly)
Friday, 11 August 2023, 15:46 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/n etctl/issues/3
Friday, 11 August 2023, 15:46 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/n etctl/issues/3
I realize that this is a poor contribution, but here it says that each rfkill device
emits uevents when blocked/unblocked:
https://www.kernel.org/doc/Documentation/rfkill.txt
which can be monitored using libudev or gudev.
I might try to hack something together to listen to wifi rfkills uevents, but I'm
not experienced at all on the netctl code nor udev stuff, I'm just interested on
getting this working :P
The original reporter, Eric Waller, said that "Nothing happens until the network is brought down and then brought back up by hand"
I discovered that bringing it down and then up was unnecessary for me. What brought the connection back was to run: dhcpcd wlp3s0
As this started the daemon, the connection was able to properly restore after each cycle of the radio block (for the current session).
One difference: I am using a ThinkPad T450s, where the keyboard key to disable the radio causes a "Soft blocked:" instead of a "Hard blocked:". My guess is that it does this because it's a toggle, not a switch.
Edit: after further investigation, I have narrowed the problem further. Netctl-auto starts the dhcpcd daemon this way:
# dhcpcd -4 -q -t 30 -K -L wlp3s0
while I was starting an additional instance with no switches:
# dhcpcd wlp3s0
I then tried various combinations of switches on dhcpcd to see why "my" instance was working and the other instance was not.
It turns out that it is the -4 switch (Configure IPv4 only) on the dhcpcd daemon started by netctl-auto which is keeping the dhcpcd daemon from configuring the interface after the rfkill is unblocked.
A factor may be that my ISP (Comcast) provides me with both IPv4 and IPv6 addresses (Native Dual Stack).
I don't know why netctl-auto starts the dhcpcd daemon with the -4 switch, but my analysis suggests that removing it would solve this bug.