[PATCH 5/5] winex11: Detect broken NVIDIA RandR setups.
Henri Verbeet
hverbeet at codeweavers.com
Sat Nov 24 10:17:09 CST 2012
Note that if you have the misfortune of needing one of the affected drivers
for whatever reason, you'll still get a number of test failures (and
associated bugs) because even though we can set standard modes through RandR
1.0, querying the current mode will still return the panel's native mode.
---
dlls/winex11.drv/xrandr.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/dlls/winex11.drv/xrandr.c b/dlls/winex11.drv/xrandr.c
index 1093541..5b2dede 100644
--- a/dlls/winex11.drv/xrandr.c
+++ b/dlls/winex11.drv/xrandr.c
@@ -24,6 +24,7 @@
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(xrandr);
+WINE_DECLARE_DEBUG_CHANNEL(winediag);
#ifdef SONAME_LIBXRANDR
@@ -419,6 +420,21 @@ static int xrandr12_init_modes(void)
goto done;
}
+ /* Recent (304.64, possibly earlier) versions of the nvidia driver only
+ * report a DFP's native mode through RandR 1.2 / 1.3. Standard DMT modes
+ * are only listed through RandR 1.0 / 1.1. This is completely useless,
+ * but NVIDIA considers this a feature, so it's unlikely to change. The
+ * best we can do is to fall back to RandR 1.0 and encourage users to
+ * consider more cooperative driver vendors when we detect such a
+ * configuration. */
+ if (output_info->nmode == 1 && XQueryExtension( gdi_display, "NV-CONTROL", &i, &j, &ret ))
+ {
+ ERR_(winediag)("Broken NVIDIA RandR detected, falling back to RandR 1.0. "
+ "Please consider using the Nouveau driver instead.\n");
+ ret = -1;
+ goto done;
+ }
+
if (!(xrandr12_modes = HeapAlloc( GetProcessHeap(), 0, sizeof(*xrandr12_modes) * output_info->nmode )))
{
ERR("Failed to allocate xrandr mode info array.\n");
--
1.7.8.6
More information about the wine-patches
mailing list