среда, 2 октября 2013 г.

Чиним неработающий xfce4-power-manager

Чтобы не потерялось.

В какой-то момент перестал запускаться xfce4-power-manager:

xfce4-power-manager --no-daemon

(xfce4-power-manager:24940): xfce4-power-manager-WARNING **: could not map
keysym 1008ffa8 to keycode

The program 'xfce4-power-manager' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadName (named color or font does not exist)'.
  (Details: serial 273 error_code 15 request_code 150 minor_code 11)
  (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.)



Поиск показал что существует зарегистрированный баг 7999 в апстриме:

https://bugzilla.xfce.org/show_bug.cgi?id=7999

Там же предложено обходное решение и соответствующий патч:

https://bugzilla.xfce.org/attachment.cgi?id=3911&action=edit

Привожу патч полностью:

---
 common/xfpm-brightness.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/common/xfpm-brightness.c
+++ b/common/xfpm-brightness.c
@@ -65,10 +65,13 @@
 {
     XRRPropertyInfo *info;
     gboolean ret = TRUE;
+    gint rc;

+    gdk_error_trap_push ();
     info = XRRQueryOutputProperty (GDK_DISPLAY (), output, brightness->priv->backlight);
+    rc = gdk_error_trap_pop ();
    
-    if (info == NULL)
+    if (info == NULL || rc != Success)
     {
     g_warning ("could not get output property");
     return FALSE;

Комментариев нет:

Отправить комментарий