# kernel 3.8.13 wireless problem

## jimmij

Recently I've emerged 3.8.13 kernel and now my wireless connection works only a few seconds. After that although wpa_gui shows that I'm still connected in fact I cannot reach any webpage or even ping anywhere. To connect again for another ~5 sec I need to restart wpa_supplicant.

On the same machine with the same network configuration (/etc/conf.d/net, dhcpcd.conf, wpa, and so forth) I still have old kernel 3.5.7 where I do not experience such issue so most probably this is the problem of a new kernel or my misconfiguration of it.

In fact not very much have changed in ".config" since 3.5.7 from my side, here is the diff:

```
< # Linux/i386 3.8.13-gentoo Kernel Configuration

> # Linux/i386 3.5.7-gentoo Kernel Configuration

> CONFIG_BSD_PROCESS_ACCT=y

> CONFIG_AUDITSYSCALL=y

> CONFIG_AUDIT_WATCH=y

> CONFIG_AUDIT_TREE=y

< CONFIG_TICK_CPU_ACCOUNTING=y

< CONFIG_BSD_PROCESS_ACCT=y

< CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y

< CONFIG_ARCH_WANTS_PROT_NUMA_PROT_NONE=y

< CONFIG_UIDGID_CONVERTED=y

< CONFIG_SCHED_AUTOGROUP=y

< CONFIG_HAVE_UID16=y

< CONFIG_SYSCTL_EXCEPTION_TRACE=y

< CONFIG_HAVE_PERF_REGS=y

< CONFIG_HAVE_PERF_USER_STACK_DUMP=y

< CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y

< CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y

< CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y

< CONFIG_MODULES_USE_ELF_REL=y

< CONFIG_GENERIC_SIGALTSTACK=y

< CONFIG_CLONE_BACKWARDS=y

> CONFIG_X86_MPPARSE=y

> CONFIG_X86_EXTENDED_PLATFORM=y

> CONFIG_X86_GENERIC=y

> CONFIG_X86_CMPXCHG=y

> CONFIG_X86_XADD=y

> CONFIG_X86_WP_WORKS_OK=y

> CONFIG_X86_INVLPG=y

> CONFIG_X86_BSWAP=y

> CONFIG_X86_POPAD_OK=y

> CONFIG_X86_INTEL_USERCOPY=y

< CONFIG_NR_CPUS=4

> CONFIG_NR_CPUS=8

> CONFIG_X86_MCE_AMD=y

> CONFIG_MICROCODE_AMD=y

< CONFIG_COMPACTION=y

< CONFIG_MIGRATION=y

< CONFIG_X86_SMAP=y

> CONFIG_PM_RUNTIME=y

< CONFIG_PM_SLEEP_DEBUG=y

> CONFIG_CAN_PM_TRACE=y

< CONFIG_ACPI_I2C=y

< CONFIG_CPU_FREQ_GOV_COMMON=y

< CONFIG_X86_ACPI_CPUFREQ_CPB=y

> CONFIG_PCIE_PME=y

< CONFIG_COREDUMP=y

> CONFIG_NETWORK_SECMARK=y

> CONFIG_NF_CONNTRACK_SECMARK=y

< CONFIG_NF_NAT=y

< CONFIG_NF_NAT_NEEDED=y

< CONFIG_NF_NAT_FTP=y

< CONFIG_NF_NAT_IRC=y

< CONFIG_NF_NAT_SIP=y

> CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y

> CONFIG_NETFILTER_XT_TARGET_SECMARK=y

< CONFIG_NF_NAT_IPV4=y

< CONFIG_IP_NF_TARGET_MASQUERADE=m

> CONFIG_NF_NAT=y

> CONFIG_NF_NAT_NEEDED=y

> CONFIG_IP_NF_TARGET_MASQUERADE=y

> CONFIG_NF_NAT_FTP=y

> CONFIG_NF_NAT_IRC=y

> CONFIG_NF_NAT_SIP=y

< CONFIG_HAVE_NET_DSA=y

< CONFIG_WEXT_SPY=y

< CONFIG_LIB80211_CRYPT_WEP=m

< CONFIG_LIB80211_CRYPT_CCMP=m

< CONFIG_LIB80211_CRYPT_TKIP=m

< CONFIG_DEVTMPFS_MOUNT=y

> CONFIG_BLK_DEV_RAM=y

> CONFIG_BLK_DEV_RAM_COUNT=16

> CONFIG_BLK_DEV_RAM_SIZE=16384

> CONFIG_SCSI_WAIT_SCAN=m

< CONFIG_PATA_AMD=y

> CONFIG_NETCONSOLE=y

> CONFIG_NETPOLL=y

> CONFIG_NET_POLL_CONTROLLER=y

> CONFIG_ATL1=y

> CONFIG_FDDI=y

> CONFIG_ATMEL=m

> CONFIG_PCI_ATMEL=m

> CONFIG_PCMCIA_ATMEL=m

< CONFIG_IPW2100=m

< CONFIG_LIBIPW=m

> CONFIG_INPUT_JOYSTICK=y

> CONFIG_INPUT_TABLET=y

> CONFIG_INPUT_TOUCHSCREEN=y

< CONFIG_SERIAL_8250_PNP=y

> CONFIG_SERIAL_8250_PNP=y

< CONFIG_I2C_I801=m

> CONFIG_I2C_I801=y

< CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y

< CONFIG_STEP_WISE=y

< CONFIG_MEDIA_CAMERA_SUPPORT=y

> CONFIG_VIDEO_V4L2_COMMON=y

> CONFIG_VIDEO_MEDIA=y

> CONFIG_MEDIA_TUNER=y

> CONFIG_MEDIA_TUNER_SIMPLE=y

> CONFIG_MEDIA_TUNER_TDA8290=y

> CONFIG_MEDIA_TUNER_TDA827X=y

> CONFIG_MEDIA_TUNER_TDA18271=y

> CONFIG_MEDIA_TUNER_TDA9887=y

> CONFIG_MEDIA_TUNER_TEA5761=y

> CONFIG_MEDIA_TUNER_TEA5767=y

> CONFIG_MEDIA_TUNER_MT20XX=y

> CONFIG_MEDIA_TUNER_XC2028=y

> CONFIG_MEDIA_TUNER_XC5000=y

> CONFIG_MEDIA_TUNER_XC4000=y

> CONFIG_MEDIA_TUNER_MC44S803=y

> CONFIG_VIDEO_CAPTURE_DRIVERS=y

> CONFIG_VIDEO_HELPER_CHIPS_AUTO=y

< CONFIG_MEDIA_USB_SUPPORT=y

> CONFIG_V4L_USB_DRIVERS=y

> CONFIG_V4L_PCI_DRIVERS=y

< CONFIG_MEDIA_SUBDRV_AUTOSELECT=y

< CONFIG_DRM_I810=y

< CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0

> CONFIG_HID_LOGITECH_DJ=m

> CONFIG_USB_SUSPEND=y

< CONFIG_USB_EHCI_PCI=y

> CONFIG_USB_PRINTER=y

> CONFIG_USB_LIBUSUAL=y

< CONFIG_EDAC_LEGACY_SYSFS=y

> CONFIG_EDAC_DECODE_MCE=y

> CONFIG_EEEPC_LAPTOP=m

> CONFIG_EXT4_FS_XATTR=y

< CONFIG_NLS_ISO8859_2=y

< CONFIG_HAVE_DEBUG_KMEMLEAK=y

< CONFIG_RCU_CPU_STALL_TIMEOUT=21

> CONFIG_RCU_CPU_STALL_TIMEOUT=60

< CONFIG_TRACE_CLOCK=y

> CONFIG_DEBUG_NX_TEST=m

< CONFIG_CRYPTO_ECB=m

< CONFIG_CRYPTO_MICHAEL_MIC=m

< CONFIG_CRYPTO_ARC4=m

< CONFIG_CRYPTO_HW=y

< CONFIG_PERCPU_RWSEM=y

> CONFIG_CRC_T10DIF=y

< CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
```

