[gnome-control-center/gnome-3-22] info: Print debug when get_renderer_from_helper() fails



commit 651d0fef0d040000af467af72bea191324d8d87a
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Nov 16 17:50:59 2016 +0100

    info: Print debug when get_renderer_from_helper() fails

 panels/info/cc-info-panel.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/panels/info/cc-info-panel.c b/panels/info/cc-info-panel.c
index 8ac1668..4584766 100644
--- a/panels/info/cc-info-panel.c
+++ b/panels/info/cc-info-panel.c
@@ -268,6 +268,7 @@ get_renderer_from_helper (gboolean discrete_gpu)
   char **envp = NULL;
   char *renderer = NULL;
   char *ret = NULL;
+  GError *error = NULL;
 
   if (discrete_gpu)
     {
@@ -275,8 +276,14 @@ get_renderer_from_helper (gboolean discrete_gpu)
       envp = g_environ_setenv (envp, "DRI_PRIME", "1", TRUE);
     }
 
-  if (!g_spawn_sync (NULL, (char **) argv, envp, 0, NULL, NULL, &renderer, NULL, &status, NULL))
-    goto out;
+  if (!g_spawn_sync (NULL, (char **) argv, envp, 0, NULL, NULL, &renderer, NULL, &status, &error))
+    {
+      g_debug ("Failed to get %s GPU: %s",
+               discrete_gpu ? "discrete" : "integrated",
+               error->message);
+      g_error_free (error);
+      goto out;
+    }
 
   if (!g_spawn_check_exit_status (status, NULL))
     goto out;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]