[PATCH] Query the DDX in ProcRRGetScreenInfo.

Aaron Plattner aplattner at nvidia.com
Thu Feb 12 18:28:53 PST 2009


This is the RandR 1.1 version of GetScreenResources and needs to re-query the
DDX to see if the mode pool changed.

Fixes Launchpad bug #325115.
---
 randr/rrscreen.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index da633b2..36ef86e 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -615,7 +615,7 @@ ProcRRGetScreenInfo (ClientPtr client)
     rep.pad = 0;
     
     if (pScrPriv)
-	if (!RRGetInfo (pScreen, FALSE))
+	if (!RRGetInfo (pScreen, TRUE))
 	    return BadAlloc;
 
     output = RRFirstOutput (pScreen);
-- 
1.5.6.3

I finally got around to trying out this fix.  This will make "xrandr
--current --q12 --query" re-probe the output, but I assume we can live with
that.

-- Aaron

On Wed, Feb 04, 2009 at 02:47:36PM -0800, Aaron Plattner wrote:
> This commit causes a regression in dynamic display configuration with the
> NVIDIA driver, where trying to switch to a new configuration with
> nvidia-settings fails.  The problem is that nvidia-settings adds the new
> mode to the list, then queries the mode pool with RRGetScreenInfo.  This
> now fails to pick up the new mode and nvidia-settings can't find it,
> resulting in a failed mode switch.
> 
> https://bugs.launchpad.net/ubuntu/+source/nvidia-settings/+bug/325115
> http://www.nvnews.net/vbulletin/showthread.php?t=127359
> 
> I'm not sure exactly what the right fix is to avoid reintroducing bug
> #19037, but the DIX definitely needs to query the DDX to see if the mode
> pool changed.
> 
> -- Aaron
> 
> 
> commit 56f6fb8c8652c85e522e42557f8969987069076b
> Author: Eric Anholt <eric at anholt.net>
> Date:   Fri Jan 30 19:06:17 2009 -0800
> 
>     randr: Avoid re-querying the configuration on everything but GetScreenResources.
>     
>     The new path should only re-query on the other requests when we haven't
>     gathered the information from the DDX yet (such as with a non-RandR 1.2 DDX).
>     
>     Bug #19037.
>     (cherry picked from commit 317f2b4a9fe4b606975711bc332166a82db5087d)
> 
> :100644 100644 b5cebdc... 9c9b7c0... M  randr/randrstr.h
> :100644 100644 38314de... 12b9a4a... M  randr/rrinfo.c
> :100644 100644 95662c9... da633b2... M  randr/rrscreen.c
> :100644 100644 7f9a798... 36135c6... M  randr/rrxinerama.c


More information about the xorg-devel mailing list