Difference between revisions of "Brightness On Thinkpad x61s running Debian"

From ThinkWiki
Jump to: navigation, search
(←Created page with '__TOC__ ==Brightness On Thinkpad x61s running Debian== Somehow after a fresch installation of Debian Testing I was not able to control the LCD Brightness with {{key|Fn}}...')
 
Line 5: Line 5:
 
Somehow after a fresch installation of Debian Testing I was not able to control the LCD Brightness with {{key|Fn}}{{key|Pos1}} and {{key|Fn}}{{key|Ende}} any more. {{cmdroot|acpi_listen}} did show that the corresponding ACPI events were generated. So I ended up with an additional set of acpi rules, that solve the problem.
 
Somehow after a fresch installation of Debian Testing I was not able to control the LCD Brightness with {{key|Fn}}{{key|Pos1}} and {{key|Fn}}{{key|Ende}} any more. {{cmdroot|acpi_listen}} did show that the corresponding ACPI events were generated. So I ended up with an additional set of acpi rules, that solve the problem.
  
/etc/acpi/thinkpad_video_brightnessup.sh:
+
{{path|/etc/acpi/thinkpad_video_brightnessup.sh}}
<source lang=bash>#!/bin/sh
+
 
 +
<pre>
 +
#!/bin/sh
 
# /etc/acpi/thinkpad_video_brightnessup.sh
 
# /etc/acpi/thinkpad_video_brightnessup.sh
echo $(( $(grep current /proc/acpi/video/VID1/LCD0/brightness | cut -d ' ' -f 2)+10)) > /proc/acpi/video/VID1/LCD0/brightness</source>
+
echo $(( $(grep current /proc/acpi/video/VID1/LCD0/brightness | cut -d ' ' -f 2)+10)) > /proc/acpi/video/VID1/LCD0/brightness
 +
</pre>
 +
 
 +
 
 +
{{path|/etc/acpi/thinkpad_video_brightnessdown.sh}}
  
/etc/acpi/thinkpad_video_brightnessdown.sh:
+
<pre>
<source lang=bash>#!/bin/sh
+
#!/bin/sh
 
# /etc/acpi/thinkpad_video_brightnessdown.sh
 
# /etc/acpi/thinkpad_video_brightnessdown.sh
echo $(( $(grep current /proc/acpi/video/VID1/LCD0/brightness | cut -d ' ' -f 2)-10)) > /proc/acpi/video/VID1/LCD0/brightness</source>
+
echo $(( $(grep current /proc/acpi/video/VID1/LCD0/brightness | cut -d ' ' -f 2)-10)) > /proc/acpi/video/VID1/LCD0/brightness
 +
</pre>
  
/etc/acpi/events/video_brightnessdown:
+
 
<source lang=bash># /etc/acpi/events/video_brightnessdown
+
{{path|/etc/acpi/events/video_brightnessdown}}
 +
 
 +
<pre>
 +
# /etc/acpi/events/video_brightnessdown
 
event=video LCD0 00000087
 
event=video LCD0 00000087
action=/etc/acpi/thinkpad_video_brightnessdown.sh</source>
+
action=/etc/acpi/thinkpad_video_brightnessdown.sh
 +
</pre>
 +
 
 +
 
 +
{{path|/etc/acpi/events/video_brightnessup}}
  
/etc/acpi/events/video_brightnessup:
+
<pre>
<source lang=bash># /etc/acpi/events/video_brightnessup
+
# /etc/acpi/events/video_brightnessup
 
event=video LCD0 00000086
 
event=video LCD0 00000086
action=/etc/acpi/thinkpad_video_brightnessup.sh</source>
+
action=/etc/acpi/thinkpad_video_brightnessup.sh
 +
</pre>
  
And the brightness keys work again :-)
 
  
 +
Restart acpid and the brightness keys work again :-)
  
  
 
[[:Category:X61s|X61s]][[Category:X61s]][[Category:X Series]][[Category:Debian]]
 
[[:Category:X61s|X61s]][[Category:X61s]][[Category:X Series]][[Category:Debian]]

Revision as of 12:24, 7 August 2009

Brightness On Thinkpad x61s running Debian

Somehow after a fresch installation of Debian Testing I was not able to control the LCD Brightness with FnPos1 and FnEnde any more. # acpi_listen did show that the corresponding ACPI events were generated. So I ended up with an additional set of acpi rules, that solve the problem.

/etc/acpi/thinkpad_video_brightnessup.sh

#!/bin/sh
# /etc/acpi/thinkpad_video_brightnessup.sh
echo $(( $(grep current /proc/acpi/video/VID1/LCD0/brightness | cut -d ' ' -f 2)+10)) > /proc/acpi/video/VID1/LCD0/brightness


/etc/acpi/thinkpad_video_brightnessdown.sh

#!/bin/sh
# /etc/acpi/thinkpad_video_brightnessdown.sh
echo $(( $(grep current /proc/acpi/video/VID1/LCD0/brightness | cut -d ' ' -f 2)-10)) > /proc/acpi/video/VID1/LCD0/brightness


/etc/acpi/events/video_brightnessdown

# /etc/acpi/events/video_brightnessdown
event=video LCD0 00000087
action=/etc/acpi/thinkpad_video_brightnessdown.sh


/etc/acpi/events/video_brightnessup

# /etc/acpi/events/video_brightnessup
event=video LCD0 00000086
action=/etc/acpi/thinkpad_video_brightnessup.sh


Restart acpid and the brightness keys work again :-)


X61s