# Thinkpad T400 brightness in command line

## stupidkid

Hi, I just upgraded to kernel 2.6.30 and everything seems to work fine except the brightness adjust in command line (i.e. ctrl+alt+f1). The brightness controls (Fn+PgUp,PgDn) work fine in Xorg but doesn't do anything when I'm in the command line. Does anyone know how to fix this?

Thanks.

----------

## Hypnos

Did they work before, and stop working when you upgraded to 2.6.30?

Only a few Thinkpad special keys talk directly to the BIOS (e.g., the ThinkLight); the rest just generate keycodes and it's up to the OS to do something with them.  Xorg does this, but obviously on the console Xorg won't be capturing keystrokes.

You can write a simple shell script that increments/decrements the brightness. There are two control files I know of for the LCD panel brightness:

```
/proc/acpi/video/VID/LCD0/brightness

/sys/class/backlight/acpi_video0/brightness
```

(I suppose the proc interface is deprecated.)

I don't know how to capture the keystrokes on the console in order to trigger this script ... maybe screen, which it seems can be made to do anything  :Razz: 

----------

## multix

I have a T23 and they do work also in the fbdev console.

----------

## Hypnos

 *multix wrote:*   

> I have a T23 and they do work also in the fbdev console.

 

Do you know whether the brightness keys on the T23 talk to the BIOS directly or just generate keycodes?

On my T61 I'm running the console on the framebuffer and the brightness keys don't work.

----------

## multix

I did:

tail /dev/input/event1

if I type a F-key I will see the codes appear on the screen. But if I do brightness+ or brightness- with the blue fn key (as with the thinklight) I will see no keycodes. So I think this is a good indication that my BIOS handles them.

-R

----------

## ppurka

 *Hypnos wrote:*   

>  *multix wrote:*   I have a T23 and they do work also in the fbdev console. 
> 
> Do you know whether the brightness keys on the T23 talk to the BIOS directly or just generate keycodes?
> 
> On my T61 I'm running the console on the framebuffer and the brightness keys don't work.

 Are you sure you didn't mistype it? I have proper working brightness keys in console and X on my T61. Brightness keys have been working for at least 1.5 years. It didn't use to work in 2007 (worked in console not in X) since the nvidia drivers were not up to the mark.

----------

## Hypnos

Nope, doesn't work in the console.  It took a little while before the right ACPI code was in the kernel for the brightness keys to work in X.

I have Intel graphics.

----------

