[Hardy]Status of display brightness freezes g-p-m (or even X) for a while

Bug #176687 reported by der_vegi
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HAL
Fix Released
Unknown
gnome-power-manager (Ubuntu)
Invalid
Undecided
Unassigned
Nominated for Hardy by harrydb
hal (Ubuntu)
Confirmed
Undecided
Unassigned
Nominated for Hardy by harrydb

Bug Description

On my Hardy daily-live 20071211 (amd64) with all updates until today, the change of brightness with the hotkeys Fn+upd/down works. But the status icon, that is displayed for a couple of seconds, when I change the brightness, is not showing the actual status of the display brightness, but always "0".

The display brightness icon you cann add the the panel, does not work either. My notebook is a Dell Inspiron 1501, output of 'lspci -vvnn' follows.

Revision history for this message
der_vegi (m-may) wrote :
description: updated
Revision history for this message
der_vegi (m-may) wrote :
Revision history for this message
der_vegi (m-may) wrote :

Still there in Hardy Alpha 3. But now the status bar is not displayed at all any more after I have installed all the updates that piled up over the last week. Instead, when I change the display brightness with 'Fn' + 'up' the display brightness changes as desired, but at the place, where the status bar should be, there is nothing. But switching to another window shows you, that this part of the screen 'memorized' the window, that was on top when I pressed the brightness and it doesn't fade away: I can still read the content of my browser window at this time there, although I have already minimized the browser...

Revision history for this message
der_vegi (m-may) wrote :

Still present with all updates installed until today. Here a screenshot of the strange spot (part of my desktop background) in the screen after changing display brightness. It shows up, after I have minimized and then remaximized Firefox. But then it stays on top of everything for the rest of the X session.

Revision history for this message
der_vegi (m-may) wrote :

Okay, very strange: Approx. 5 minutes after pressing the brightness-up button, the brightness status icon showed up at that spot of the screen (still not showing any status at all) and disappears after a second, leaving the screen proper again.

Btw.: The version of gnome-power-manager is 2.21.1-0ubuntu1.

Revision history for this message
der_vegi (m-may) wrote :

Still an issue with all updates applied until today.

harrydb (harrydeboer)
Changed in gnome-power-manager:
status: New → Confirmed
Revision history for this message
harrydb (harrydeboer) wrote : Re: [Hardy]Status of display brightness blocks part of the screen for a while

Same for me, also on an inspiron 1501.

However there are more issues, the powermanager is also slow: disconnect power and it takes more than half a minute before it shows.

I think this was introduced somewhere between hardy alpha2 and alpha3 when iirc something with the polling intervals changed.

Revision history for this message
harrydb (harrydeboer) wrote :

Oh well, there's more going on. Will be back later...

Revision history for this message
der_vegi (m-may) wrote :

Still there on Hardy Alpha 5 (amd64).

Maybe this is also related: I've been loading my battery from almost empty to almost full now, but the battery in gnome shows still 2%. Also, it takes sometimes very long (up to 10 s) from pressing the power button in the task bar until the options "shutdown" etc. show. I have the impression, that this only occurs when I have pressed the display brightness button before...

Revision history for this message
harrydb (harrydeboer) wrote :

Yep I have that too. I spend some time looking at the output from gnome-power-manager and noticed it did not get any results from GetBrightness and SetBrightness results. Might be some dbus policy issue, a malfunctioning hald-addon-dell-backlight but is also not recognised some keycodes (will figure out the keycodes when I have some more time)...

However I find it strange that while gnome-power-manager waits for event/timeout it cannot process any other events (shutdown, battery applet).

Revision history for this message
der_vegi (m-may) wrote :

This can even freeze whole X: After changing the display brightness with the keys, I added the brightness applet to the panel. It took like half a minute until it appeared. Trying to change the brightness with it resulted in freezing X for a couple of minutes...

Revision history for this message
harrydb (harrydeboer) wrote :

I managed to get an X freeze for a while too after some stressing keypresses :) The power applet also freezes, but it always does after pressing a brightness key (and it never wakes up again).

