https://www.thinkwiki.org/w/api.php?action=feedcontributions&user=Xtronics&feedformat=atomThinkWiki - User contributions [en]2024-03-29T10:44:48ZUser contributionsMediaWiki 1.31.12https://www.thinkwiki.org/w/index.php?title=Talk:ThinkLight&diff=55738Talk:ThinkLight2014-07-07T14:36:06Z<p>Xtronics: </p>
<hr />
<div>[code]<br />
#!/usr/bin/perl<br />
<br />
use strict;<br />
use warnings;<br />
# $count<br />
<br />
my $count = $ARGV[0];<br />
<br />
if ( ! defined($count) || $count < 1 )<br />
{<br />
$count = 1;<br />
}<br />
$|=1;<br />
<br />
for(my $i=0;$i<$count;$i++)<br />
{<br />
open(LICHT,">/proc/acpi/ibm/light");<br />
print LICHT "on\n";<br />
close(LICHT);<br />
select(undef,undef,undef,0.25);<br />
open(LICHT,">/proc/acpi/ibm/light");<br />
print LICHT "off\n";<br />
close(LICHT);<br />
select(undef,undef,undef,0.25);<br />
}<br />
<br />
[/code]<br />
=== T530 with Debian ===<br />
The ACPI hooks are there but not functional - likely needs a bit in <br />
/etc/modprobe.d/<br />
Similar to what one needs to enable fan control - but I can't find any documentation.</div>Xtronicshttps://www.thinkwiki.org/w/index.php?title=ThinkLight&diff=55737ThinkLight2014-07-07T14:32:51Z<p>Xtronics: /* Linux Support */ key stroke</p>
<hr />
<div>{| width="100%"<br />
|style="vertical-align:top;padding-right:20px;width:10px;" | __NOTOC__<br />
[[Image:Thinklight.jpg|ThinkLight]]<br />
|style="vertical-align:top" |<br />
<div style="margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;"><br />
The ThinkLight is a little LED light integrated into the top edge of the display frame in the A, R, T, X, Z and i Series ThinkPad models. It illuminates the ThinkPad's keyboard so that one can type in the dark without using an external light source. The ThinkLight can be controlled via the {{key|Fn}}{{key|PageUp}} key combination or via ACPI on some of the newer models. The LED is amber on some models (e.g. X30s, X40s), and white on others (e.g. T40s).<br />
Note that the ThinkLight is not available on the G series ThinkPads, nor on the X41 Tablet.<br />
</div><br />
|}<br />
==Linux Support==<br />
Controlling the ThinkLight with the keyboard works on all systems since it relies on the BIOS exclusively. Just press {{key|Fn}}{{key|PageUp}} to toggle its state between on and off. <br />
<br />
On the T530 (and likely other models) the keystroke is {{key|Fn}}{{key|Space}}. There are 4 states: off|dim keys|bright keys| bright-keys with ThinkLight. <br />
<br />
===Software Control via thinkpad-acpi===<br />
Support for controlling the light with ACPI is provided by [[thinkpad-acpi]]. After installing it, a simple<br />
:{{cmdroot|echo 255 > /sys/class/leds/tpacpi\:\:thinklight/brightness}}<br />
switches it on and a<br />
:{{cmdroot|echo 0 > /sys/class/leds/tpacpi\:\:thinklight/brightness}}<br />
switches it off again.<br />
<br />
This allows one to control the light in scripts. Unfortunately, no known ThinkPad comes with a light sensor (yet). ;)<br />
<br />
To use these controls in scripts without root permissions, you should run<br />
:{{cmdroot|chmod 666 /sys/class/leds/tpacpi\:\:thinklight/brightness}}, which is probably best done using udev.<br />
<br />
===Applications===<br />
*'''led-notification''': Pidgin plugin to use any LED to indicate new messages. I've forked [http://github.com/Sitwon/led-notification led-notification] to support the ThinkLight via [[thinkpad-acpi]]. The plugins below either weren't compatible with the latest pidgin or didn't compile for me. The original author of led-notification seems MIA. Another fork [http://github.com/xmw/pidgin-led-notification pidgin-led-notification] to write user defined strings (added to Gentoo/Linux)<br />
*'''gaim-thinklight''': If you are using [http://gaim.sf.net GAIM], the [http://www.joachim-breitner.de/blog/archives/38-Created-gaim-thinklight.html gaim-thinklight] plugin will enable you to use the ThinkLight as an indicator for new messages. This depends on [[thinkpad-acpi]].<br />
*'''gaim-lighthink''': [http://www.chris-lamb.co.uk/code/gaim-lightthink/ gaim-lightthink] is an alternative to gaim-thinklight.<br />
*'''pidgin-blinklight''':[http://packages.debian.org/unstable/net/pidgin-blinklight pidgin-blinklight] is a replacement for gaim-lighthink intended for use with [http://pidgin.im/ Pidgin].<br />
*'''rocklight''': [http://hunz.org/ rocklight] is a xmms visualization plugin that makes the ThinkLight flash to the beat of your music. The package also includes a standalone stroboscope mode program.<br />
*'''thinkblinkd''':[http://badcode.de/downloads/thinkblinkd-0.1.7.tar.gz] Thinkblinkd is a python daemon to control the thinklight (and possibly other lights on your Thinkpad) it comes with the daemon and a control script.<br />
*The [[script for theft alarm using HDAPS]] optionally flashes the ThinkLight when the alarm is armed (disabled by default, to enable set <tt>$use_light=1</tt>).<br />
*'''kopete-thinklight''':[http://kde-apps.org/content/show.php?content=47886] This plugin for kopete will enable the usage of the thinklight as notifiaction for new messages.<br />
*'''stupid little hack to blink the ThinkLight''': [http://paste.lisp.org/display/37500] A little C program that may be set SUID so that you can use it from non-privileged programs that needs to do a little notification.<br />
*'''thinkalert''': [http://www.mike.tl/view/Main/ThinkAlert] Another C program that may be set SUID to allow non-privileged programs to manipulate the ThinkLight. Adds some features over the "stupid little hack to blink the ThinkLight" program.<br />
*'''thinklight-notification''': This [http://ubuntuforums.org/showthread.php?t=1017263 Evolution plugin] notifies the user with a blinking light whenever a new message has arrived.<br />
*'''ThinkBlink''': [http://pikeypl.com/index.php?show=blink_en blink.sh] is an universal bash script making ThinkLight blink. It can be used with any application.<br />
<br />
==Windows support==<br />
Likewise, controlling the ThinkLight with the keyboard works without any additional software. The Hotkey Features software from IBM/Lenovo adds OSD icons that appear when the light is turned on/off.<br />
<br />
===Software control via Hotkey Features===<br />
The Hotkey Features software exposes an interface that allows (among other things) to control the ThinkLight. See [[Python script for Windows to control ThinkPad features]] for more information.<br />
<br />
==Models featuring this Technology==<br />
*ThinkPad {{i1400}}, {{I1460}}, {{I1480}}, {{I1482}}, {{I1483}}, {{I1492}}<br />
*ThinkPad {{A Series}}<br />
*ThinkPad {{R Series}}<br />
*ThinkPad {{T Series}}<br />
*ThinkPad {{W Series}}<br />
*ThinkPad {{X20}}, {{X21}}, {{X22}}, {{X23}}, {{X24}}, {{X30}}, {{X31}}, {{X32}}, {{X40}}, {{X41}}, {{X60}}, {{X60s}}, {{X61}}, {{X61s}}, {{X200}}, {{X200s}}, {{X201}}, {{X201s}}, {{X220}}, {{X230}}, {{X300}}, {{X301}}<br />
*ThinkPad {{Z60m}}, {{Z60t}}, {{Z61m}}<br />
*ThinkPad {{S30}}, {{S31}}<br />
<br />
[[Category:Glossary]]</div>Xtronics