Cancel button in kde-guidance-powermanager doesn't do anything

Bug #183656 reported by Terence Simpson
8
Affects Status Importance Assigned to Milestone
hal (Ubuntu)
Fix Released
Medium
Unassigned
kde-guidance (Ubuntu)
Fix Released
Medium
Scott Kitterman

Bug Description

Binary package hint: kde-guidance

The "Cancel" button doesn't exit the window in the Power Manager window, when started from the command line this is the output:

python /usr/share/python-support/kde-guidance-powermanager/guidance-power-manager.py
Warning: in getBrightness(): org.freedesktop.Hal.Device.PermissionDeniedByPolicy: org.freedesktop.hal.power-management.lcd-panel no <-- (action, result)
Traceback (most recent call last):
  File "/usr/share/python-support/kde-guidance-powermanager/guidance-power-manager.py", line 876, in changePoweredBrightness
    self.powermanager.adjustBrightness(level)
  File "/usr/share/python-support/kde-guidance-powermanager/powermanage.py", line 296, in adjustBrightness
    if level == self.getBrightness():
  File "/usr/share/python-support/kde-guidance-powermanager/powermanage.py", line 287, in getBrightness
    return self.old_b
AttributeError: PowerManage instance has no attribute 'old_b'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/var/lib/python-support/python2.5/apport_python_hook.py", line 42, in apport_excepthook
    binary = os.path.realpath(os.path.join(os.getcwdu(), sys.argv[0]))
IndexError: list index out of range

Original exception was:
Traceback (most recent call last):
  File "/usr/share/python-support/kde-guidance-powermanager/guidance-power-manager.py", line 876, in changePoweredBrightness
    self.powermanager.adjustBrightness(level)
  File "/usr/share/python-support/kde-guidance-powermanager/powermanage.py", line 296, in adjustBrightness
    if level == self.getBrightness():
  File "/usr/share/python-support/kde-guidance-powermanager/powermanage.py", line 287, in getBrightness
    return self.old_b
AttributeError: PowerManage instance has no attribute 'old_b'

-- Pressed "Cancel" here --

Warning: in getBrightness(): org.freedesktop.Hal.Device.PermissionDeniedByPolicy: org.freedesktop.hal.power-management.lcd-panel no <-- (action, result)
Traceback (most recent call last):
  File "/usr/share/python-support/kde-guidance-powermanager/guidance-power-manager.py", line 1092, in slotCancel
    self.pmwidget.powermanager.adjustBrightness(level)
  File "/usr/share/python-support/kde-guidance-powermanager/powermanage.py", line 296, in adjustBrightness
    if level == self.getBrightness():
  File "/usr/share/python-support/kde-guidance-powermanager/powermanage.py", line 287, in getBrightness
    return self.old_b
AttributeError: PowerManage instance has no attribute 'old_b'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/var/lib/python-support/python2.5/apport_python_hook.py", line 42, in apport_excepthook
    binary = os.path.realpath(os.path.join(os.getcwdu(), sys.argv[0]))
IndexError: list index out of range

Original exception was:
Traceback (most recent call last):
  File "/usr/share/python-support/kde-guidance-powermanager/guidance-power-manager.py", line 1092, in slotCancel
    self.pmwidget.powermanager.adjustBrightness(level)
  File "/usr/share/python-support/kde-guidance-powermanager/powermanage.py", line 296, in adjustBrightness
    if level == self.getBrightness():
  File "/usr/share/python-support/kde-guidance-powermanager/powermanage.py", line 287, in getBrightness
    return self.old_b
AttributeError: PowerManage instance has no attribute 'old_b'

This is on Hardy:
kde-guidance-powermanager:
  Installed: 0.8.0svn20080103-0ubuntu1

Related branches

description: updated
Revision history for this message
Scott Kitterman (kitterman) wrote :

This appears to be a two part problem:

1. HAL doesn't let guidance-powermanager have access to the required device:

Warning: in getBrightness(): org.freedesktop.Hal.Device.PermissionDeniedByPolicy: org.freedesktop.hal.power-management.lcd-panel no <-- (action, result)

2. guidance-powermanager then crashes because it doesn't have an old brightness value:

  File "/usr/share/python-support/kde-guidance-powermanager/powermanage.py", line 287, in getBrightness
    return self.old_b
AttributeError: PowerManage instance has no attribute 'old_b'

Changed in hal:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Scott Kitterman (kitterman) wrote :

I can teach guidance not to crash.

Changed in kde-guidance:
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kde-guidance - 0.8.0svn20080103-0ubuntu2~ppa3

