Bug 19017 - fail to start Xorg with the latest xserver (server-1.6 branch)
Summary: fail to start Xorg with the latest xserver (server-1.6 branch)
Status: VERIFIED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: high blocker
Assignee: Keith Packard
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
: 19204 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-12-11 00:28 UTC by liuhaien
Modified: 2008-12-22 03:05 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
xorg.0.log (19.59 KB, text/x-log)
2008-12-11 00:28 UTC, liuhaien
no flags Details
xorg.0.log (19.59 KB, text/plain)
2008-12-11 00:30 UTC, liuhaien
no flags Details
xorg conf file (3.76 KB, text/plain)
2008-12-11 00:30 UTC, liuhaien
no flags Details

Description liuhaien 2008-12-11 00:28:55 UTC
Created attachment 21047 [details]
xorg.0.log

System Environment:
-------------------------
Libdrm:		(master)c99566fb810c9d8cae5e9cd39d1772b55e2f514c
Mesa_stable:		(intel-2008-q4)154a9e5317f890618932cea0129ef887e16baf84
Xserver_stable:	(server-1.6-branch)523aae1fa6d8002e55e85aee49f113b7eb9a6df3
Xf86_video_intel_stable:(xf86-video-intel-2.6-branch)6ca0d7e6ff05bff2bb88bfae64c2d79ac115bd38
Bug detailed description:
-------------------------
X can not start up with the latest xserver 1.6 branch,below is the position where errors happens at, and the backtrace from gdb:
**************************************************
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1210128704 (LWP 2821)]
0x080e4162 in xf86CrtcSetModeTransform (crtc=0x820fe90, mode=0xb7d79c20,
    rotation=1, transform=0x0, x=0, y=0) at xf86Crtc.c:300
300         if (pScreen) {

*******************
backtrace:
(gdb) bt
#0  0x080e4162 in xf86CrtcSetModeTransform (crtc=0x820fe90, mode=0xb7d79c20,
    rotation=1, transform=0x0, x=0, y=0) at xf86Crtc.c:300
#1  0x080e4aa6 in xf86CrtcSetMode (crtc=0x820fe90, mode=0xb7d79c20,
    rotation=1, x=0, y=0) at xf86Crtc.c:420
#2  0xb7d10e82 in i830GetLoadDetectPipe (output=0x8210298, mode=0xb7d79c20,
    dpms_mode=0xbfe45228) at i830_display.c:1790
#3  0xb7d0b31f in i830_crt_detect (output=0x8210298) at i830_crt.c:404
#4  0x080e1ad8 in xf86ProbeOutputModes (scrn=0x820d700, maxX=2048, maxY=2048)
    at xf86Crtc.c:1507
#5  0x080e2621 in xf86InitialConfiguration (scrn=0x820d700, canGrow=0)
    at xf86Crtc.c:2207
#6  0xb7d161da in I830AccelMethodInit (pScrn=0x820d700) at i830_driver.c:1605
#7  0xb7d17a6b in I830PreInit (pScrn=0x820d700, flags=<value optimized out>)
    at i830_driver.c:1876
#8  0x080a5af4 in InitOutput (pScreenInfo=0x81ddac0, argc=1, argv=0xbfe456a4)
    at xf86Init.c:1008
#9  0x0806c17b in main (argc=1, argv=0xbfe456a4, envp=0xbfe456ac) at main.c:309



Reproduce steps:
----------------
X&
Comment 1 liuhaien 2008-12-11 00:30:07 UTC
Created attachment 21048 [details]
xorg.0.log
Comment 2 liuhaien 2008-12-11 00:30:27 UTC
Created attachment 21049 [details]
xorg conf file
Comment 3 liuhaien 2008-12-11 00:49:31 UTC
we try to bisect and find below commit causes the issue:
commit 991f0be6e2bfe3cc3df55b2fc75fe3900d5e0b94
Author: Maarten Maathuis <madman2003@gmail.com>
Date:   Sat Nov 29 14:30:55 2008 +0100

    randr: Avoid needlessly creating a shadow framebuffer.

    - pScreen->width and height were zero, so it didn't "fit" the screen.
    (cherry picked from commit ffb484f7ef84099019b196ef97bfb2355eb6d52a)

    Signed-off-by: Keith Packard <keithp@keithp.com>
Comment 4 Fatih Aşıcı 2008-12-13 16:49:49 UTC
Same problem here. It works when 991f0be6e2bfe3cc3df55b2fc75fe3900d5e0b94 reverted.
Comment 5 Gordon Jin 2008-12-14 21:52:46 UTC
Keith/Zhenyu, any idea?
Comment 6 Timo Jyrinki 2008-12-15 11:08:28 UTC
And yet another confirmation, since xserver 1.6 was put to Ubuntu development version and I encountered the problem via that. Reverting the mentioned commit fixed the problem for me. Using 965 (GMA X3100) on a laptop.
(downstream bug report: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/308225)
Comment 7 Keith Packard 2008-12-15 11:49:22 UTC
Fixed on master and server-1.6-branch. please test.
Comment 8 Maarten Maathuis 2008-12-15 12:37:37 UTC
For the record, server-1.6 branch hasn't received a commit in 6 days.
Comment 9 Gordon Jin 2008-12-15 18:34:02 UTC
(In reply to comment #7)
> Fixed on master and server-1.6-branch. please test.

I guess you mean this commit, but it's not on server-1.6-branch:

http://cgit.freedesktop.org/xorg/xserver/commit/?id=fde2f961035609cfff8761ef1e0f23e6a9761be2

author	Keith Packard <keithp@keithp.com>	2008-12-15 19:39:24 (GMT)
committer	Keith Packard <keithp@keithp.com>	2008-12-15 19:45:43 (GMT)
commit	fde2f961035609cfff8761ef1e0f23e6a9761be2 (patch)
tree	767dafa52fa86df801ba831aad03a6113ab28bd6
parent	29a5b0596b396d3e4a8a014cacd3e3ef77467ab7 (diff)

Use scrn->virtualX/virtualY in xf86CrtcFitsScreen. Fix bug 19017. pScreen->width/height are not initialized when doing initial mode setting, which makes this function incorrectly fail. Using scrn->virtualX should work in all cases though. 
Bug 19017 reports a crash in xf86CrtcSetModeTransform when doing a modeset for output probing, long before the screen array is initialized; that was caused by a work-around to set pScreen->width/height so that xf86CrtcFitsScreen could find the right values. 
Signed-off-by: Keith Packard <keithp@keithp.com> 
Comment 10 Keith Packard 2008-12-15 18:56:08 UTC
sorry, forgot to push :-)
Comment 11 liuhaien 2008-12-15 21:50:57 UTC
(In reply to comment #10)
> sorry, forgot to push :-)
> 

keith,the issue has gone against server 1.6 branch ,but it still exists with master.
Comment 12 Keith Packard 2008-12-15 22:37:33 UTC
The initial patch was broken, master needs 063eb6743cd0d98dd52d1a9559b804381ee5144d and server-1.6-branch needs 09039fb89f3fd047f10b575e019bba6762448456

I tested GM45 and GM965 on both master and server-1.6-branch and with both patches applied, both work fine.
Comment 13 liuhaien 2008-12-15 22:57:29 UTC
verified against :
master 7aa29b9d66c3cd0f8af4fafbe92efd0c0556d225
server 1.6 branch 063eb6743cd0d98dd52d1a9559b804381ee5144d
Comment 14 Bernhard Rosenkraenzer 2008-12-22 03:05:16 UTC
*** Bug 19204 has been marked as a duplicate of this bug. ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.