[hardy] HAL reports multiple button presses when brightness keys are pressed only once

Bug #218889 reported by Francisco Borges
0
Affects Status Importance Assigned to Milestone
hal (Ubuntu)
New
Undecided
Unassigned
kde-guidance (Ubuntu)
Confirmed
Undecided
Andreas Wenning

Bug Description

Binary package hint: kde-guidance-powermanager

"lshal -m" output from a single key-press
09:29:53.479: platform_i8042_i8042_KBD_port_logicaldev_input condition ButtonPressed = brightness-down
09:29:53.483: computer_logicaldev_input_1 condition ButtonPressed = brightness-down
09:29:53.484: computer_logicaldev_input condition ButtonPressed = brightness-down
09:29:53.654: platform_i8042_i8042_KBD_port_logicaldev_input condition ButtonPressed = brightness-down

Running KDE with Hardy (Beta) on a Dell Inspiron 6400.
I used to have 8 different brightness levels, now if I use the Fn+up/down to change brightness the levels of brightness go:
100% -> 42% -> 0%
0% -> 57% -> 100%

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

Please run this slightly modified version of powermanage.py and attach the output.

You can do it by running "./powermanage.py > brightness_test" and attach the generated brightness_test file.

Changed in kde-guidance:
assignee: nobody → andreas-wenning
status: New → Incomplete
Revision history for this message
Francisco Borges (francisco-borges) wrote :

Hello,

Thanks for the quick response. I didn't see much useful information in the output, but here it is anyway.

FWIW: There is at least another person in the Kubuntu Users mailing list that reported having the same problem. See the thread (I started) here:
https://lists.ubuntu.com/archives/kubuntu-users/2008-April/027045.html

Please don't hesitate in requesting more testing, or information.

[...]

Off-Topic note: having done Python on Emacs for years, and now doing Java on Eclipse, I don't know how I have lived for so long without code navigation features.)

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

Strange. You have the exact same number of brightness levels reported by HAL as me, so guidance-power-manager should work the same way for both of us.

Can you please test the attached version. It will report every brightness change that is done on stdout. Please try to press the brightness-up or -down button and see if you get one line of output, or if several lines are printed on stdout?

Revision history for this message
Francisco Borges (francisco-borges) wrote : Re: [Bug 218889] Re: [hardy] brightness on KDE jumps from 100% -> 42% -> 0%

On Sat, Apr 19, 2008 at 5:19 PM, awen <email address hidden> wrote:
> Can you please test the attached version. It will report every
> brightness change that is done on stdout. Please try to press the
> brightness-up or -down button and see if you get one line of output, or
> if several lines are printed on stdout?

Running your script I will get:

press [ Fn + brightness-down ]

Brightness changed to 6
Brightness changed to 5
Brightness changed to 4
Brightness changed to 3

press [ Fn + brightness-down ]

Brightness changed to 2
Brightness changed to 1
Brightness changed to 0

The output of a single key press of [fn + brightness-down] on
/var/log/acpid is:

[Sat Apr 19 20:11:17 2008] received event "video LCD 00000087 00000000"
[Sat Apr 19 20:11:17 2008] notifying client 6173[0:0]
[Sat Apr 19 20:11:17 2008] notifying client 23179[107:112]
[Sat Apr 19 20:11:17 2008] executing action "/etc/acpi/video_brightnessdown.sh"
[Sat Apr 19 20:11:17 2008] BEGIN HANDLER MESSAGES
[Sat Apr 19 20:11:17 2008] END HANDLER MESSAGES
[Sat Apr 19 20:11:17 2008] action exited with status 0
[Sat Apr 19 20:11:17 2008] completed event "video LCD 00000087 00000000"
[Sat Apr 19 20:11:17 2008] received event "video LCD 00000087 00000000"
[Sat Apr 19 20:11:17 2008] notifying client 6173[0:0]
[Sat Apr 19 20:11:17 2008] notifying client 23179[107:112]
[Sat Apr 19 20:11:17 2008] executing action "/etc/acpi/video_brightnessdown.sh"
[Sat Apr 19 20:11:17 2008] BEGIN HANDLER MESSAGES
[Sat Apr 19 20:11:17 2008] END HANDLER MESSAGES
[Sat Apr 19 20:11:17 2008] action exited with status 0
[Sat Apr 19 20:11:17 2008] completed event "video LCD 00000087 00000000"

FWIW, I get the same jumps when I hit "Fn + brightness-up".

[...]

If I call ACPI directly, i.e., execute on the shell as root:

/etc/acpi/video_brightnessup.sh

Or

/etc/acpi/video_brightnessdown.sh

Then the levels will be changed one by one, i.e. 7 -> 6 -> 5 etc.

[...]

If I had "gpmhelper.py" running the brightness level will go from 100%
-> 0%, and from 0% -> 100%.

--
Francisco

