Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 15449 - xfree86 error on startup (ScreenInit failure) with Creator3D,series 1 (FFB)
Summary: xfree86 error on startup (ScreenInit failure) with Creator3D,series 1 (FFB)
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Sparc Linux
: High major (vote)
Assignee: Sparc Porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-10 14:58 UTC by Ferris McCormick (RETIRED)
Modified: 2006-02-04 06:05 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix improper test for failure in ScreenInit (sunffb) and trace Screen setup (ffb-trace.patch,3.04 KB, patch)
2003-02-10 15:01 UTC, Ferris McCormick (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ferris McCormick (RETIRED) gentoo-dev 2003-02-10 14:58:10 UTC
The XFree86 driver for the sun Creator/Elite graphics cards, sunffb_drv.o, at
about line 675 in ffb_driver.c has
    if (!FFBDbePreInit(pScreen))
	return FALSE;
However, FFBDbePreInit does not return a useful value (it returns the "return
value" of a void function), so you can get random failures.  Simplest workaround
is to chnage this to just a call
       FFBDbePreInit(pScreen);
since there is no useful return value here to test.


Reproducible: Didn't try
Steps to Reproduce:
1.Install "proper" graphics card
2.xinit
3.

Actual Results:  
Depending on the graphics card or other unknown conditions, either X starts or
you get
Fatal server error:
AddScreen/ScreenInit failed for driver 0

Expected Results:  
Start X.

The bug is fixed, I believe, for anyone who runs in to it.  I am posting this
as an error report for reference and for tracking.  I'll attach the patch which
fixed it for Weeve,
Comment 1 Ferris McCormick (RETIRED) gentoo-dev 2003-02-10 15:01:53 UTC
Created attachment 8131 [details, diff]
Fix improper test for failure in ScreenInit (sunffb) and trace Screen setup

This seems to have fixed the problem Weeve was seeing, and it provides a little

diagnostic information at the start of ScreenInit to help with other failures
of
this sort (if they are not the same failure.)
Comment 2 Ferris McCormick (RETIRED) gentoo-dev 2003-02-12 07:40:19 UTC
To respond to myself:  Per note from Mike Harris (redhat/xfree86), this should
be getting an official fix from xfree at some point.
------------------------------------------------------
I noticed in the CHANGELOG that your fix is committed to CVS now:

 866. The sunffb driver was treating a function with a void return value
      as if it had a Bool return value.  This causes the driver to fail
      in some cases (#A.1588, Ferris McCormick).
-------------------------------------------------------
Comment 3 Stefan Brenner 2003-02-14 08:25:54 UTC
I am using a Ultra60 with a Creator3D card. After configuring X, the X Server did 
not start. The error message was the following: 
 
==========  
 Fatal server error:  
 AddScreen/ScreenInit failed for driver 0  
 ===========  
  
After applying the patch, X came up fine. 
 
Stefan Brenner 
Comment 4 Jack Morgan (RETIRED) gentoo-dev 2003-05-17 23:29:33 UTC
closing bug
Comment 5 Jack Morgan (RETIRED) gentoo-dev 2003-05-17 23:49:21 UTC
sorry, my mistake ;(
Comment 6 Ferris McCormick (RETIRED) gentoo-dev 2003-05-18 10:09:51 UTC
This is fixed in xfree-4.3.0-r2 by changing FFBDbePreInit in ffb_dbe.c to
read thus:
-------------------------
extern void DbeRegisterFunction(ScreenPtr pScreen, Bool (*funct)(ScreenPtr, DbeScreenPrivPtr));

Bool
FFBDbePreInit(ScreenPtr pScreen)
{
        DbeRegisterFunction(pScreen, FFBDbeInit);
        return TRUE;
}
----------------------------

I do not know if this is gentoo-only, or a general fix from the Xfree developers.  I believe the latter, since they indicated that they had applied
this fix.

In any event, I think the proper resolution is Closed/fixed with release
xfree-4.3.0-r2 (or whenever the fix first appeared).
Comment 7 Jack Morgan (RETIRED) gentoo-dev 2003-05-18 10:48:13 UTC
as per Ferris McCormick's comment, i'm closing this bug
Comment 8 Jason Wever (RETIRED) gentoo-dev 2003-08-17 07:33:18 UTC
Closing