You are not logged in.

#1 2013-08-12 00:54:18

justinzane
Member
From: Weed, CA, US
Registered: 2013-07-19
Posts: 19
Website

Change Inc/Dec % for WMI "KEY_BRIGHTNESSUP" Backlight Control

I've got a Dell laptop, and the good news is that the <Fn+F4/5> backlight control keys work "out-of-the-box". My problem is that the percentage change on each key-combo press is variable, 13% or 20%, and is too large in either case. How does one control the specific amount that the backlight is incremented per press?

A quick grep shows the unhelpful definition `include/linux/input.h:#define KEY_BRIGHTNESSUP  225` which is duplicated in various lirc and X files, but nothing along the lines of:
    # unknown.conf
    backlight_change_pct = 5

Any guidance? Thanks.

Offline

#2 2013-08-12 23:03:30

Ivoz
Member
From: Australia
Registered: 2013-04-23
Posts: 2

Re: Change Inc/Dec % for WMI "KEY_BRIGHTNESSUP" Backlight Control

The ability to do this is generally dependant on the Desktop Environment that you are using. Different ones will have different means and different levels of configurability.

Actual writeable files to control backlight are generally in /sys/class/backlight/, under a folder for various drivers (intel, acpi).

I myself use the i3 window manager with no DE, so I have put the following key bindings in it's configuration file:

# Brightness key bindings
bindsym XF86MonBrightnessUp exec "xbacklight -inc 10"
bindsym XF86MonBrightnessDown exec "xbacklight -dec 10"

xbacklight is one of a few utilities that allow programmatically changing the backlight brightness.

Offline

#3 2013-08-12 23:44:29

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Change Inc/Dec % for WMI "KEY_BRIGHTNESSUP" Backlight Control

@Ivoz, Welcome to the Arch forums!  Unfortunately, I don't think that you read the OP's post.  The question was not about how to set keys to issue a command (like xbacklight), but rather how to change the increment of the backlight change for keys that are handled by a kernel module (wmi).  These keys typically are taken away from the control of the normal keyboard functionality and are instead controlled by the vendor specific module.

BTW, you registered almost four months ago!  Where have you been?  Lurking? wink

@OP, I would say that if the module doesn't give you an option to handle this in the "parms" (modinfo -p <module>), then the only way I can think of to do this would be to edit the source of the kernel code like you mentioned already.  Taking a look at the various dell modules... they kind of suck in terms of their ability to be configured, don't they?  Maybe this would be something to report to the module maintainers as a feature request.

Offline

#4 2013-08-14 22:15:44

justinzane
Member
From: Weed, CA, US
Registered: 2013-07-19
Posts: 19
Website

Re: Change Inc/Dec % for WMI "KEY_BRIGHTNESSUP" Backlight Control

Thanks to both of you.

Ivoz' suggestion seems on the right track in the sense that `xbaclkight` allows exact (integer) percentages. Though it does not answer the question, `xbacklight -set ##` seems like the perfect solution in practice since I've always got a console or two handy.

Wonderwoofy, modinfo shows that `dell_wmi` nor `wmi` take relevant parameters. I've looked through the source, `dell_wmi.c` and as far as I can tell, the driver just passes the event up to the `wmi` module which presumably passes the event on to ACPI. So, somewhere in that mess lies the fix. I'm too lazy at the moment to find it, however.

Offline

Board footer

Powered by FluxBB