I did find some interesting output from hald:

[6044]: 17:40:08.035 [D] addon-dell-backlight.cpp:198: Received SetBrightness DBus call
process 6044: arguments to dbus_message_get_args() were incorrect, assertion "(error) == NULL || !dbus_error_is_set ((error))" failed in file dbus-message.c line 1667.
This is normally a bug in some application using the D-Bus library.

Attaching some logs I made.

Revision history for this message
harrydb (harrydeboer) wrote :
Revision history for this message
harrydb (harrydeboer) wrote :
Revision history for this message
harrydb (harrydeboer) wrote :
Revision history for this message
harrydb (harrydeboer) wrote :

Btw, I still think that if something like this happens other components should not suffer from it. Also, the OSD should not be shown while there is no response yet.

Revision history for this message
harrydb (harrydeboer) wrote :

Btw2, the keycode/polling things I mentioned earlier don't have anything to do with this.

Revision history for this message
harrydb (harrydeboer) wrote :

Adding hal since it seems to be an error in addon-dell-backlight.cpp

Revision history for this message
harrydb (harrydeboer) wrote :

We should also have
    udi:'/org/freedesktop/Hal/devices/dell_lcd_panel'
    key: laptop_panel.brightness_in_hardware = true
for this laptop, since it does brightness in hardware.

Revision history for this message
harrydb (harrydeboer) wrote :

I found the bug, currently working on a fix

Changed in hal:
assignee: nobody → harrydeboer
status: New → In Progress
Changed in gnome-power-manager:
status: Confirmed → Invalid
Revision history for this message
harrydb (harrydeboer) wrote :

This patch does the following:
* correctly free &err if it is set before reusing
* add check if udi for ac-adapter exists
* add udi for ac adapter as seen on inspiron 1501

Revision history for this message
harrydb (harrydeboer) wrote :

This patch resolves the issue, but to be precise we should also set
    /org/freedesktop/Hal/devices/dell_lcd_panel: laptop_panel.brightness_in_hardware = true
in hal-info(?). To do it manually:
    sudo hal-set-property --udi '/org/freedesktop/Hal/devices/dell_lcd_panel' --key laptop_panel.brightness_in_hardware --bool true

However SetBrightness does not seem to work on this model anyway, so it does nothing. This means dim on idle/dim on battery does not work. GetBrightness does work.

Can one of the hal maintainers have a look at this patch?

Changed in hal:
assignee: harrydeboer → nobody
status: In Progress → Fix Committed
Revision history for this message
harrydb (harrydeboer) wrote :

Setting back to confirmed since patch is not committed to the source anywhere.

Changed in hal:
status: Fix Committed → Confirmed
Changed in hal:
status: Unknown → Confirmed
Revision history for this message
harrydb (harrydeboer) wrote :
Changed in hal:
status: Confirmed → Fix Committed
status: New → Unknown
status: Fix Committed → Confirmed
Revision history for this message
harrydb (harrydeboer) wrote :

Changed upstream bug, was duplicate.

Changed in hal:
status: Unknown → Fix Released
Revision history for this message
harrydb (harrydeboer) wrote :

For der_vegi (and myself) I created two packages that contain the upstream fix for this issue and quick&dirty hacks to make setbrightness work (dim on idle/battery) and not make gpm do setbrightness on keypresses. Use at your own risk and please *do not* submit bug reports against these packages.

http://ijscoboer.nl/public/debs/hal_0.5.10-5ubuntu8_i386-dellfix.deb
http://ijscoboer.nl/public/debs/gnome-power-manager_2.21.92-0ubuntu2_i386-dellfix.deb

Revision history for this message
der_vegi (m-may) wrote :

Sorry, I am on amd64...

Marking as affects "Dell Ubuntu Project", as this seems to be a Dell specific issue.?

no longer affects: dell
Revision history for this message
Timothy R. Chavez (timrchavez) wrote :

The bug task for the somerville project has been removed by an automated script. This bug has been cloned on that project and is available here: https://bugs.launchpad.net/bugs/1305472

no longer affects: somerville
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.