You are not logged in.
Pages: 1
Hello,
my Asus UL30VT is running Arch pretty nice and cool while the graphics card is turned off (nvidia_g210m_acpi).
I read a couple of article here on this message board that it is possible to bind the brightness control to some keys. However, since I am quite a Noob I don't know how I apply this on my machine.
Maybe you can help me?
For example here: https://bbs.archlinux.org/viewtopic.php … 86#p818186 it is describes how to do it. But I am not able to follow it.
I am using XFCE4 and the brightness control keys of my laptop just result in this little popup-window showing the increase and decrease of brightness. But this has no actual effect on the brightness. How do I manage to make it really work?
Thank you very much for your brief explanation so I can do it!
Offline
What you need to do is install the acpid daemon.
sudo pacman -S acpid
Then make sure that your brightness keys are the same as mine
sudo rc.d start acpid
acpi_listen
*press the brightness keys*
hotkey ATKD 00000026 0000000a
hotkey ATKD 00000017 0000000b
Then you need to make some acpi scripts
sudo nano /etc/acpi/events/brnup
event=hotkey ATKD 0000002[0123456789abcdef]
action=/usr/bin/brightness up
sudo nano /etc/acpi/events/brndown
event=hotkey ATKD 0000001[0123456789abcdef]
action=/usr/bin/brightness down
Now all that's left is to make the brightness script in /usr/bin/brightness
sudo nano /usr/bin/brightness
#!/bin/bash
export SEED=2
if [ ! -f ~/.brightness ]; then
echo 99 > ~/.brightness;
fi
export BRIGHTNESS=`cat ~/.brightness`
case "$1" in
"up")
export BRIGHTNESS=$[$BRIGHTNESS+$SEED];
;;
"down")
export BRIGHTNESS=$[$BRIGHTNESS-$SEED];
;;
*)
export BRIGHTNESS=1;
;;
esac
if [ "$BRIGHTNESS" -gt "99" ]; then
export BRIGHTNESS=99;
fi
if [ "$BRIGHTNESS" -gt "0" ]; then
echo $BRIGHTNESS > ~/.brightness
setpci -s 00:02.0 F4.B=$BRIGHTNESS
fi
if [ "$BRIGHTNESS" -lt "0" ]; then
echo "This makes your screen off";
fi
chmod +x /usr/bin/brightness
reload the acpid daemon
sudo rc.d restart acpid
you should be good to go
as a side note if the brightness dialogue is coming up your nvidia card is probably stilll on
Offline
Thank you so much! Works perfectly!
However, I had to switch event=hotkey ATKD 0000002[0123456789abcdef] and event=hotkey ATKD 0000002[0123456789abcdef] because in my case the keys were the opposite.
Offline
I just realized that it appears that after using those keys the brightness is not going to be as bright as at the beginning anymore.
In fact the screen looks a bit darker even after being at 100% brightness using the key bindings...
What can I try to fix this?
Offline
The brightness keys was my bad... I get the backwards every new install . Also I haven't gotten around the screen being darker issue... I rarely notice it so it's not a big deal for me. I think it's something to do with the setpci method? I'm also a noob so i can't help out that much there
Offline
I just realized that it appears that after using those keys the brightness is not going to be as bright as at the beginning anymore.
In fact the screen looks a bit darker even after being at 100% brightness using the key bindings...What can I try to fix this?
The brightness value isn't a decimal value but a hexadecimal value. If you run
setpci -s 00:02.0 F4.B=ff
it should be at full brightness, at least that's what it does on my laptop. A brightness value of 99 would be barely 60% of max in comparison.
you can change the line where you set the brightness from
setpci -s 00:02.0 F4.B=$BRIGHTNESS
to
setpci -s 00:02.0 F4.B=`printf '%x' $BRIGHTNESS`
and change 99 to 255 in the script and it should work
Offline
Pages: 1