Go to file
Peter Hutterer faca1bc582 xfree86: belately init RandR12 if xinerama fails. (#24627)
On Fri, Dec 11, 2009 at 10:19:01AM -0800, Keith Packard wrote:
> On Wed, 9 Dec 2009 11:55:14 +1000, Peter Hutterer <peter.hutterer@who-t.net> wrote:
> > On Tue, Dec 08, 2009 at 05:24:06PM -0800, Aaron Plattner wrote:
> > > On Tue, Dec 08, 2009 at 03:52:27PM -0800, Peter Hutterer wrote:
> > > > Xorg +xinerama crashes immediately due to whacky dependency between Xinerama
> > > > and RandR12. The latter doesn't initialize if Xinerama is enabled, but if
> > > > only one screen is found, Xinerama is disabled again and RandR12 tries to
> > > > access data it never initialized.
>
> I'd sure like to have RandR get enabled when xinerama doesn't; is there
> an easy way of making that happen here? Perhaps having the RandR12 code
> disable Xinerama when only one screen is found? Or some other kludge?

you know the dependency better than I do so any hints are apreciated.
afaict, the screenInfo.numScreens (the check used by Xinerama) isn't
necessarily initialized at this point so we can't use the same check.
The following seems to work though:

From 670b3ebdb7312a6433a8f093d0820785db2aea20 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon, 14 Dec 2009 11:00:58 +1000
Subject: [PATCH] xfree86: if only one screen was found, disable Xinerama (#24627)

Xorg +xinerama crashes immediately due to whacky dependency between Xinerama
and RandR12. The latter doesn't initialize if Xinerama is enabled, but if
only one screen is found, Xinerama is disabled again and RandR12 tries to
access data it never initialized.

Dependency chain is:
- ProcessCommandLine sets noPanoramiXExtension to FALSE
- xf86RandR12Init() is a noop
- PanoramiXExtensionInit sets noPanoramiXExtension to TRUE
- xf86RandR12CreateScreenResources tries to use the devPrivates key it never
  initialized.

This hack checks if there's only one screen at the time RandR12 is
initialized. If so, we expect Xinerama to fail anyhow so we disable it
ourselves and proceed as planned.

X.Org Bug 24627 <http://bugs.freedesktop.org/show_bug.cgi?id=24627>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-16 21:50:00 -08:00
composite composite: Revert changes from adding support for BGRA picture formats. 2009-10-09 16:04:52 -07:00
config config: don't shutdown the libhal ctx if it failed to initialize (#23213) 2009-08-14 11:01:20 +10:00
damageext input: define server-supported protocol versions in one single file. 2009-09-21 21:47:35 +10:00
dbe dbe: Fix indentation 2009-07-17 14:57:50 -04:00
dix Merge remote branch 'jeremyhu/master' 2009-12-11 09:22:22 -08:00
doc Update man-pages for new default font paths 2009-11-25 13:34:36 -08:00
exa EXA/mixed: Don't consider devKind for detecting dimension change. 2009-12-10 09:11:14 -08:00
fb fb: Adjust transform or composite coordinates for pixman operations 2009-12-11 11:51:45 -08:00
glx glx: swrast can do GLX 1.4 too 2009-12-14 14:34:15 -08:00
hw xfree86: belately init RandR12 if xinerama fails. (#24627) 2009-12-16 21:50:00 -08:00
include Update COMPILEDDEFAULTFONTPATH to match the new default font path 2009-11-25 13:34:23 -08:00
m4 dolt: add Cygwin to supported platforms 2009-10-13 20:30:22 -07:00
mi Fix segfault when -extension XKEYBOARD is passed on the command line 2009-10-18 22:55:37 +09:00
miext Miscellaneous compilation warning fixes 2009-12-08 15:50:28 -08:00
os os: print log markers only if log level is >= 0 2009-12-16 21:49:27 -08:00
randr randr: Fill in errorValue when verifying outputs/crtcs/modes 2009-11-09 08:35:05 -08:00
record Miscellaneous compilation warning fixes 2009-12-08 15:50:28 -08:00
render Move SHA1 computation from render/glyph.c to os/ 2009-10-15 01:17:44 +02:00
test Xi: when deleting all properties, reset property handler to NULL. 2009-11-25 10:57:07 +10:00
Xext Xext: Fix a memory leak on GE client disconnect. 2009-11-25 10:55:22 +10:00
xfixes input: define server-supported protocol versions in one single file. 2009-09-21 21:47:35 +10:00
Xi Xi: reset device properties to NULL after deleting them. (#25374) 2009-12-11 11:37:37 +10:00
xkb xkb: don't assign garbage value to led_return. 2009-12-11 11:37:37 +10:00
.gitignore .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
autogen.sh autogen.sh: Pass --force to autoreconf 2008-07-22 16:55:26 +03:00
configure.ac configure.ac: error while checking for XDMXCONFIG_DEP 2009-12-03 08:44:02 +10:00
COPYING kdrive: Purge Xsdl 2009-10-20 13:32:47 +10:00
cpprules.in Use $(AM_V_GEN) to silence more commands when AM_SILENT_RULES is active 2009-10-06 19:40:20 -07:00
Makefile.am INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206 2009-11-11 21:44:24 -08:00
xorg-server.m4 Add xorg-server.m4 for driver dependency checking. 2005-11-01 15:01:51 +00:00
xorg-server.pc.in Since font modules are dead, don't mention them in xorg-server.pc 2009-07-09 17:21:07 -04:00