0eccf3
diff -up xdriinfo-1.0.4/xdriinfo.c~ xdriinfo-1.0.4/xdriinfo.c
0eccf3
--- xdriinfo-1.0.4/xdriinfo.c~	2009-10-16 23:39:10.000000000 +0200
0eccf3
+++ xdriinfo-1.0.4/xdriinfo.c	2017-03-13 12:01:53.419636100 +0100
0eccf3
@@ -101,23 +101,9 @@ int main (int argc, char *argv[]) {
0eccf3
 	    return 1;
0eccf3
 	}
0eccf3
     }
0eccf3
-  /* if the argument to the options command is a driver name, we can handle
0eccf3
-   * it without opening an X connection */
0eccf3
-    if (func == OPTIONS && screenNum == -1) {
0eccf3
-	const char *options = (*GetDriverConfig) (funcArg);
0eccf3
-	if (!options) {
0eccf3
-	    fprintf (stderr,
0eccf3
-		     "Driver \"%s\" is not installed or does not support configuration.\n",
0eccf3
-		     funcArg);
0eccf3
-	    return 1;
0eccf3
-	}
0eccf3
-	printf ("%s", options);
0eccf3
-	if (isatty (STDOUT_FILENO))
0eccf3
-	    printf ("\n");
0eccf3
-	return 0;
0eccf3
-    } 
0eccf3
+
0eccf3
   /* driver command needs a valid screen number */
0eccf3
-    else if (func == DRIVER && screenNum == -1) {
0eccf3
+    if (func == DRIVER && screenNum == -1) {
0eccf3
 	fprintf (stderr, "Invalid screen number \"%s\".\n", funcArg);
0eccf3
 	return 1;
0eccf3
     }
0eccf3
@@ -135,6 +121,9 @@ int main (int argc, char *argv[]) {
0eccf3
 	return 1;
0eccf3
     }
0eccf3
 
0eccf3
+   /* Call glXGetClientString to load vendor libs on glvnd enabled systems */
0eccf3
+    glXGetClientString (dpy, GLX_EXTENSIONS);
0eccf3
+
0eccf3
     switch (func) {
0eccf3
       case NSCREENS:
0eccf3
 	printf ("%d", nScreens);
0eccf3
@@ -154,7 +143,13 @@ int main (int argc, char *argv[]) {
0eccf3
 	  break;
0eccf3
       }
0eccf3
       case OPTIONS: {
0eccf3
-	  const char *name = (*GetScreenDriver) (dpy, screenNum), *options;
0eccf3
+	  const char *name, *options;
0eccf3
+	  
0eccf3
+	  if (screenNum == -1) {
0eccf3
+	      name = funcArg;
0eccf3
+	  } else {
0eccf3
+	      name = (*GetScreenDriver) (dpy, screenNum);
0eccf3
+	  }
0eccf3
 	  if (!name) {
0eccf3
 	      fprintf (stderr, "Screen \"%d\" is not direct rendering capable.\n",
0eccf3
 		       screenNum);