Bug 14576 - asus-laptop: WiFi LED does not function with the iwl3945 module
asus-laptop: WiFi LED does not function with the iwl3945 module
Status: CLOSED DOCUMENTED
Product: Drivers
Classification: Unclassified
Component: Platform
All Linux
: P1 low
Assigned To: Corentin Chary
https://bugs.launchpad.net/ubuntu/+so...
:
Depends on:
Blocks: 56331
  Show dependency treegraph
 
Reported: 2009-11-10 10:22 UTC by Donatas G.
Modified: 2013-04-09 06:23 UTC (History)
4 users (show)

See Also:
Kernel Version: 2.6.31
Tree: Mainline
Regression: No


Attachments
last 100 lines of dmesg - with output resulting of wifi toggle commands (7.14 KB, text/plain)
2009-11-10 10:22 UTC, Donatas G.
Details
Last 100 lines of kernel log (9.97 KB, text/plain)
2009-11-10 10:23 UTC, Donatas G.
Details
Extended output from lspci (12.24 KB, text/plain)
2009-11-10 10:24 UTC, Donatas G.
Details

Description Donatas G. 2009-11-10 10:22:19 UTC
Created attachment 23722 [details]
last 100 lines of dmesg - with output resulting of wifi toggle commands

Hardware Environment: Asus A8F
Software Environment: Kubuntu 9.10 (i386)
Problem Description: 
WiFi LED does not toggle together with the wireless radio

Extended problem description:
On Asus A8F laptop the wireless LED does not update according to the actual wifi radio state: after boot the wireless is on and the LED is on; upon toggling wireless of with Alt+F2 the wireless is turned off, but the LED remains on. But if I put the laptop to sleep ad wake it up, the wireless comes back nicely, but the LED now is off and no longer toggles to on (though the wireless radio itself continues to toggle fine). 

Wireless card: Intel Corporation PRO/Wireless 3945ABG

me@bala:~$ uname -a
Linux bala 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:04:26 UTC 2009 i686 GNU/Linux

me@bala:/var/log$ lspci | grep Wireless
01:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)
Comment 1 Donatas G. 2009-11-10 10:23:49 UTC
Created attachment 23723 [details]
Last 100 lines of kernel log
Comment 2 Donatas G. 2009-11-10 10:24:41 UTC
Created attachment 23724 [details]
Extended output from lspci
Comment 3 Reinette Chatre 2010-01-29 06:15:32 UTC
Are you using the asus-laptop module to manage this platform? The module makes some useful data available via sysfs that will help us see if its status matches with what the wireless driver. Could you please monitor the "ledd" and "wlan" sysfs files as you change wifi state with "Alt+F2" to see if they reflect the status correctly?
Comment 4 Donatas G. 2010-02-26 10:17:15 UTC
Kernel module asus_laptop is loaded: 

dg@bala:~$ lsmod | grep asus
asus_laptop            17400  0
led_class               4096  4 sdhci,iwl3945,iwlcore,asus_laptop

So I tried to monitor the files as you suggested.

root@bala:/# ls -l /sys/devices/platform/asus_laptop/ledd
---------- 1 root root 4096 2010-02-26 11:54 /sys/devices/platform/asus_laptop/ledd
root@bala:/# cat /sys/devices/platform/asus_laptop/ledd
cat: /sys/devices/platform/asus_laptop/ledd: Permission denied

So I changed permissions to be able to monitor it: 
root@bala:/# sudo chmod 655 /sys/devices/platform/asus_laptop/ledd

State: wireless on, wled off (after resume from sleep):

root@bala:/# cat /sys/devices/platform/asus_laptop/ledd
cat: /sys/devices/platform/asus_laptop/ledd: Input/output error
root@bala:/# cat /sys/devices/platform/asus_laptop/wlan
1

Now I toggle it with Fn+F2: Wireless goes off, wled stays off: 

root@bala:/# cat /sys/devices/platform/asus_laptop/ledd
cat: /sys/devices/platform/asus_laptop/ledd: Input/output error
root@bala:/# cat /sys/devices/platform/asus_laptop/wlan
0

Now I push toggle it second time with Fn+F2: Wireless goes on, wled goes on: 
root@bala:/# cat /sys/devices/platform/asus_laptop/ledd
cat: /sys/devices/platform/asus_laptop/ledd: Input/output error
root@bala:/# cat /sys/devices/platform/asus_laptop/wlan
1

The wled actually goes on not because the kernel makes it do so, but because I have enabled acpi scripts to toggle it. The actual command that does it is: 

echo -n 0 > /sys/devices/platform/asus_laptop/wlan
echo -n 1 > /sys/devices/platform/asus_laptop/wlan

if I corrupt the script /usr/share/acpi-support/state-funcs that does it, /sys/devices/platform/asus_laptop/wlan status does not change upon toggling Fn+F2 while the actual wirelesss status does change.

These tests were done using: 

root@bala:/# uname -a
Linux bala 2.6.31-19-generic #56-Ubuntu SMP Thu Jan 28 01:26:53 UTC 2010 i686 GNU/Linux
Comment 5 Reinette Chatre 2010-03-03 22:06:19 UTC
(In reply to comment #4)
> Kernel module asus_laptop is loaded: 
> 
> dg@bala:~$ lsmod | grep asus
> asus_laptop            17400  0
> led_class               4096  4 sdhci,iwl3945,iwlcore,asus_laptop
> 
> So I tried to monitor the files as you suggested.
> 
> root@bala:/# ls -l /sys/devices/platform/asus_laptop/ledd
> ---------- 1 root root 4096 2010-02-26 11:54
> /sys/devices/platform/asus_laptop/ledd

This is strange ... it really looked from the driver as though this should be readable and writable.

> The wled actually goes on not because the kernel makes it do so, but because I
> have enabled acpi scripts to toggle it. The actual command that does it is: 
> 
> echo -n 0 > /sys/devices/platform/asus_laptop/wlan
> echo -n 1 > /sys/devices/platform/asus_laptop/wlan
> 
> if I corrupt the script /usr/share/acpi-support/state-funcs that does it,
> /sys/devices/platform/asus_laptop/wlan status does not change upon toggling
> Fn+F2 while the actual wirelesss status does change.

Could you please elaborate on why you did this? It sounds like the acpi scripts are doing the right thing ... why did you disable them?

I do not see much the driver can do here ... perhaps this bug should rather be assigned to the platform group.
Comment 6 Zhang Rui 2010-03-25 06:21:23 UTC
re-assign to Corentin Chary.
Comment 7 Corentin Chary 2010-03-25 07:50:04 UTC
Please read:
http://dev.iksaif.net/projects/acpi4asus/wiki/WAPF_and_Leds
http://dev.iksaif.net/projects/acpi4asus/wiki/Asus-laptop_WAPF

And see if wapf can do something for you.

Most of the time, the led is down when bluetooth *and* wlan devices are down.
Comment 8 Donatas G. 2012-10-22 02:06:09 UTC
I have tried toggling wapf parameter of asus_laptop module, with no success (hardware control of led does not work). So, it means that the support does not work, and there is nothing to be fixed?

(In reply to comment #4)

I corrupt the script, because it is a way of testing if hardware control of the LED is working... The part about the software toggling of the LED state is removed from all versions of Ubuntu since I reported this bug, so in a sense, it is corrupted by default on ubuntu.

If I get it right, I should go back and report this in Ubuntu bugtracker, for they should get the scripts right in asus acpi module.

Note You need to log in before you can comment on or make changes to this bug.