View previous topic :: View next topic |
Author |
Message |
potuz Guru
Joined: 30 Jan 2010 Posts: 378
|
Posted: Mon Jul 26, 2010 6:41 pm Post subject: which script runs when I press brightness button? |
|
|
Hello list, when I press the volume up button (F12 in my laptop) I see a notification and the volume increases. Presumably this is triggered by having volume_up XF86AudioRaiseVolume in /apps/gnome_settings_daemon/keybindings. However, when I press the brightness button up (F2 in my laptop) my brightness also increases, but looking in gconf-editor I can't find where is the assignement of a key to F2. I can't also find where is the script that gets executed. I'm asking cause I'd like to also have a similar script running for the keyboard backlight (that I can currently control by editing directly /sys/class/leds/smc\:\:kbd_backlight/brightness)
Thanks,
R. |
|
Back to top |
|
|
CrankyPenguin Apprentice
Joined: 19 Jun 2003 Posts: 283
|
Posted: Mon Jul 26, 2010 8:28 pm Post subject: Depends upon the system. |
|
|
On some systems the process is handled entirely in hardware and you may not have a hook for a separate script. However if you do it would likely require the backlight module which is part of the acpi code in the kernel and then I would suggest something like acpid which allows hooks of that type. _________________ Linux, the OS for the obsessive-compulsive speed freak in all of us. |
|
Back to top |
|
|
potuz Guru
Joined: 30 Jan 2010 Posts: 378
|
Posted: Mon Jul 26, 2010 8:49 pm Post subject: |
|
|
Hi thanks for the answer. It kind of confuses me though. I understand the first part:
Quote: | On some systems the process is handled entirely in hardware and you may not have a hook for a separate script. |
Indeed I am happy with this. Since I don't run acpid (long story short: it's a macbook air and the acpi code in the kernel needs some time still to boot properly) it may well be that brightness is controlled by hald, but I can't find the place where this is set up, it might be calling /usr/libexec/scripts/hal-system-lcd-{g,s}et-brightness but I don't really know/think so.
On the other hand:
Quote: | However if you do it would likely require the backlight module which is part of the acpi code in the kernel and then I would suggest something like acpid which allows hooks of that type. | This confuses me a little. I guess it should be quite easy to write a script that just increases or decreases brightness by editing the appropriate /sys/class/leds... and bind it with the windowmanager to F5-F6, I don't see how acpid will be "needed". On the other hand I suppose you mean by "require the backlight module..." that I do need the appropriate driver that provides /sys/class/leds/smc\:\:kbd_backlight/brightness which indeed in my case it is is the nvidia_bl module which is loaded.
What I wandered is how is that my system "knows" that F1 corresponds to lowering brightness, since I couldn't find any place where this key is bound to anything. This seems different with volume down = F11 since this key binding appears in gnome-settings (although I also don't know where is the script that actually changes the volume). |
|
Back to top |
|
|
|