Comment 16 for bug 429351

Revision history for this message
Hulin (hulin-thibaud-gmail) wrote :

That's my script 'lumino' :
#!/bin/bash
file=$HOME/lumino
med=40
if [ -f $file ]
then
        l=$(cat $file)
else
        echo $med > $file
        l=$med
fi

case "$1" in
"+")
        l=$(( $l + 5 ))
        [ $l -gt 95 ] && l=95
        ;;
"-")
        l=$(( $l - 5 ))
        [ $l -lt 5 ] && l=5
        ;;
esac
echo $l
sudo setpci -s 00:02.1 F4.B=$l
echo $l > $file

Before to execute it, modify the /etc/sudoers file with sudo visudo and add (or modify) this line :
user user-samsung140 = NOPASSWD: /usr/bin/setpci
Use the good name user and the good machine name.
This is for don't request the password for root.

I will try the solution of Fortunato.