Revision history for this message
Andreas Wenning (andreas-wenning) wrote : Re: [hardy] brightness on KDE jumps from 100% -> 42% -> 0%

It looks like HAL sends us multiple brightness-button events when you press the button only once. Just to be sure about this, try running "lshal -m" to see what events is send by HAL. Please attach the output.

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

I've uploaded a test version of a possible work-around to https://launchpad.net/~andreas-wenning/+archive . Go for the version 0.8.0svn20080103-0ubuntu17~ppa1 of kde-guidance-powermanager. Report back if this works for you. Remember that you need to restart the powermanager after installing a new version.

Revision history for this message
Francisco Borges (francisco-borges) wrote :

Using your modified sources, led to an improvement lets say. Namely, now I go from:

100% -> 71% -> 42% -> 14% -> 0%

0% -> 28% -> 57% -> 85% -> 100%

In the attached output of "lshal -m", I always hit enter once to separate the lines between hitting Fn + brightness-(up|down).

 ~ % aptitude show kde-guidance-powermanager
Package: kde-guidance-powermanager
Version: 0.8.0svn20080103-0ubuntu17~ppa1

[...]

BTW, Thanks for your effort looking into this.

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

Thanks for your feedback.

I've uploaded a new version of the work-around to my PPA. It's named the same except the version numbering ends in ~ppa2. Please test if this fixes it. If you reply quickly I might have a chance to get it into Hardy.

Revision history for this message
Francisco Borges (francisco-borges) wrote :

I've installed the ~ppa2 packages, and not knowing how I could be sure to have restarted it, I rebooted.

No luck. I still get two requests for each time I hit the keys:

(lshal -m output, whitelines separate different key hits)

09:29:53.479: platform_i8042_i8042_KBD_port_logicaldev_input condition ButtonPressed = brightness-down
09:29:53.483: computer_logicaldev_input_1 condition ButtonPressed = brightness-down
09:29:53.484: computer_logicaldev_input condition ButtonPressed = brightness-down
09:29:53.654: platform_i8042_i8042_KBD_port_logicaldev_input condition ButtonPressed = brightness-down

09:29:55.795: platform_i8042_i8042_KBD_port_logicaldev_input condition ButtonPressed = brightness-down
09:29:55.801: computer_logicaldev_input_1 condition ButtonPressed = brightness-down
09:29:55.805: computer_logicaldev_input condition ButtonPressed = brightness-down
09:29:55.966: platform_i8042_i8042_KBD_port_logicaldev_input condition ButtonPressed = brightness-down

09:29:57.688: platform_i8042_i8042_KBD_port_logicaldev_input condition ButtonPressed = brightness-up
09:29:57.695: computer_logicaldev_input_1 condition ButtonPressed = brightness-up
09:29:57.698: computer_logicaldev_input condition ButtonPressed = brightness-up
09:29:57.866: platform_i8042_i8042_KBD_port_logicaldev_input condition ButtonPressed = brightness-up

[....]

BTW, to restart this without rebooting would

% /etc/init.d/kde-guidance restart

suffice? Without even logging out of KDE?

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

You will still get multiple output when issueing "lshal -m". I'm trying to work around this issue, so the interesting is how much your brightness change each time you press a button; it should drop from about 100% to around 85% (as you have 8 levels). Does this work, or how much does it drop with the ~ppa2 version.

To restart it you just exit the powermanager in your panel and start it again using "guidance-power-manager" (you can use fx alt+f2 or a terminal).

Revision history for this message
Francisco Borges (francisco-borges) wrote :

Levels (in %) with ~ppa2 are:

100 -> 71 -> 42 -> 14 -> 0

0 -> 28 -> 57 -> 85 -> 100

description: updated
Changed in kde-guidance:
status: Incomplete → Confirmed
Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

Please try starting the attached script in a terminal "./gpmhelper.py", and do a single press on the brightness-down button. Please attach the generated output. (Your brightness will seriously misbehave while this script is running, but that is not interesting, just the output is). You exit pressing ctrl+c.

After doing this test please try starting the script again. Please press your brightness-down button down and hold it down; wait two seconds and release it again. Once more attach the output.

Thanks again for your feedback.

Revision history for this message
Francisco Borges (francisco-borges) wrote :

Results attached.

In both files an empty lines separates each key press.

On both cases, I went from 100% -> 57 -> 28 -> 0% -> 14 -> 71 -> 100%.

Some times I manage to stop somewhere in between (like 14%), but it is rare, and hard to reproduce.

Revision history for this message
Terence Simpson (tsimpson) wrote :
Revision history for this message
Terence Simpson (tsimpson) wrote :
Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

New ~ppa4 uploaded. Please test once again, thanks.

You should be able to reproduce stepping double steps:
100 -> 71 -> 42 -> 14 -> 0
0 -> 28 -> 57 -> 85 -> 100
ie. it should be the same seen from your point of view compared to ~ppa2.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.