Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Oct 2013 19:29:22 +0200
From:      Sergiy Mikhailushko <ooomka@yandex.ru>
To:        Henry Hu <henry.hu.sh@gmail.com>
Cc:        freebsd-mobile@freebsd.org
Subject:   Re: ASUS U46E laptop brightness
Message-ID:  <527141F2.4010402@yandex.ru>
In-Reply-To: <CAEJt7hYwNgSz8MyA6V_=JSQ%2B4LTm1SHuxsH4G94fRuaqyTxpzA@mail.gmail.com>
References:  <524C3747.6060900@yandex.ru> <527121F5.7030705@yandex.ru> <CAEJt7hYwNgSz8MyA6V_=JSQ%2B4LTm1SHuxsH4G94fRuaqyTxpzA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10/30/2013 17:41, Henry Hu wrote:
>
>
> On Wed, Oct 30, 2013 at 11:12 AM, Sergiy Mikhailushko <ooomka@yandex.ru
> <mailto:ooomka@yandex.ru>> wrote:
>
> I'm using ASUS UX51VZ and I can use this to adjust the brightness:
>
> acpi_call -p "\_SB.ATKD.SPLV" -i $2
> acpi_call -p "\ISMI" -i 154
>
> I found these statements in acpidump, so you may find similar statements.
>

Hooray!
Your method works, you saved my eyes. I can change brightness level with 
"acpi_call -p "\_SB.ATKD.SPLV" -i $[1-10]. Thanks a lot!

I've made keyboard shortcuts for brightness control. Maybe someone may 
need it -- here I leave the recipe:

1) Granted access to acpi to anybody from wheel group by adding the 
following to /etc/devfs.conf (don't forget to restart devfs service 
after changing the file):

perm	acpi	0660

2) Created two tiny scripts in ~/bin:

brup.sh...

#!/bin/sh
if [ ! -f /tmp/brightlvl ]; then
	echo 1 > /tmp/brightlvl
fi
lvl=`cat /tmp/brightlvl`
if [ $lvl -gt 9 ]; then
	exit 0
fi
lvl=`expr $lvl + 1`
echo $lvl > /tmp/brightlvl
echo $lvl
exit 0

...and brdown.sh

#!/bin/sh

if [ ! -f /tmp/brightlvl ]; then
	echo 10 > /tmp/brightlvl
fi
lvl=`cat /tmp/brightlvl`
if [ $lvl -lt 2 ]; then
	exit 0
fi
lvl=`expr $lvl - 1`
echo $lvl > /tmp/brightlvl
echo $lvl
exit 0

2) Added the following to ~/.fluxbox/keys (if you use another WM/DE then 
you'll have another way to bind hotkeys):

Control Right :Exec acpi_call -p "\_SB.ATKD.SPLV" -i `brup.sh`
Control Left :Exec  acpi_call -p "\_SB.ATKD.SPLV" -i `brdown.sh`

Now I can adjust brightness by pressing Ctrl+Left/Ctrl+Right. Somewhat 
more convenient then typing the command in the terminal.








Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?527141F2.4010402>