---------------
kde-guidance (0.8.0svn20080103-0ubuntu2~ppa3) hardy; urgency=low

  * Add kubuntu_10_displayconfig_tryagain.patch so that if displayconfig
    thinks a proprietary driver is installed, but it can't find it, it
    will try to find a non-proprietary driver instead of crashing (LP: #198269)
  * Add kubuntu_11_wineconfg_amd64.patch so that wineconfig looks in the right
    dir for wine on AMD64 (LP: #151982) - Patch should be removed for the next
    svn snapshot or release as a fix has been committed upstream already
  * Add kubuntu_12_powermanager_survive_no_brightness.patch so that if the old
    brightness cannot be gotten from DBUS, powermanager won't crash
    (LP: #183656) and (LP: #198071)
  * Add kubuntu13_displayconfig_add_new_monitors.patch to support additional
    ViewSonic VA702 variants (LP: #192899)

 -- Scott Kitterman <email address hidden> Tue, 04 Mar 2008 11:14:41 -0500

Changed in kde-guidance:
status: In Progress → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote :

Fix is not actually released yet. Please test the updated kde-guidance-powermanager in my PPA:

https://launchpad.net/~kitterman/+archive

If I get confirmation the fix works, I'll include it in the next upload.

Changed in kde-guidance:
assignee: nobody → kitterman
status: Fix Released → In Progress
Revision history for this message
Christian Schürer-Waldheim (quincunx) wrote :

I can confirm that this bug (Cancel button doesn't work) is solved by 0.8.0svn20080103-0ubuntu2~ppa3.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kde-guidance - 0.8.0svn20080103-0ubuntu3

---------------
kde-guidance (0.8.0svn20080103-0ubuntu3) hardy; urgency=low

  * Add Add kubuntu_09_mountconfig_no_extensions.patch to remove uneeded call
    to pykdeextensions in mountconfig so that pyqt3 no longer needs to be
    patched to provide -dev files in the regular package (LP: #197867)
  * Add kubuntu_10_displayconfig_tryagain.patch so that if displayconfig
    thinks a proprietary driver is installed, but it can't find it, it
    will try to find a non-proprietary driver instead of crashing (LP: #198269)
  * Add kubuntu_11_wineconfg_amd64.patch so that wineconfig looks in the right
    dir for wine on AMD64 (LP: #151982) - Patch should be removed for the next
    svn snapshot or release as a fix has been committed upstream already
  * Add kubuntu_12_powermanager_survive_no_brightness.patch so that if the old
    brightness cannot be gotten from DBUS, powermanager won't crash
    (LP: #183656) and (LP: #198071)
  * Add kununtu_13_displayconfig_add_new_monitors.patch to update MonitorsDB
    with a upstream snapshot of MonitorsDB from hwdata (LP: #192899)

 -- Scott Kitterman <email address hidden> Sun, 09 Mar 2008 19:53:42 -0400

Changed in kde-guidance:
status: In Progress → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote :

Reopening. Missed a spot:

Warning: in getBrightness(): org.freedesktop.Hal.Device.PermissionDeniedByPolicy: org.freedesktop.hal.power-management.lcd-panel no <-- (action, result)
 Traceback (most recent call last):
   File "/usr/share/python-support/kde-guidance-powermanager/guidance-power-manager.py", line 876, in changePoweredBrightness
     self.powermanager.adjustBrightness(level)
   File "/usr/share/python-support/kde-guidance-powermanager/powermanage.py", line 303, in adjustBrightness
     if level == self.getBrightness():
   File "/usr/share/python-support/kde-guidance-powermanager/powermanage.py", line 291, in getBrightness
     if self.old_b:
 AttributeError: PowerManage instance has no attribute 'old_b'
 Error in sys.excepthook:
 Traceback (most recent call last):
   File "/usr/lib/python2.5/site-packages/apport_python_hook.py", line 42, in apport_excepthook
     binary = os.path.realpath(os.path.join(os.getcwdu(), sys.argv[0]))
 IndexError: list index out of range
Original exception was:
 Traceback (most recent call last):
   File "/usr/share/python-support/kde-guidance-powermanager/guidance-power-manager.py", line 876, in changePoweredBrightness
     self.powermanager.adjustBrightness(level)
   File "/usr/share/python-support/kde-guidance-powermanager/powermanage.py", line 303, in adjustBrightness
     if level == self.getBrightness():
   File "/usr/share/python-support/kde-guidance-powermanager/powermanage.py", line 291, in getBrightness
     if self.old_b:
 AttributeError: PowerManage instance has no attribute 'old_b

Changed in kde-guidance:
status: Fix Released → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kde-guidance - 0.8.0svn20080103-0ubuntu8

---------------
kde-guidance (0.8.0svn20080103-0ubuntu8) hardy; urgency=low

  [ Andreas Wenning ]
  * Added kubuntu_18_kde-powermanager_unique-check.patch:
    - Fixed guidance-power-managers check for being a unique app.
  * Added kubuntu_19_kde-powermanager_gpmhelper.patch
    (LP: #151444, #111143, #128666):
    - Added gpmhelper.py to listen for HAL button-events and issue
      dcop calls to guidance-power-manager.
    - guidance-power-manager will now start gpmhelper.py.
    - Patched setup.py to build/install gpmhelper.py
  * Changed debian/rules and debian/kde-guidance-powermanager.install
    to install gpmhelper.py
  * Added depends for kde-guidance-powermanager to python-gobject as
    this is the only mainloop to work with DBusGMainLoop.

  [ Scott Kitterman ]
  * Update kubuntu_12_powermanager_survive_no_brightness.patch so it correctly
    catches the error (LP: #183656)
  * Add kubuntu_20_displayconfig_no_resolutions.patch so displayconfig doesn't
    crash if current display size or refresh rate can't be fetched and similar
    changes for displayconfig-restore(LP: #147721, #110853)
  * Add kubuntu_21_powermanager_new_names.patch to use new hal keys
    (LP: #204768)
    - Patch thanks to Mikael Gerdin

 -- Scott Kitterman <email address hidden> Tue, 25 Mar 2008 13:04:50 -0400

Changed in kde-guidance:
status: In Progress → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote :

This last version of guidance-powermanager made some significant changes in the way brightness works. This may be completely fixed now. Please retry and let us know.

Revision history for this message
Stefan Fleiter (stefan-fleiter) wrote :

This is fixed for karmic.

Changed in hal (Ubuntu):
status: Confirmed → Fix Released
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.