Full .config of 3.8.13 is here.

I've got a broadcom card so wl driver is in use.

Does anyone knows what is going on here?

----------

## teika

A workaround may help, although it's not a fix at all; instead of restarting wpa_supplicant, $ wpa_cli scan or wpa_cli scan_result from the commandline reconnects my wifi dongle. (I don't remember exactly which does the job. Maybe any of two does.)

----------

## 666threesixes666

id give 3.9.4 a whirl.  i had major problems in 3.8 series

----------

## jimmij

AFAICS 3.9.4 in not in portage tree yet, 3.9.3 is the newest unstable gentoo-sources.

In fact 3.8.13 is the only stable kernel right now.  :Rolling Eyes: 

----------

## transcend

 *jimmij wrote:*   

> AFAICS 3.9.4 in not in portage tree yet, 3.9.3 is the newest unstable gentoo-sources.
> 
> In fact 3.8.13 is the only stable kernel right now. 

 

3.9.4 IS the latest STABLE version.  re: kernel.org

----------

## eccerr0r

My 3.8.13-gentoo kernel is working all right with an Intel wireless-N adapter (mPCIe)...  I also used a 3.8.13-gentoo kernel with a b43 Broadcom wifi that appears to work fine too (mini PCI).  Both are using networkmanager/Gnome.

