Difference between revisions of "ThinkLight"

From ThinkWiki
Jump to: navigation, search
m (Linux Support: key stroke)
m (Added additional information on how to control the ThinkLight by writing to the embedded controller, manually.)
(3 intermediate revisions by one other user not shown)
Line 4: Line 4:
 
|style="vertical-align:top" |
 
|style="vertical-align:top" |
 
<div style="margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;">
 
<div style="margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#F8F8FF; align:right;">
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).
+
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. X3x, X4x, R5x, R6x), and white on others (e.g. A2x, R3x, R40, T30, T4x, X2x, X6x, Z6x).
Note that the ThinkLight is not available on the G series ThinkPads, nor on the X41 Tablet.
+
Note that the ThinkLight is not available on the R40e, G40, G41, G50, and the X series Tablet models.
 
</div>
 
</div>
 
|}
 
|}
 
==Linux Support==
 
==Linux Support==
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.  
+
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.  
  
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.  
+
Starting with the ##30 series models (T430, T530, W530, etc), the keystroke was changed to {{key|Fn}}+{{key|Space}} in order to better accommodate the new 6-row keyboard layout. On models with backlit keyboards, there are 4 states: <code>off</code>, <code>dim backlit</code>, <code>full backlit</code>, and <code>full backlit w/ ThinkLight</code>. Models without backlit keyboards only have <code>ThinkLight on</code> and <code>ThinkLight off</code>, which can be obtained by disabling the backlit keyboard in the BIOS of models with backlit keyboards installed.
  
 
===Software Control via thinkpad-acpi===
 
===Software Control via thinkpad-acpi===
Line 39: Line 39:
 
*'''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.
 
*'''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.
  
==Windows support==
+
==Windows Support==
 
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.
 
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.
  
===Software control via Hotkey Features===
+
===Software Control via Hotkey Features===
 
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.
 
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.
 +
 +
===Software Control via Embedded Controller===
 +
It is possible to manually control the ThinkLight, by writing 2 pre-defined values to register 0x3B on the embedded controller. Writing the value as 0x10 will disable the ThinkLight, while writing the value as 0x12 will enable the ThinkLight.
  
 
==Models featuring this Technology==
 
==Models featuring this Technology==

Revision as of 10:44, 12 November 2018

ThinkLight

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 Fn+PageUp key combination or via ACPI on some of the newer models. The LED is amber on some models (e.g. X3x, X4x, R5x, R6x), and white on others (e.g. A2x, R3x, R40, T30, T4x, X2x, X6x, Z6x). Note that the ThinkLight is not available on the R40e, G40, G41, G50, and the X series Tablet models.

Linux Support

Controlling the ThinkLight with the keyboard works on all systems since it relies on the BIOS exclusively. Just press Fn+PageUp to toggle its state between on and off.

Starting with the ##30 series models (T430, T530, W530, etc), the keystroke was changed to Fn+Space in order to better accommodate the new 6-row keyboard layout. On models with backlit keyboards, there are 4 states: off, dim backlit, full backlit, and full backlit w/ ThinkLight. Models without backlit keyboards only have ThinkLight on and ThinkLight off, which can be obtained by disabling the backlit keyboard in the BIOS of models with backlit keyboards installed.

Software Control via thinkpad-acpi

Support for controlling the light with ACPI is provided by thinkpad-acpi. After installing it, a simple

# echo 255 > /sys/class/leds/tpacpi\:\:thinklight/brightness

switches it on and a

# echo 0 > /sys/class/leds/tpacpi\:\:thinklight/brightness

switches it off again.

This allows one to control the light in scripts. Unfortunately, no known ThinkPad comes with a light sensor (yet). ;)

To use these controls in scripts without root permissions, you should run

# chmod 666 /sys/class/leds/tpacpi\:\:thinklight/brightness, which is probably best done using udev.

Applications

  • led-notification: Pidgin plugin to use any LED to indicate new messages. I've forked 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 pidgin-led-notification to write user defined strings (added to Gentoo/Linux)
  • gaim-thinklight: If you are using GAIM, the gaim-thinklight plugin will enable you to use the ThinkLight as an indicator for new messages. This depends on thinkpad-acpi.
  • gaim-lighthink: gaim-lightthink is an alternative to gaim-thinklight.
  • pidgin-blinklight:pidgin-blinklight is a replacement for gaim-lighthink intended for use with Pidgin.
  • rocklight: 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.
  • thinkblinkd:[1] 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.
  • The script for theft alarm using HDAPS optionally flashes the ThinkLight when the alarm is armed (disabled by default, to enable set $use_light=1).
  • kopete-thinklight:[2] This plugin for kopete will enable the usage of the thinklight as notifiaction for new messages.
  • stupid little hack to blink the ThinkLight: [3] 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.
  • thinkalert: [4] 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.
  • thinklight-notification: This Evolution plugin notifies the user with a blinking light whenever a new message has arrived.
  • ThinkBlink: blink.sh is an universal bash script making ThinkLight blink. It can be used with any application.

Windows Support

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.

Software Control via Hotkey Features

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.

Software Control via Embedded Controller

It is possible to manually control the ThinkLight, by writing 2 pre-defined values to register 0x3B on the embedded controller. Writing the value as 0x10 will disable the ThinkLight, while writing the value as 0x12 will enable the ThinkLight.

Models featuring this Technology