gnome-power-manager dies on startup with BadRequest error

Bug #372468 reported by [mdw]
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-power
Fix Released
Critical
gnome-power-manager (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: gnome-power-manager

This is gnome-power-manager 2.24.2-2ubuntu8 (jaunty).

[crybaby ~]gnome-power-manager --no-daemon --sync
The program 'gnome-power-manager' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadRequest (invalid request code or no such operation)'.
  (Details: serial 187 error_code 1 request_code 154 minor_code 25)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

A little playing with gdb shows that it's caused by a call to XRRGetScreenResourcesCurrent in gpm_brightness_xrandr_update_cache (src/gpm-brightness-xrandr.c), added by debian/patches/79-randr13-speed-fix.patch as part of #307306.

But the fix is wrong, as mentioned in further discussion on that bug: the call is guarded by #ifdef but that only helps if the code is compiled against an old client library (which can anyway be prevented by appropriate Build-Depends). The problem is that my X server doesn't provide Xrandr 1.3, because I'm holding it back (because of the Intel graphics driver bug warned of in the Jaunty release notes).

I've attached a fixed version of the patch which (a) stores the server's Xrandr version number, and (b) checks it before calling the offending function, falling back to XRRGetScreenResources.

ProblemType: Bug
ACAdapter: Present
Architecture: i386
Battery: Present
CPUScaling: Present
DistroRelease: Ubuntu 9.04
LaptopPanel: Present
Package: gnome-power-manager 2.24.2-2ubuntu8
ProcEnviron:
 LC_COLLATE=POSIX
 PATH=(custom, user)
 LANG=en_GB.utf8
 SHELL=/bin/bash
SourcePackage: gnome-power-manager
Uname: Linux 2.6.28-11-generic i686

Revision history for this message
[mdw] (mdw-distorted) wrote :
Revision history for this message
Scott Howard (showard314) wrote :

Thank you for your bug report. This bug (comments and patch) has been reported to the developers of the software. You can track it and make comments at: http://bugzilla.gnome.org/show_bug.cgi?id=568162

It would be best to continue discussions on the patch in GPM over int he gnome bugzilla.

Changed in gnome-power-manager (Ubuntu):
status: New → Triaged
Changed in gnome-power:
status: Unknown → Fix Released
Changed in gnome-power-manager (Ubuntu):
importance: Undecided → Medium
David Futcher (bobbo)
tags: added: patch-forwarded-upstream
Revision history for this message
Martin Mai (mrkanister-deactivatedaccount-deactivatedaccount) wrote :

This should be fixed in Ubuntu 10.10 now. Thanks for reporting.

Changed in gnome-power-manager (Ubuntu):
status: Triaged → Fix Released
Changed in gnome-power:
importance: Unknown → Critical
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.