----------

## techuser

same problem here with 2 different PCs, only with this last kernel 3.8.13, I must do "iwlist wlanX scan" twice to get the list of networks in kde4 and connect to them.

both PCs are 64bits

----------

## TomWij

Please obtain more diagnostics:

 *Quote:*   

> # First set wpa_supplicant_wlan0="-f /var/log/wpa.log" (change wlan0 by your interface) in /etc/conf.d/net, reboot.
> 
> emerge net-wireless/iw
> 
> iw event -t -f | tee /tmp/iw_events
> ...

 

Please also file bugs at https://bugs.gentoo.org as we don't usually monitor the forums for these.

----------

## techuser

thanks TomWij!

but, I do not use WPA, yes, I should, but right now is WEP, so wpa_supplicant_wlan0="-f /var/log/wpa.log" makes no difference.

And from the iw output I only get this interesting info:

iw event -t -f | tee /tmp/iw_events 

1369986305.022687: wlan0 (phy #0): scan started

1369986306.902916: wlan0 (phy #0): scan finished: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472 2484,

1369986307.808631: wlan0 (phy #0): scan started

1369986309.689390: wlan0 (phy #0): scan finished: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472 2484,

1369986324.895735: wlan0 (phy #0): scan started

1369986325.998200: wlan0 (phy #0): scan finished: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472 2484, ""

1369986330.712060: wlan0 (phy #0): scan started

1369986331.812237: wlan0 (phy #0): scan finished: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472 2484, ""

1369986336.435460: wlan0 (phy #0): scan started

1369986337.540622: wlan0 (phy #0): scan finished: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472 2484, "myAP" ""

first 2 lines without "" is when I do iwlist wlan0 scan.

----------

## TomWij

 *techuser wrote:*   

> but, I do not use WPA, yes, I should, but right now is WEP, so wpa_supplicant_wlan0="-f /var/log/wpa.log" makes no difference.

 

This makes no sense, I'm not referring to the WPA encryption.

----------

## techuser

so, networkmanager uses wpa_supplicant too for WEP?

ok then I created the log line in /etc/conf.d/net and testing now to see if I get some logs

thanks!

----------

## TomWij

 *techuser wrote:*   

> so, networkmanager uses wpa_supplicant too for WEP?

 

http://en.wikipedia.org/wiki/Wpa_supplicant --> key management for CCMP, TKIP, WEP (both 104/128 and 40/64 bit)

----------

## techuser

hi again.

I do not think this logs are gonna tell you anything:

cat /etc/conf.d/net

#Generated by NetworkManager

###### Global Configuration ######

###### Connection Configuration ######

#----------------------------------

config_eth0="dhcp"

auto_eth0="true"

enable_ipv6_eth0="false"

wpa_supplicant_wlan0="-f /var/log/wpa.log"

-------------

http://bpaste.net/show/103560/    dmesg

http://bpaste.net/show/103563/   iw_events

/var/log/wpa.log  just does not exists... :

cat /var/log/wpa.log

cat: /var/log/wpa.log: No such file or directory

It just happen with this new kernel, probably is something related to the driver.

$> emerge -pv net-wireless/wpa_supplicant

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R    ] net-wireless/wpa_supplicant-0.7.3-r5  USE="dbus gnutls qt4 readline ssl -debug -eap-sim -fasteap -madwifi (-ps3) (-selinux) -wimax -wps" 1,600 kB

iwconfig 

lo        no wireless extensions.

enp9s0    no wireless extensions.

wlan0     IEEE 802.11bg  ESSID:"myESSID"  

          Mode:Managed  Frequency:2.417 GHz  Access Point: 00:xx:xx:xx:xx:xx 

           xxxxxx....

----------

## TomWij

Looking at the dmesg it seems to delay loading the firmware, try to build the firmware into the kernel.

In "Generic Driver Options" you can list them in "External firmware blobs to build into the kernel binary" and also point where to find them "Firmware blobs root directory" (probably /lib/firmware), you probably want to read the other options there as well. I don't have an idea how the firmware name is called though, so that's something that still needs to be figured out; you can find the firmware files in /lib/firmware, look for b43*.fw files, they could be in a sub directory.

----------

## techuser

thanks, but the firmware's delay is not the problem for sure, because after a few minutes and after being working right, if I look for networks around in the Kde4 network menu they have all gone except the one I'm connected to. 

So it looks like the Networkmaneger or the network menu cannot look for networks, but for sure is something kernel related, because it only happens with this last kernel, and when I do iwlist wlan0 scan (twice or more times, not only one time) I can see all networks around.

So I'm going to check the kernels options again. And try what you said, but I do not think is the firmware.

----------

## techuser

hi again

I did not do the firmware stuff yet, but I had put b43 as module and debug mode and I thin there is interesting stuff:

http://bpaste.net/show/103777/

as you can see the firmware is loaded a few times, and the card is removed too.

if I unload and load the b43 module I get this:

[ 1043.024076] b43-phy0 debug: Removing Interface type 2

[ 1043.024261] b43-phy0 debug: Wireless interface stopped

[ 1043.024468] b43-phy0 debug: DMA-32 rx_ring: Used slots 2/256, Failed frames 0/0 = 0.0%, Average tries 0.00

[ 1043.024825] b43-phy0 debug: DMA-32 tx_ring_AC_BK: Used slots 2/256, Failed frames 0/1 = 0.0%, Average tries 5.00

[ 1043.027188] b43-phy0 debug: DMA-32 tx_ring_AC_BE: Used slots 24/256, Failed frames 0/598 = 0.0%, Average tries 1.98

[ 1043.029089] b43-phy0 debug: DMA-32 tx_ring_AC_VI: Used slots 0/256, Failed frames 0/0 = 0.0%, Average tries 0.00

[ 1043.031057] b43-phy0 debug: DMA-32 tx_ring_AC_VO: Used slots 4/256, Failed frames 9/786 = 1.1%, Average tries 1.20

[ 1043.033084] b43-phy0 debug: DMA-32 tx_ring_mcast: Used slots 0/256, Failed frames 0/0 = 0.0%, Average tries 0.00

[ 1046.790595] b43-phy1: Broadcom 4311 WLAN found (core revision 10)

[ 1046.805058] b43-phy1: Found PHY: Analog 4, Type 2 (G), Revision 8

[ 1046.805087] b43-phy1 debug: Found Radio: Manuf 0x17F, Version 0x2050, Revision 2

[ 1046.812404] Broadcom 43xx driver loaded [ Features: PML ]

[ 1046.822169] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'

[ 1046.974093] b43-phy1: Loading firmware version 666.2 (2011-02-23 01:15:07)

[ 1047.008280] b43-phy1 debug: Chip initialized

[ 1047.008723] b43-phy1 debug: 32-bit DMA initialized

[ 1047.008790] b43-phy1 debug: QoS enabled

[ 1047.017575] b43-phy1 debug: Wireless interface started

[ 1047.017667] b43-phy1 debug: Adding Interface type 2

[ 1047.018180] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

and I cannot see any network again till I do iwlist wlan0 scan twice, when I run iwlist I do not see any kernel message, but just when I connect the the network I get:

[ 1171.626054] b43-phy1 debug: Removing Interface type 2

[ 1171.626209] b43-phy1 debug: Wireless interface stopped

[ 1171.626349] b43-phy1 debug: DMA-32 rx_ring: Used slots 1/256, Failed frames 0/0 = 0.0%, Average tries 0.00

[ 1171.626670] b43-phy1 debug: DMA-32 tx_ring_AC_BK: Used slots 0/256, Failed frames 0/0 = 0.0%, Average tries 0.00

[ 1171.628054] b43-phy1 debug: DMA-32 tx_ring_AC_BE: Used slots 0/256, Failed frames 0/0 = 0.0%, Average tries 0.00

[ 1171.630069] b43-phy1 debug: DMA-32 tx_ring_AC_VI: Used slots 0/256, Failed frames 0/0 = 0.0%, Average tries 0.00

[ 1171.632058] b43-phy1 debug: DMA-32 tx_ring_AC_VO: Used slots 0/256, Failed frames 0/0 = 0.0%, Average tries 0.00

[ 1171.634057] b43-phy1 debug: DMA-32 tx_ring_mcast: Used slots 0/256, Failed frames 0/0 = 0.0%, Average tries 0.00

[ 1171.767071] b43-phy1: Loading firmware version 666.2 (2011-02-23 01:15:07)

[ 1171.803110] b43-phy1 debug: Chip initialized

[ 1171.803558] b43-phy1 debug: 32-bit DMA initialized

[ 1171.803625] b43-phy1 debug: QoS enabled

[ 1171.811705] b43-phy1 debug: Wireless interface started

[ 1171.811797] b43-phy1 debug: Adding Interface type 2

[ 1171.814502] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

[ 1172.969699] wlan0: authenticate with  [...]

really strange, it reloads the firmware and the connects... but the firmware must be loaded before connecting so I could run iwlist wlan0 scan...

hope this info helps.

----------

## bandreabis

news?

----------

## augury

I'd drop the QoS.

----------

## bandreabis

 *augury wrote:*   

> I'd drop the QoS.

 

How do I eat it???

Could you translate?

----------

## techuser

same bug here:

https://forums.gentoo.org/viewtopic-t-960664-highlight-b43.html

https://forums.gentoo.org/viewtopic-t-961398-highlight-b43.html

https://forums.gentoo.org/viewtopic-t-960820-highlight-b43.html  same one?, not b43

kernel 3.7.10 working well

kernel 3.8.13 buggy

let's wait for next stable gentoo's kernel....

----------

## bandreabis

Have anyone tried any newer kernel version???

----------

## TomWij

 *techuser wrote:*   

> kernel 3.7.10 working well
> 
> kernel 3.8.13 buggy

 

Anyone up for doing a bisect to find the bad commit?

http://wiki.gentoo.org/wiki/Kernel_git-bisect

Please report this bad commit at https://bugs.gentoo.org and I'll look into it.

----------

## bandreabis

 *bandreabis wrote:*   

> Have anyone tried any newer kernel version???

 

Tryed latest 3.10.1 kernel with no luck.

----------

## jimmij

 *bandreabis wrote:*   

>  *bandreabis wrote:*   Have anyone tried any newer kernel version??? 
> 
> Tryed latest 3.10.1 kernel with no luck.

 

I switched to 3.10.1 and bcma/brcmsmac module. It works fine apart from LED.

There is also small issue (error output) with lspci:

```
$ lspci -vvv > /dev/null

pcilib: sysfs_read_vpd: read failed: Connection timed out
```

which, as far as I googled about, is related to bug in firmware (I'm using sys-kernel/linux-firmware for this module).

Anyway 3.10.1 + bcma + linux-firmware is the best configuration for me, at least it works on every network which I have tested.

----------

