FS#18982 - [kernel26] 2.6.33 Plugging or unplugging notebook's charger renders Atheros card unsuable

Attached to Project: Arch Linux
Opened by Mauro Santos (R00KIE) - Tuesday, 06 April 2010, 20:58 GMT
Last edited by Andrea Scarpino (BaSh) - Saturday, 16 April 2011, 11:01 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Thomas Bächler (brain0)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
Unplugging or plugging the notebook's charger will make the Atheros wireless
card unusable if a scan is issued, as in changing the notebook from one place
to another, loosing the connection to the access point and scanning for
available access points. The card will remain unusable until the machine is
powered off and on again, rebooting will not make the card work again.

I can trigger this problem with all of arch's kernels from 2.6.32.9 to the
latest 2.6.33.2 in [testing]. I have found that this problem is easier to
trigger with newer kernel versions.

I have also tried using madwifi and ndiswrapper and I can still trigger this
problem. It doesn't seem to be a problem with rfkill because after the card
become unusable it still says everything is unblocked.

Steps to reproduce:
1) Turn on the machine with the charger plugged in and bring the network up
with 'ifconfig wlan0 up', no association with the access point is needed to
trigger the problem.

2) Issue a scan with 'iwlist wlan0 scan', the results are almost the expected
results apart from the signal strength (see file wlan0_scan_1). If another scan
is issued (see file wlan0_scan_2) then everything seems normal and it is still
possible to associate with the access point. No errors or warnings are issued.

3) Unplug the notebook charger.

4) Issue another scan, this time no access point is detected (see file
wlan0_scan_3) and there are errors in dmesg about "gain calibration timeout"
(see file dmesg_after). No other errors are issued as far as I can see.

This problem also happens if the sequence is booting the machine on battery,
performing steps 1) and 2), then plugging the charger and performing step 4).

I have asked in the forum [1] if anyone had any ideas but none of the suggested
solutions worked for me. I've reported this upstream [2] but as this is such an
odd problem it is hard to believe, even I though the card was half toast until I
got things to work fine with kernel 2.6.32.8.

[1] http://bbs.archlinux.org/viewtopic.php?id=93450
[2] https://bugzilla.kernel.org/show_bug.cgi?id=15693
This task depends upon

Closed by  Andrea Scarpino (BaSh)
Saturday, 16 April 2011, 11:01 GMT
Reason for closing:  Fixed
Additional comments about closing:  kernel26 2.6.38.2-1
Comment by Thomas Bächler (brain0) - Tuesday, 06 April 2010, 21:13 GMT
If you are associated to an access point, do you loose the connection too or is this just related to scanning?
Comment by Mauro Santos (R00KIE) - Tuesday, 06 April 2010, 21:54 GMT
It is scanning that triggers the problem but only after unplugging or plugging the charger,
I can scan all I want if I don't change the power state.

It doesn't matter if I turn the notebook on with it plugged and then unplug it or if I turn
it on using the battery and then plug it.
Comment by Mauro Santos (R00KIE) - Sunday, 11 April 2010, 13:05 GMT
I have more information (which I have reported upstream), after trying to test a kernel from git (which wouldn't boot without acpi=off).
I have discovered the problem is related (in my case) with having the module powernow_k8 loaded. There is no need to load any cpufreq*
modules or even change the cpu governor, just loading powernow_k8 is enough to be able to trigger the problem.
Comment by Mauro Santos (R00KIE) - Monday, 12 April 2010, 15:33 GMT
I have found a workaround until this gets sorted in the kernel.

I have an AMD cpu in my notebook and I have found that if I use phc-k8 [1] instead of powernow-k8 then
wireless works fine and I still have cpu frequency scaling. If anyone has an INTEL cpu and is also affected,
phc-intel [2] might be worth a try (if the problem is connected with modprobing the cpu driver).

[1] http://aur.archlinux.org/packages.php?ID=22953
[2] http://aur.archlinux.org/packages.php?ID=24980
Comment by Stan Holenda (texoft) - Sunday, 18 April 2010, 07:19 GMT
I confirm ROOKIE's workaround. Blacklisting powernow-k8 and using phc-k8 instead lets me use ath5k module and have CPU frequency scaling.
Comment by Gerardo Exequiel Pozzi (djgera) - Monday, 09 August 2010, 22:37 GMT
status with 2.6.35?
Comment by Mauro Santos (R00KIE) - Monday, 09 August 2010, 22:55 GMT
I did a quick test with 2.6.35 and I can still trigger the problem.
Comment by Gerardo Exequiel Pozzi (djgera) - Monday, 30 August 2010, 06:07 GMT
Upstream status: NEEDINFO. Looks like more info to research is needed.
Comment by Greg (dolby) - Friday, 04 March 2011, 03:19 GMT
Upstream status: INSUFFICIENT_DATA
Is it still a problem?
Comment by Stan Holenda (texoft) - Friday, 04 March 2011, 22:59 GMT
Everything works for me with 2.6.37 and powernow-k8.
Comment by Stan Holenda (texoft) - Saturday, 05 March 2011, 08:20 GMT
Everything works for me with 2.6.37 and powernow-k8.
Comment by Jelle van der Waa (jelly) - Thursday, 14 April 2011, 21:11 GMT
is this still an issue with the latest kernel for the reporter?
Comment by Stan Holenda (texoft) - Saturday, 16 April 2011, 10:43 GMT
Everything worked with 2.6.37-5. Had great issues with 2.6.37.5-1 (no wifi, hwclock readings unstable, even with phc_k8).

Upgraded to 2.6.38.2-1 and everything works just fine.

Loading...