View previous topic :: View next topic |
Author |
Message |
h017ah n00b
Joined: 18 Apr 2007 Posts: 46
|
Posted: Mon Dec 15, 2008 11:04 pm Post subject: How to get rid of iwlagn LED blinking (new Intel wifi LED) |
|
|
When upgrading from iwl4965 to iwlagn on my Dell XPS M1330, my Wifi LED indicator suddenly started working again due to the added support for /sys/class/leds-devices in the new iwlagn-driver in the recent kernels, which is very neat. One unnecessary bonus feature was that the LED are blinking when there's activity on the wifi, and when you are used to the LED only working as an on/off indicator (in Windows), or not working at all, that can get annoying after a while. So I set out to find out how you disable this blinking.
Code: | m1330 ~ # ls /sys/devices/pci0000\:00/0000:00\:1c.1/0000\:0c\:00.0/leds
iwl-phy0:assoc iwl-phy0:radio iwl-phy0:RX iwl-phy0:TX
m1330 ~ # cat /sys/devices/pci0000\:00/0000:00\:1c.1/0000\:0c\:00.0/leds/*/trigger
none AC-online BAT0-charging-or-full BAT0-charging BAT0-full mmc0 phy0rx phy0tx [phy0assoc] phy0radio rfkill0
none AC-online BAT0-charging-or-full BAT0-charging BAT0-full mmc0 phy0rx phy0tx phy0assoc [phy0radio] rfkill0
none AC-online BAT0-charging-or-full BAT0-charging BAT0-full mmc0 [phy0rx] phy0tx phy0assoc phy0radio rfkill0
none AC-online BAT0-charging-or-full BAT0-charging BAT0-full mmc0 phy0rx [phy0tx] phy0assoc phy0radio rfkill0
m1330 ~ # | I tried setting each one of these triggers to none one at a time, but my goal of just disable that darn blinking seemed to just pop up at random sometimes during my testing. After much fiddling around, I found out that if I just reset the iwl-phy0:assoc/trigger to phy0assoc, the blinking during activity stops! Success! By reset I mean just echo'ing phy0assoc into iwl-phy0:assoc/trigger, so it sets the same value as it already has. Why this works, I have no idea.
My /etc/conf.d/net has a preup() section which loads the iwlagn kernel module if net.wlan0 is called. For me, echoing the value in preup does not work, since the hardware needs some time to settle and for the led devices to show up. So I decided to make a little led.sh-script which gets called from /etc/conf.d/local, but I guess I could just test to put it in postup() or something. YMMV.
If the iwlagn-modules gets unloaded and then loaded again, the LED device path changes (from *phy0* to *phy1*), so the script looks up what number it should use before echoing.
led.sh: Code: | #!/bin/bash
# Disable led-blinking
tall=$( ls /sys/devices/pci0000\:00/0000:00\:1c.1/0000\:0c\:00.0/leds/ | head -1 | cut -c 8 )
echo phy"$tall"assoc > /sys/devices/pci0000\:00/0000:00\:1c.1/0000\:0c\:00.0/leds/iwl-phy"$tall"\:assoc/trigger | Remember to check that the pci-path is correct on your own system, of course.
Hope this info is useful for someone :) |
|
Back to top |
|
|
jamapii l33t
Joined: 16 Sep 2004 Posts: 637
|
Posted: Wed Dec 17, 2008 9:32 pm Post subject: |
|
|
Thanks h017ah, that's useful to me!
I had to search for the leds directory, maybe it's because I'm on 2.6.28-rc.
My script
Code: | #!/bin/sh
#
# 2008-12-17 from http://forums.gentoo.org/viewtopic-t-718460.html
#
tall=$(ls -d /sys/class/leds/iwl-phy*:assoc/)
# FIXME lol brute force
n=$(echo $tall | perl -ne '/(\d)/ and print $1')
echo phy${n}assoc > $tall/trigger
|
I'm using it in postassociate now.
Btw, seems there's no simple way to extract the number with just bash. |
|
Back to top |
|
|
eruvaer_ohta n00b
Joined: 18 Jul 2007 Posts: 23
|
Posted: Thu Jan 01, 2009 11:26 pm Post subject: |
|
|
Thanks a lot h017ah, that's also helpful to me!
I just had to correct the command a bit for my system with the help of lspci. I did implement it into my /etc/conf.d/net usign the postup() function as you suggested:
Code: | postup() {
# If wlan0 is up, deactivate the blinking of the WLAN-LED
if [ ${IFVAR} == "wlan0" ]; then
tall=$( ls /sys/devices/pci0000\:00/0000\:00\:1c.1/0000\:0b\:00.0/leds* | head -1 | cut -c 63 )
echo phy"$tall"assoc > /sys/devices/pci0000\:00/0000\:00\:1c.1/0000\:0b\:00.0/leds\:iwl-phy"$tall"\:assoc/trigger
fi
return 0
}
|
Works like a charm
Greetings, Eruvaer |
|
Back to top |
|
|
h017ah n00b
Joined: 18 Apr 2007 Posts: 46
|
Posted: Thu Jan 08, 2009 8:04 pm Post subject: |
|
|
jamapii reminded me that none of these scripts will work if the device number surpasses 9, so I did a minor, hackish adjustment inspired by jamapii's adjustments. Just replace the tall= line with this: Code: | tall=$( ls -d /sys/class/leds/iwl-phy*:assoc | sed -e 's/[[:alpha:]]//g' -e 's/[[:punct:]]//g' ) |
I'm confident that this must be some of the most inelegant solutions avaliable for this problem :) |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Thu Jan 08, 2009 8:59 pm Post subject: |
|
|
And if you disable this option inside the kernel ?
Code: |
[ ] Enable LEDS features in iwlagn driver (NEW)
|
|
|
Back to top |
|
|
eruvaer_ohta n00b
Joined: 18 Jul 2007 Posts: 23
|
Posted: Thu Jan 08, 2009 9:46 pm Post subject: |
|
|
d2_racing wrote: | And if you disable this option inside the kernel ?
Code: |
[ ] Enable LEDS features in iwlagn driver (NEW)
|
|
Then I don't have the WLAN LED at all . (tested) |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Fri Jan 09, 2009 1:44 am Post subject: |
|
|
So you don't have to tweak it, you disable the feature inside the kernel, then you can kill any feature that you want |
|
Back to top |
|
|
h017ah n00b
Joined: 18 Apr 2007 Posts: 46
|
Posted: Fri Jan 16, 2009 8:15 am Post subject: |
|
|
But I want the LED, I just don't want it to blink. |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Fri Jan 16, 2009 11:58 am Post subject: |
|
|
The best for you is to go to the Intel Wireless bugzilla and post your demand there. |
|
Back to top |
|
|
h017ah n00b
Joined: 18 Apr 2007 Posts: 46
|
Posted: Sat Jan 17, 2009 12:10 pm Post subject: |
|
|
d2_racing wrote: | The best for you is to go to the Intel Wireless bugzilla and post your demand there. | What? I just posted the solution to the problem... I'm not sure that the behaviour qualifies as a bug...? |
|
Back to top |
|
|
eruvaer_ohta n00b
Joined: 18 Jul 2007 Posts: 23
|
Posted: Sat Jan 17, 2009 7:01 pm Post subject: |
|
|
There already is a bug marked as enhancement concerning the LED behavior:
http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1771
The last post is about two months old, but perhaps you can post your demand there, h017ah. I am also going to do this when I have the time, since an easy solution would be nice. |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Sun Jan 18, 2009 4:25 am Post subject: |
|
|
Yep, in fact |
|
Back to top |
|
|
Hypnos Advocate
Joined: 18 Jul 2002 Posts: 2889 Location: Omnipresent
|
Posted: Thu Dec 17, 2009 2:01 pm Post subject: |
|
|
Sorry, I'm way behind the curve on this issue -- until now I just disabled the iwlwifi LED support.
If you go to the bug link above, the patch against kernel 2.6.31 (posted in September 2009) works quite well. It lets you set the LED behavior by module parameter:
Code: | parm: led_mode:led mode: 0=blinking, 1=On(RF On)/Off(RF Off), (default 0) |
The patch applies cleanly to tuxonice-sources-2.6.32. _________________ Personal overlay | Simple backup scheme |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Thu Dec 17, 2009 6:27 pm Post subject: |
|
|
Thanks, nice to know that trick. |
|
Back to top |
|
|
nafre Guru
Joined: 27 Dec 2003 Posts: 388
|
Posted: Fri Dec 18, 2009 8:13 pm Post subject: |
|
|
thanks _________________ Nome- Felipe
Nick- Nafre
Idade- 25
Salvador - Bahia - Brasil |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Fri Mar 19, 2010 9:22 am Post subject: |
|
|
Hypnos wrote: | Sorry, I'm way behind the curve on this issue -- until now I just disabled the iwlwifi LED support.
If you go to the bug link above, the patch against kernel 2.6.31 (posted in September 2009) works quite well. It lets you set the LED behavior by module parameter:
Code: | parm: led_mode:led mode: 0=blinking, 1=On(RF On)/Off(RF Off), (default 0) |
The patch applies cleanly to tuxonice-sources-2.6.32. | seems to be rejected in v2.6.34-rc1-1429-g3971047 |
|
Back to top |
|
|
Hypnos Advocate
Joined: 18 Jul 2002 Posts: 2889 Location: Omnipresent
|
Posted: Fri Mar 19, 2010 9:44 am Post subject: |
|
|
By "rejected" you mean the patch does not apply cleanly, or that the functionality was already in your sources and then pulled out before this ref? (Perhaps I misunderstood you in your other thread ...) _________________ Personal overlay | Simple backup scheme |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Fri Mar 19, 2010 9:57 am Post subject: |
|
|
Rejected is the wrong work I think - I mean even if I have this Code: | n22 /usr/portage/app-emulation/vmware-player # cat /etc/modules.d/iwlcore
led_mode:1
| the led is blinking ...
Update:
Damn, syntax error, this is ok : Code: | tfoerste@n22 ~ $ cat /etc/modprobe.d/iwlcore
options iwlcore led_mode=1
|
Last edited by toralf on Fri Apr 16, 2010 2:18 pm; edited 1 time in total |
|
Back to top |
|
|
Hypnos Advocate
Joined: 18 Jul 2002 Posts: 2889 Location: Omnipresent
|
Posted: Fri Mar 19, 2010 10:04 am Post subject: |
|
|
Yes, but is the functionality in the sources you're using? What does "modinfo iwlcore" say? _________________ Personal overlay | Simple backup scheme |
|
Back to top |
|
|
xiaweitang Apprentice
Joined: 26 Feb 2010 Posts: 152
|
Posted: Mon Apr 12, 2010 7:02 pm Post subject: Re: How to get rid of iwlagn LED blinking (new Intel wifi LE |
|
|
h017ah wrote: | When upgrading from iwl4965 to iwlagn on my Dell XPS M1330, my Wifi LED indicator suddenly started working again due to the added support for /sys/class/leds-devices in the new iwlagn-driver in the recent kernels, which is very neat. One unnecessary bonus feature was that the LED are blinking when there's activity on the wifi, and when you are used to the LED only working as an on/off indicator (in Windows), or not working at all, that can get annoying after a while. So I set out to find out how you disable this blinking.
Code: | m1330 ~ # ls /sys/devices/pci0000\:00/0000:00\:1c.1/0000\:0c\:00.0/leds
iwl-phy0:assoc iwl-phy0:radio iwl-phy0:RX iwl-phy0:TX
m1330 ~ # cat /sys/devices/pci0000\:00/0000:00\:1c.1/0000\:0c\:00.0/leds/*/trigger
none AC-online BAT0-charging-or-full BAT0-charging BAT0-full mmc0 phy0rx phy0tx [phy0assoc] phy0radio rfkill0
none AC-online BAT0-charging-or-full BAT0-charging BAT0-full mmc0 phy0rx phy0tx phy0assoc [phy0radio] rfkill0
none AC-online BAT0-charging-or-full BAT0-charging BAT0-full mmc0 [phy0rx] phy0tx phy0assoc phy0radio rfkill0
none AC-online BAT0-charging-or-full BAT0-charging BAT0-full mmc0 phy0rx [phy0tx] phy0assoc phy0radio rfkill0
m1330 ~ # | I tried setting each one of these triggers to none one at a time, but my goal of just disable that darn blinking seemed to just pop up at random sometimes during my testing. After much fiddling around, I found out that if I just reset the iwl-phy0:assoc/trigger to phy0assoc, the blinking during activity stops! Success! By reset I mean just echo'ing phy0assoc into iwl-phy0:assoc/trigger, so it sets the same value as it already has. Why this works, I have no idea.
My /etc/conf.d/net has a preup() section which loads the iwlagn kernel module if net.wlan0 is called. For me, echoing the value in preup does not work, since the hardware needs some time to settle and for the led devices to show up. So I decided to make a little led.sh-script which gets called from /etc/conf.d/local, but I guess I could just test to put it in postup() or something. YMMV.
If the iwlagn-modules gets unloaded and then loaded again, the LED device path changes (from *phy0* to *phy1*), so the script looks up what number it should use before echoing.
led.sh: Code: | #!/bin/bash
# Disable led-blinking
tall=$( ls /sys/devices/pci0000\:00/0000:00\:1c.1/0000\:0c\:00.0/leds/ | head -1 | cut -c 8 )
echo phy"$tall"assoc > /sys/devices/pci0000\:00/0000:00\:1c.1/0000\:0c\:00.0/leds/iwl-phy"$tall"\:assoc/trigger | Remember to check that the pci-path is correct on your own system, of course.
Hope this info is useful for someone |
This works for me. Do you know how to disable the hard disk LED blinking. It's not as often as the wireless LED, but still annoying. |
|
Back to top |
|
|
|