Find a file
Peter Hutterer 0f71be87b9 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>
(cherry picked from commit faca1bc582)
2009-12-26 09:30:35 +10:00
composite Update Sun license notices to current X.Org standard form 2009-12-18 17:12:00 -08: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 dtrace: Add Xserver-dtrace.h to CLEANFILES 2009-12-24 07:54:41 -08:00
doc Xephyr & Xserver man page fixes 2009-07-07 17:36:24 -07:00
exa EXA: Don't defragment offscreen memory at allocation time. 2009-12-01 16:45:52 +01:00
fb fb: backport fb changes from master for src window operations. 2009-12-23 14:29:26 +10:00
glx Suppress certain GCC warnings in auto-generated code. 2009-11-03 13:25:51 +10:00
hw xfree86: belately init RandR12 if xinerama fails. (#24627) 2009-12-26 09:30:35 +10:00
include Convert checks for PC98 support from platform #ifdefs to configure flag 2009-12-23 16:05:42 -08:00
m4 dolt: add Cygwin to supported platforms 2009-10-19 11:18:58 +10:00
mi Update Sun license notices to current X.Org standard form 2009-12-18 17:12:00 -08:00
miext Rootless: src drawable window can now be NULL 2009-10-13 12:56:04 -07:00
os Update Sun license notices to current X.Org standard form 2009-12-18 17:12:00 -08:00
randr randr: Fill in errorValue when verifying outputs/crtcs/modes 2009-11-19 16:33:26 +10:00
record input: define server-supported protocol versions in one single file. 2009-09-21 21:47:35 +10:00
render render: Fix clip region translation in miClipPictureSrc(). 2009-10-06 18:58:48 +10:00
test test/xi2: fix maximum max_keycode (bug#25492) 2009-12-24 17:55:11 +01:00
Xext Xext: Fix a memory leak on GE client disconnect. 2009-11-25 15:26:30 +10:00
xfixes Update Sun license notices to current X.Org standard form 2009-12-18 17:12:00 -08:00
Xi Xi: reset device properties to NULL after deleting them. (#25374) 2009-12-14 13:36:58 +10:00
xkb Fix possible NULL dereference in XkbFlushLedEvents() 2009-12-14 13:36:53 +10:00
.gitignore Add (ok, fix) support for DTrace under OS X 2009-09-27 23:34:28 -07:00
autogen.sh autogen.sh: Pass --force to autoreconf 2008-07-22 16:55:26 +03:00
configure.ac Change default xkb model from pc104 to pc105 2009-12-23 16:05:54 -08:00
COPYING Update Sun license notices to current X.Org standard form 2009-12-18 17:12:00 -08:00
cpprules.in Update xorg.conf man page & sample for changes in Xorg 1.7 2009-09-14 16:03:18 +10:00
Makefile.am Fix 'distcheck' to use host xkb files but install to build dir 2009-10-22 07:53:35 +10:00
shave-libtool.in shave: use CC tag variable on libtool 2009-09-13 16:43:42 +10:00
shave.in shave: hack around the configure ld check for make distcheck. 2009-09-04 16:41:47 +10: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