You are not logged in.

#1 2014-04-28 17:09:54

frukt
Member
Registered: 2008-12-12
Posts: 14

remap backlight up / down keys on XFCE or changing xbacklight backend?

Hi,

I've been having an issue on my laptop where occasionally changing the backlight intensity via the backlight up / down keys will not work after plugging in an external monitor. The problem persists after disconnecting the monitor. I'm using XFCE4. This makes me wonder whether one of two options is possible:

  • Remap the xf86monbrightness(up|down) keys to some other action; this is currently not possible as xfce4-power-manager captures them. I do not want to disable xfce4-power-manager, so that's not an option.

  • Change the mechanism how X11 varies the backlight intensity. This would be a good solution, because xbacklight doesn't work either when this issue is present. Hence it's most likely an upstream problem, not specific to XFCE. 

In summary, the desired solution would be not to use whatever mechanism xbacklight (and by extension, xfce4-power-manager) uses to change backlight intensity, but write to the hardware-specific /sys/class/backlight/intel_backlight/brightness file, which always works. But I would like to keep using the standard brightenss up / down keys on my laptop. Any ideas are appreciated.

Offline

#2 2014-04-28 17:42:03

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,551
Website

Re: remap backlight up / down keys on XFCE or changing xbacklight backend?

If you are attached to xfce4-power-manager I only see two ways of doing this.  The one sure-fire way would be to modify the source for that tool and change it's actions.  An alternative would be to try making a drop-in replacement for xbacklight (replace /usr/bin/xbacklight with a program/script of your own).

The latter would be *much* easier, but may or may not work.  If the power manager program calls the binary itself, this would work - but more likely it simply uses the same Xlib calls that xbacklight does without actually calling /usr/bin/xbacklight.

This could be easily tested though.  Just temporarily replace /usr/bin/xbacklight with a script that just creates a new file, or something simple, just to see if it executes.  Then hit the brightness button then check for that file.

Last edited by Trilby (2014-04-28 17:43:10)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB