You are not logged in.

#1 2012-09-05 23:51:55

synthead
Member
Registered: 2006-05-09
Posts: 1,337

How are keyboard keys for screen brightness handled?

I submitted a bug report three months ago about my screen brightness not working and it still isn't fixed, so I figured I'd have my go at fixing it myself and submitting a patch.  However, I'm not really sure how the keyboard keys handle brightness control on a base installation.  Is there a rule somewhere I should be looking at perhaps?

Last edited by synthead (2012-09-05 23:52:15)

Offline

#2 2012-09-06 00:24:22

dummyan
Member
From: Skopje, Macedonia
Registered: 2012-04-26
Posts: 20

Re: How are keyboard keys for screen brightness handled?

I have configured xbindkeys to call this script when one of the buttons is pressed:

#!/bin/bash

#INCREMENT BRIGHTNESS
if [ $1 == "up" ]; then
	xbacklight -inc 25 -time 0 -steps 1
fi

#DECREMENT BRIGHTNESS
if [ $1 == "down" ]; then
	xbacklight -dec 25 -time 0 -steps 1
fi

xbacklight is provided by xorg-xbacklight package. The script is pretty much self explanatory and xbindkeys calls it with argument 0 or 1. Hope this helps.


EDIT: when writing the script I assumed that I need to check max and current values so I dont force xbindkeys to pass values over and bellow the regular. Sure enough I was wrong about this. The thing is I forgot to delete the variables from the script. Knowing this, it is possible to call xbacklight directly from xbindkeys config and this script is not necessary, but I still use is for no reason. Sory for rushing up and maybe confusing you.

The best and simplest solution is to install xbindkeys and call xbacklight directly from the config.

Last edited by dummyan (2012-09-06 00:29:38)


I was born ready noob.

Offline

#3 2012-09-06 01:25:42

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

Re: How are keyboard keys for screen brightness handled?

I think the OP might be asking how to change the backlight when not using X... at least I think so.  With my new thinkpad, I believe that my backlight keys are actually controlled by the thinkpad_acpi module.  I would have said that the kernel did not handle this just a couple months ago, but that was before I realised that there are specialized acpi modules for many different harware vendors.

So I think that if this is what you are asking, you are going to have to dig into the lowest levels of the system.

Offline

#4 2012-09-06 14:43:19

dummyan
Member
From: Skopje, Macedonia
Registered: 2012-04-26
Posts: 20

Re: How are keyboard keys for screen brightness handled?

I totally missed "base installation", sorry.


I was born ready noob.

Offline

#5 2012-09-06 17:35:31

dontbugme
Banned
Registered: 2011-11-04
Posts: 166
Website

Re: How are keyboard keys for screen brightness handled?

Since I went on a wild goose chase for a week or so on my UX31A to fix the backlight keys, I can only tell you the steps I did more or less.

  1. Try to boot your laptop with the kernel parameter acpi_backlight=vendor and load (in your case) the toshiba-acpi module.
      Does it work with that.? Check dmesg if you get the events/parsing errors or something. Still nothing?

  2. You should compile the kernel with CONFIG_ACPI_DEBUG enabled. This enables 2 new acpi module parameters: debug_layer and debug_level, which you can set on boottime, or dynamically on /sys/module/acpi/parameters/{debug_layer, debug_level}.
    Check http://www.mjmwired.net/kernel/Document … /debug.txt for the arguments. It is a bit tricky since its heavy use of bitmasks.

  3. Do you get any dmesg output / messages.log?  Does it fire notify events? If not, you won't get around disassembling/debuuging the dsdt.

  4. Witch debug_layer/debug_level enabled, it should tell you which method is executed in the bios. Now you have to understand how the backlight control methods work -> follow the control/execution path.
    acpiexec helps a lot with that (but be warned, it's not working exactly as the live system, because some stuff isn't initialized, and I didn't find out how to do that in the emulator).
    This step is much guesswork. Is there a control flow where the method returns without calling Notify(...)?
    If so, this is probably the path, the method is choosing. To fix this, you have to find out why this path is chosen and how to initialize the right variables so the path that fires a notify event is chosen.

   

In my case, the problem was a not initialized element named CADL in a Field/OperationRegion named IGDM. Maybe that is the problem, maybe not. Check https://bugs.freedesktop.org/show_bug.cgi?id=45452 for more info regarding this bug.

Last edited by dontbugme (2012-09-06 17:41:49)

Offline

#6 2013-03-29 04:47:43

dront78
Member
From: Moscow
Registered: 2010-11-24
Posts: 47

Re: How are keyboard keys for screen brightness handled?

for me brightness keys works with blacklisting toshiba_acpi module, acpi_osi=Linux, acpi_backlight=legacy
but no acpi function keys works in this case ;(

Last edited by dront78 (2013-03-29 04:48:07)

Offline

#7 2013-03-29 04:55:35

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

Re: How are keyboard keys for screen brightness handled?

@dront78, this is a kind of old thread you are reviving here.  But anyway, recently Thinkpads have experienced this regression in functionality as well.  The brightness keys suddenly didn't work with the 3.8.* kernels and the values in /sys/class/backlight were totally unreliable.  For most of these machines and the thinkpad_acpi module, fixing it was accomplished with:

acpi_osi="!Windows 2012" 

Take note that there needs to be double-quotes, exactly as I put there in order for this to work.  So this means that if you are using something like Grub, which uses double quotes for its config file line, you will have to determine how it wants you to escape these.  In Grub, I think it will allow for traditional backslash escapes.  Refind uses double double quotes (acpi_osi=""!Windows 2012"").  An efibootmgr entry can use regular escapes (\), as can lilo/elilo.

Offline

#8 2013-03-30 16:05:07

dront78
Member
From: Moscow
Registered: 2010-11-24
Posts: 47

Re: How are keyboard keys for screen brightness handled?

Unfortunatly this not working for me. I spent a lot of time trying to fix this issue and the only thing I know it's working perfectly half a year ago sad

Offline

Board footer

Powered by FluxBB