You are not logged in.
Pages: 1
On my laptop (Dell L501x) I am unable to use the brightness keys so I'm trying to write a bash script that I can run to change the brightness for me. "xbacklight" is able to set (not inc or dec though) the brightness to "/sys/class/backlight/acpi_video0/brightness" but then I have to press XF86MonBrightnessDown to make the change apply. If I press XF86MonBrightnessUp the brightness goes to 100% but "/sys/class/backlight/acpi_video0/brightness" still contains the correct value set from xbacklight. After pressint XF86MonBrightnessUp, XF86MonBrightnessDown no longer sets the brightness correctly.
I have made two scripts that change the brightness in steps based on the value in "/sys/class/backlight/acpi_video0/brightness" however I still have to press XF86MonBrightnessDown after setting it to make the change apply. And if I hit XF86MonBrightnessUp by mistake I have to use xbacklight manually so fix it.
Does anyone know a way I can set the brightness without having to press XF86MonBrightnessDown so that I can actually bind those keys to my scripts with xbindkeys?
(Or better yet, if anyone knows a workaround to getting the XF86 brightness keys working correctly on this laptop)
Offline
As u know, when you press the button, acpi event occures. There is an wiki article about this https://wiki.archlinux.org/index.php/Acpid
This may also be usefull.
https://wiki.archlinux.org/index.php/ACPI_hotkeys
Offline
There is nothing in /etc/acpi/handler.sh that is related to the brightness keys . I could easily create something, but that still doesn't address how to get the brightness to actually change.
Offline
What about that way?
https://wiki.archlinux.org/index.php/Backlight#ACPI
Offline
That functions the same way as xbacklight does. It sets the value correctly, but I still have to try to decrease the button with my keyboard before it changes. And the extra launch options just made it so I can't change the brightness at all.
Offline
Well, I made this a while ago when not using xbacklight:
#!/bin/bash
~/scripts/br
file="/sys/class/backlight/acpi_video0/brightness"
level=$(cat $file)
if [[ "$#" -eq 0 ]]; then
cat $file
elif [[ "$1" = "-" ]]; then
echo $(( level - 1 )) > $file
elif [[ "$1" = "+" ]]; then
echo $(( level + 1 )) > $file
fi
It takes arguments '+' or '-' (inc and dec), and displays the current brightness if none. I binded the "br +" and "br -" commands to some fn keys. Hope this helps.
Last edited by roygbiv (2011-09-19 11:43:38)
Offline
That still doesn't help address my problem. I can set the brightness in the file and with xbacklight, but it wont actually change until I press XF86MonBrightnessDown. I am trying to find out how I can make it change like when I press that key without having to press it. xbacklight and echoing to the file doesn't actually change the brightness for me.
Offline
There's a dell-laptop kernel module which, I guess after quick examination of it's code, should handle backlight controls on Dell notebooks.
Offline
Pages: 1