[Bug 337945] Re: [Jaunty] MacBook 5.1 keyboard backlight not supported

Peter S. stoto at stoto.net
Sun May 9 19:41:04 UTC 2010


I had to make a little modification for the script so it will work after
reboot too:

stoto at stoto-laptop:~$ cat backlight.sh 
#!/bin/bash

if [ `ls -al /sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness | awk {'print $1'}` !=  -rwxrwxrwx ]; then
	gksudo chmod 777 /sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness
fi

$act
act=`cat /sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness`
echo $1
case "$1" in
	inc)
		if [[ $act -lt 255 ]]; then
			act=$((act+5))
			echo $act | tee /sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness
		#else
			#notify-send -t 50 "Keyboard backlight is on maximum!"
		fi
	;;

	dec)
		if [[ $act -gt 4 ]]; then
                        act=$((act-5))
                        echo $act | tee /sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness
		#else
			#notify-send -t 50 "Keyboard backlight is off." 
                fi
	;;

	*) echo "Usage: inc or dec"
	;;
esac



The else and the notify-send is commented out, because of a bug in notify-osd package. This bug causes notify-osd to ignore the timeout settings.

-- 
[Jaunty] MacBook 5.1 keyboard backlight not supported
https://bugs.launchpad.net/bugs/337945
You received this bug notification because you are a member of Kernel
Bugs, which is subscribed to linux in ubuntu.




More information about the kernel-bugs mailing list