[ltp] Command to dim the LCD brightness

Bob Alexander linux-thinkpad@linux-thinkpad.org
Wed, 12 Jan 2005 10:00:28 +0100


André Wyrwa wrote:
> Hi,
> 
> 
>>could you be more specific in how could I use ACPI to lower brightness 
>>(not turn off) of my LCD ?? It must be possible since the Fn-Home and 
>>Fn-End thinkpad keys do that ....
> 
> 
> The Fn-Home/End keys are interacting with the BIOS, bypassing ACPI.
> 
> See Documentation/power/video_extension.txt in your kernel source tree for the new ACPI video interface.
> 
> André.
> 
Andre',
as usual you are extremely knowledgeable and helpful. That is exactly 
what I would need.

In my 2.6.10 kernel the ACPI video extension is flagged as a module like 
all others but the video module does not appear to be loaded. I can load 
it manually and the /proc/acpi/video tree appears.

Now the questions:

1) The /proc/acpi/video tree shows a single VID subdirectory and that shows:
t40:/proc/acpi/video/VID# ls -l
total 0
dr-xr-xr-x  2 root root 0 2005-01-12 09:53 CRT0
-r--r--r--  1 root root 0 2005-01-12 09:53 DOS
dr-xr-xr-x  2 root root 0 2005-01-12 09:53 DVI0
-r--r--r--  1 root root 0 2005-01-12 09:53 info
dr-xr-xr-x  2 root root 0 2005-01-12 09:53 LCD0
-r--r--r--  1 root root 0 2005-01-12 09:53 POST
-r--r--r--  1 root root 0 2005-01-12 09:53 POST_info
-r--r--r--  1 root root 0 2005-01-12 09:53 ROM
dr-xr-xr-x  2 root root 0 2005-01-12 09:53 TV0

The LCD0 subdir shows:
t40:/proc/acpi/video/VID/LCD0# ls -l
total 0
-rw-r--r--  1 root root 0 2005-01-12 09:54 brightness
-r--r--r--  1 root root 0 2005-01-12 09:54 EDID
-r--r--r--  1 root root 0 2005-01-12 09:54 info
-rw-r--r--  1 root root 0 2005-01-12 09:54 state

and I was very excited but :( ->
t40:/proc/acpi/video/VID/LCD0# cat brightness
<not supported>

...... seems I am out of luck ????

Last question: I cannot find why in Debian other ACPI modules are 
automatically loaded but video was not ... ideas ?

Anyway after loading it manually and attempting to echo a 0 into the 
brightness parameter here is what I find in dmesg ... see if you can 
gather some useful insight please.

TIA
Bob

ACPI: Battery Slot [BAT0] (battery present)
ACPI: AC Adapter [AC] (on-line)
ACPI: Processor [CPU] (supports C1 C2 C3)
ACPI: Processor [CPU] (supports 8 throttling states)
ACPI: Power Button (FF) [PWRF]
ACPI: Lid Switch [LID]
ACPI: Sleep Button (CM) [SLPB]
ACPI: Thermal Zone [THM0] (29 C)
Warning: /proc/ide/hd?/settings interface is obsolete, and will be 
removed soon!
cdrom: This disc doesn't have any tracks I recognize!
ACPI: PCI interrupt 0000:01:00.0[A] -> GSI 11 (level, low) -> IRQ 11
[drm] Initialized radeon 1.11.0 20020828 on minor 0: ATI Technologies 
Inc Radeon R250 Lf [Radeon Mobility 9000 M9]
agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.
agpgart: Putting AGP V2 device at 0000:00:00.0 into 4x mode
agpgart: Putting AGP V2 device at 0000:01:00.0 into 4x mode
[drm] Loading R200 Microcode
ACPI: Video Device [VID] (multi-head: yes  rom: no  post: no)
Unable to handle kernel NULL pointer dereference at virtual address 00000004
  printing eip:
f8b388b1
*pde = 00000000
Oops: 0000 [#1]
PREEMPT
Modules linked in: video radeon thermal fan button processor ac battery 
ipt_REJECT ipt_pkttype ipt_LOG ipt_state ipt_multiport ipt_conntrack 
iptable_mangle ip_nat_irc ip_nat_ftp iptable_nat ip_conntrack_irc 
ip_conntrack_ftp ip_conntrack iptable_filter ip_tables snd_intel8x0m 
8250_pci 8250 serial_core snd_intel8x0 snd_ac97_codec snd_pcm_oss 
snd_mixer_oss snd_pcm snd_timer snd snd_page_alloc hw_random intel_agp 
agpgart evdev usbhid ehci_hcd uhci_hcd e1000 ntfs vfat fat ibm_acpi 
ide_cd cdrom
CPU:    0
EIP:    0060:[<f8b388b1>]    Not tainted VLI
EFLAGS: 00210246   (2.6.10.rja)
EIP is at acpi_video_device_write_brightness+0x69/0x99 [video]
eax: 00000000   ebx: 00000000   ecx: 00000000   edx: 00000000
esi: f664ae40   edi: 00000002   ebp: 00000002   esp: e9fbff5c
ds: 007b   es: 007b   ss: 0068
Process bash (pid: 8786, threadinfo=e9fbe000 task=e5039a20)
Stack: 00000a30 00000000 e6282800 e9fbffac c0161e58 e6282800 080f2c08 
00000002
        e9fbffac 00000000 c01613a9 e6282800 fffffff7 080f2c08 e9fbe000 
c0161fa1
        e6282800 080f2c08 00000002 e9fbffac 00000000 00000000 00000000 
00000001
Call Trace:
  [<c0161e58>] vfs_write+0xb8/0x130
  [<c01613a9>] filp_close+0x59/0x90
  [<c0161fa1>] sys_write+0x51/0x80
  [<c01030ff>] syscall_call+0x7/0xb
Code: ba f2 ff ff ff 85 c0 75 4b c6 04 1f 00 6a 00 6a 00 53 e8 93 7c 6a 
c7 83 c4 0c 89 c3 83 f8 64 ba f2 ff ff ff 77 2e 8b 56 1c 31 c9 <3b> 4a 
04 7d 22 8b 42 08 3b 1c 88 75 14 53 56 e8 19 f8 ff ff 5a