Comment 45 for bug 151311

Revision history for this message
In , Sndirsch-suse (sndirsch-suse) wrote :

Looks like you're not using a monitor section at all or do not specify it properly with

  Option "Monitor-outputname" "monitorsection"

Still it's a bug in the patch of comment #14, since you get a Nullpointer
reference when not using a monitor section. This should not happen. I stumbled
across this today as well ...

Better version of this patch:

diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 38435c9..135356d 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -426,8 +426,18 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen)
            xf86OutputPtr output = config->output[config->compat_output];
            xf86CrtcPtr crtc = output->crtc;

- if (crtc && crtc->mode.HDisplay &&
- output->mm_width && output->mm_height)
+ if (output->conf_monitor &&
+ (output->conf_monitor->mon_width > 0 ||
+ output->conf_monitor->mon_height > 0))
+ {
+ /*
+ * Prefer user configured DisplaySize
+ */
+ mmWidth = output->conf_monitor->mon_width;
+ mmHeight = output->conf_monitor->mon_height;
+ }
+ else if (crtc && crtc->mode.HDisplay &&
+ output->mm_width && output->mm_height)
            {
                /*
                 * If the output has a mode and a declared size, use that