[ltp] LEDs on X60

Micha linux-thinkpad@linux-thinkpad.org
Wed, 21 May 2008 12:21:36 +0300


On Wed, 21 May 2008 09:28:51 +0600
"Dmitry E. Mikhailov" <sexandvodka@gmail.com> wrote:

> AFAIK the WiFi LED is hard-wired to the wireless device (Intel in my case - 
> X41 2527-67G).
> Initially it doesn't work at all. I had to add 'options ipw2200 led=1' to 
> my /etc/modprobe.conf (Fedora 6, 7, 8)
> 
> The bluetooth LED is wired to the bluetooth adapter.
> 
> IMHO It would be hard to impossible to control these LEDs.
> 
> I  think so because these LEDs indicate the state of appropriate device,
> blink on traffic etc. If the blinking on traffic is made in software it would 
> require special driver. But with Linux we can easily say there's no driver 
> for that. Sniffing WiFi\Bluetooth data coming on the PCI/USB bus is too 
> complicated for thinkpad's embedded controller. That means the LED is 
> controlled directly by hardware.
> 
> IMHO You *may* find a way to control the WiFi LED by messing with ipw2200 
> driver (in case of Intel radio). But I doubt you can do this with the 
> bluetooth LED. Bluetooth driver know nothing about it. 
> 
> You could be lucky if the signals from WiFi and bluetooth part come to 
> embedded controller and only then - to the LEDs.
> 

I have a t61 with iwl4965 wifi.
Don't know about bluetooth, it seems to be hardware controled (will light up if
bluetooth is enabled at startup). wifi is software controlled. It only works
with the new driver when the option is enabled during compilation (it is
currently disabled by default). It blinks on traffic under linux but it does
not under windows IIRC, so the blinking is software also. It's not a problem
for linux to sniff traffic as all the traffic is going through the driver up to
the network stack and statistics are collected anyway (do ifconfig and you will
see how much data went through the card).

it seems from /sys that the recognized leds are:
/sys/devices/platform/thinkpad_acpi/leds:tpacpi::thinklight
/sys/devices/platform/thinkpad_acpi/leds:tpacpi::power
/sys/devices/platform/thinkpad_acpi/leds:tpacpi:orange:batt
/sys/devices/platform/thinkpad_acpi/leds:tpacpi:green:batt
/sys/devices/platform/thinkpad_acpi/leds:tpacpi::dock_active
/sys/devices/platform/thinkpad_acpi/leds:tpacpi::bay_active
/sys/devices/platform/thinkpad_acpi/leds:tpacpi::dock_batt
/sys/devices/platform/thinkpad_acpi/leds:tpacpi::unknown_led
/sys/devices/platform/thinkpad_acpi/leds:tpacpi::standby




> Best regards, Dmitry
> 
> > I was asked to forward this to the list ...
> >
> > Hi all,
> > I would like to control all the LEDs on my Thinkpad x60. I know that
> > the power, battery, onoff and standby LEDs can be controlled by
> > using the /proc/acpi/ibm/led but I have no idea how to change the
> > hd, numlock, capslock, wlan and bluetooth ones. I checked some
> > source code of wlan drivers and screen keyboards to understand how
> > to do what i want, but i only got to the point, that some are based
> > on the xserver, using cryptic xgtkds_kdai() functions that i find
> > hard to understand.
> >
> > To sum it up, I would like to code a kernel module that adds
> > /proc/acpi/ibm/allleds to the proc-filesystem to have free access to
> > all the lights Is there anyone here who is familiar with the other
> > nasty LEDS?
> >
> > Thanks so much
> > Rainer
> 
>