Hi Knuth
I did the following:
cat /etc/acpi/events/sony-brightness-up
event=sony/hotkey SNC 00000001 00000011
action=/etc/acpi/sony-brightness.sh up
cat /etc/acpi/events/sony-brightness-down
event=sony/hotkey SNC 00000001 00000010
action=/etc/acpi/sony-brightness.sh down
cat /etc/acpi/sony-brightness.sh
#!/usr/bin/perl -w
use strict;
open (my $x, "</proc/acpi/video/GFX0/LCD/brightness");
my @levels;
my $level;
while(<$x>){
chomp;
s/^levels:\s+//&& do {
@levels = split /\s+/;
};
s/^current:\s+//&& do {
$level = $_;
};
}
close $x;
for (my $i=0;$i<= $#levels; $i++){
if ($level == $levels[$i]){
my $val;
if ($ARGV[0] eq 'up'){
$i++
}
else {
$i--
}
if ($i>= 0 and $i<= $#levels){
open (my $y, ">/proc/acpi/video/GFX0/LCD/brightness");
print $y $levels[$i];
close $y;
}
last;
}
}
Yesterday K. Posern wrote:
Hi,
I am sure I miss something obvious here, but don't know what:
I keep reading that the Brightness with Intel works out of the box.
But not for me.
When pressing FN+F6 I see this in the acpid log.
But FN+F5 does nothing.
Also: What program will actually increase / decrease the intel brightness?
The sony laptop module only passes on / generates the acpi button events, or?
-->
What should happen to increase decrease the brightness?
Thanks!!
Knuth