Bug 126820 - Dual Head configurations lost on reboot.
Summary: Dual Head configurations lost on reboot.
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11
Version: 2
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: X/OpenGL Maintenance List
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-06-27 22:13 UTC by Mark Derricutt
Modified: 2007-11-30 22:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-03-06 22:28:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Starting X with Dual Head Configured ( No Power to Second Monitor ) (35.15 KB, text/plain)
2004-07-06 04:38 UTC, Mark Derricutt
no flags Details
xorg.conf for dual-head, does not initialize monitor on startup (3.43 KB, text/plain)
2004-07-06 04:39 UTC, Mark Derricutt
no flags Details
Dual Monitor / Same Desktop Log ( monitor initialized ) (3.43 KB, text/plain)
2004-07-06 04:41 UTC, Mark Derricutt
no flags Details
Dual Monitor / Same Desktop Log ( monitor initialized ) config (3.43 KB, text/plain)
2004-07-06 04:42 UTC, Mark Derricutt
no flags Details
xorg log file after returning to original dualhead config ( monitor initialized ) (27.82 KB, text/plain)
2004-07-06 04:43 UTC, Mark Derricutt
no flags Details
/var/log/messages since boot up ( contains all xorg starts ) (64.90 KB, text/plain)
2004-07-06 04:45 UTC, Mark Derricutt
no flags Details
Dual Monitor / Same Desktop Log ( monitor initialized ) ( really, its a log this time ) (27.82 KB, text/plain)
2004-07-06 04:50 UTC, Mark Derricutt
no flags Details
xorg log after adding busid and screen information to config (34.80 KB, text/plain)
2004-07-06 05:08 UTC, Mark Derricutt
no flags Details

Description Mark Derricutt 2004-06-27 22:13:35 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7)
Gecko/20040627 Firefox/0.9.0+

Description of problem:
After setting up dual-head display from system-config-display, when
ever  you reboot Fedora resets the xorg configuration too that of a
single monitor.

This causes the second monitor too not be initialized.  The current
work around for this is to edit the xorg.conf file and restart xorg a
few times on every reboot.

Version-Release number of selected component (if applicable):
xorg-x11-6.7.0-2

How reproducible:
Always

Steps to Reproduce:
1. Enable dual head
2. Reboot

    

Actual Results:  2nd monitor is now powered up.

Expected Results:  2nd monitor powered up and utilized the same as it
was before rebooting.

Additional info:

A simple hack has been written up from one of the other developers in
our office:

Hi Mark,

What you need is two files /etc/X11/xorg.conf.init and
/etc/X11/xorg.conf.span.  The .init file will be copied on shutdown to
the /etc/X11/xorg.conf file.  When the computer boots it will go into
rhgb in single screen mode and initialize both screens.

The service attached will then "start" as part of the boot process and
copy the .span file to the xorg.conf file. When GDM starts it will use
the .span version and everything should work fine for dual monitors

To add the service run the following command:

# /sbin/chkconfig --add xorg.setup
# /sbin/chkconfig --level 35 xorg.setup on

Regards
Jean

--- cut here: xorg.setup ---
#!/bin/sh
#
# chkconfig: - 99 3
# description: Starts and stops the xorg.setup service which sets up
the xorg
#              files for initialization.
#


# Source function library.
if [ -f /etc/init.d/functions ] ; then
  . /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ] ; then
  . /etc/rc.d/init.d/functions
else
  exit 0
fi

RETVAL=0
start() {
        KIND="X.org"
	echo -n $"Change $KIND to dual monitor mode: "
	if [ -f /etc/X11/xorg.conf.span ]; then
	    cp /etc/X11/xorg.conf.span /etc/X11/xorg.conf
	fi
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/xorg.setup || \
	   RETVAL=1
	return $RETVAL
}	

stop() {
        KIND="X.org"
	echo -n $"Change $KIND to init monitor mode: "
	if [ -f /etc/X11/xorg.conf.init ]; then
	    cp /etc/X11/xorg.conf.init /etc/X11/xorg.conf
	fi
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/xorg.setup
	echo ""
	return $RETVAL
}	

restart() {
	stop
	start
}	

# Check that we can write to it... so non-root users stop here
[ -w /etc/X11/xorg.conf ] || exit 0



case "$1" in
  start)
  	start
	;;
  stop)
  	stop
	;;
  restart)
  	restart
	;;
  condrestart)
  	[ -f /var/lock/subsys/xorg.setup ] && restart || :
	;;
  *)
	echo $"Usage: $0 {start|stop|restart|condrestart}"
	exit 1
esac

exit $?
--- cut here ---

Comment 1 Mark Derricutt 2004-06-27 23:52:48 UTC
Actually, its not actually loosing the configuration ( as the
xorg.conf file is never changed ) but the 2nd monitor is just not
initialized on restart.

Comment 2 Mike A. Harris 2004-07-06 04:07:56 UTC
We need to know what video hardware you are using, and more details
about your system.  Also, please attach the following uncompressed
files individually as file attachments to the bug report:

- Set the machine to boot into runlevel 3
- Temporarily disable your above X configuration renaming script
  and rename the initial config file into place.
- Power the machine down normally
- Power the machine back up, and log into the text console
- Run "startx" and then once X is up and running, make a backup
  copy of the X server config file and log file individually and
  attach them to the bug report.
- Reproduce problem like normal, and attach log/config from failed
  session.

Also attach the 2 config files you're using with the above script.
Please be sure to not cut and paste the files into bugzilla, but
to attach each file individually and uncompressed using the link
below.

Once the information is attached, we can review it for changes
in initialization sequence, and analyze other information present.

Also include /var/log/messages from boot up onward.

Thanks for the report.

Comment 3 Mark Derricutt 2004-07-06 04:38:50 UTC
Created attachment 101645 [details]
Starting X with Dual Head Configured ( No Power to Second Monitor )

After rebooting into initlevel 3, the secondary monitor has no power, after
running startx with the associated xorg.conf.dualhead-nopower configuration,
power to the secondary monitor is not kicked in.

Comment 4 Mark Derricutt 2004-07-06 04:39:44 UTC
Created attachment 101646 [details]
xorg.conf for dual-head, does not initialize monitor on startup

This is the associated xorg.conf file for the xorg.log.dualhead-nopower log
file.

Comment 5 Mark Derricutt 2004-07-06 04:41:17 UTC
Created attachment 101647 [details]
Dual Monitor / Same Desktop Log ( monitor initialized )

This log shows that when the configuration is changed to not include the dual
head reference to screen1, that when xorg starts up, the secondary monitor is
initialized with power, and xorg displays a single desktop on both monitors.

Comment 6 Mark Derricutt 2004-07-06 04:42:02 UTC
Created attachment 101648 [details]
Dual Monitor / Same Desktop Log ( monitor initialized ) config

The configuration that generated 101647's log.

Comment 7 Mark Derricutt 2004-07-06 04:43:50 UTC
Created attachment 101649 [details]
xorg log file after returning to original dualhead config ( monitor initialized )

After returning to the configuration used in 101646 ( after secondary monitor
has been initialized ) xorg starts up and displays the dualhead desktop as
expected.

Comment 8 Mark Derricutt 2004-07-06 04:45:39 UTC
Created attachment 101650 [details]
/var/log/messages since boot up ( contains all xorg starts )

Comment 9 Mike A. Harris 2004-07-06 04:45:45 UTC
You attached 1 log file and 3 config files..  I think you may have
accidentally got your files mixed up perhaps.  ;o)

attachment 101647 [details] is a config file, while you refer to it as a log
file in comment #6.

Comment 10 Mark Derricutt 2004-07-06 04:50:38 UTC
Created attachment 101651 [details]
 Dual Monitor / Same Desktop Log ( monitor initialized ) ( really, its a log this time )

Ewps

Comment 11 Mark Derricutt 2004-07-06 04:52:08 UTC
The video card in question is a Matrox G550 with two Phillips 109P
monitors.  Stock drivers included with Fedora Core 2.

Comment 12 Mike A. Harris 2004-07-06 04:54:30 UTC
I just examined all of the config files, and the problem you're
having is that dualhead isn't configured properly in any of
the attached config files.

Were these config files generated for dualhead operation directly
with our tool, or were they hand edited from our tool's config
file?

The "Videocard0" section is missing a "Screen" identifier, as well
as the mandatory BusId identifier.  Both are needed for proper
dualhead operation.  I'm actually a bit surprised that it starts
up dualhead with any of the config files attached.  ;o)

If the options are missing, the X server does make an attempt
to guess, however it seems that it guesses differently depending
on an unknown variable.

Try my advice above, and dualhead should work.  I believe this
is probably a bug in the way our config tool generates xinerama
configurations for mga hardware, however I'm unsure if you edited
the config by hand afterward or not.

If it works with the proper config, I'll reassign this to
system-config-display for xinerama config to get fixed.

Thanks Mark.

Comment 13 Mike A. Harris 2004-07-06 04:56:12 UTC
Just to further clarify...  your config file section that reads:

Section "Device"
	Identifier  "Videocard0"
	Driver      "mga"
	VendorName  "Videocard vendor"
	BoardName   "Matrox Millennium G550"
EndSection


Should instead read:

Section "Device"
	Identifier  "Videocard0"
	Driver      "mga"
	VendorName  "Videocard Vendor"
	BoardName   "Matrox Millennium G550"
	BusID       "PCI:1:0:0"
	Screen      0
EndSection



Comment 14 Mark Derricutt 2004-07-06 04:59:29 UTC
The original configuration was generated with system-config-display to
enable the DualHead settings.  The only changes I've made manually is
to comment out the screen section to get the second monitor initialized.

I'll try that change you mention to the configuration and reboot and
see if it works.

Comment 15 Mark Derricutt 2004-07-06 05:08:50 UTC
Created attachment 101652 [details]
xorg log after adding busid and screen information to config

Unfortunately it seems that didn't fix the problem.

Comment 16 Mike A. Harris 2004-07-06 05:15:31 UTC
Hrm... you mention it didn't work, but the log file in comment #15
shows 2 displays starting up on one mga card, one on screen 0
and the other on screen 1.  The log file is that of a correctly
functioning X server startup for mga dualhead xinerama.  Are you
sure that is the right file?

It might be a good idea to reboot the machine also to reset the
mga hardware to power on state.  It's possible something in the
driver init code is messing up CRTC setup/restore, or perhaps
something wrong in EnterVT/LeaveVT which relies upon power on
defaults that get changed after the server runs once.  There
are other oddball scenarios possible also.


Comment 17 Mark Derricutt 2004-07-06 05:18:18 UTC
"It might be a good idea to reboot the machine also to reset the
mga hardware to power on state."

One thing here.  I -did- reboot the machine.  However, this resets the
mga hardware for screen 0 to power on, screen 1 to power off ( the
crux of the problem ).

Comment 18 Ralph Loader 2004-07-14 02:46:09 UTC
I have an identical 2 screen config on MGA 550 & have similar
problems.  I'm seeing the following behaviour:

Screen :0.0 starts on the second monitor, screen :0.1 starts on the
main monitor.

But the second video card output isn't switched on, so :0.0 doesn't
actually get to the monitor.

This means that when GDM starts, neither monitor has anything visible.

(A Gentoo install with XFree86-4.3.0 works correctly, BTW).

Comment 19 David M Burgess 2004-07-28 15:47:52 UTC
We also have this problem.

Fedora Core 2 up to date as of 2004-07-28

Matrox G550 on an ASUS K8V SE Deluxe motherboard (AMD64).

Note that the "RedHat Graphical Boot" (rhgb) must be enabled for the 
above script to work.

I'll try Fedora Core 3 Test 1 tomorrow and post the results.

Comment 20 David M Burgess 2004-08-03 12:28:46 UTC
I've tried Fedira Core 3 Test 1 and the problem is still there.

After performing a completely clean installation and using the system 
tools to configure in dual head display teh xorg.conf file is still 
missing the BusID   "PCI:1:0:0" and Screen O entries for screen 0.

Manually adding these entries makes no difference.

Comment 21 Mike A. Harris 2004-08-30 05:02:34 UTC
Please report this problem in X.Org bugzilla on freedesktop.org, under
the "xorg" component, and indicating the version of the xorg
snapshot from fedora core devel you are using.  X.Org X11 6.8.0
will be released very soon (within a few weeks) and only critical
fixes being investigated currently.  With more X.Org eyes on the
problem, this issue may have a chance to be investigated and
resolved in the 6.8.0 release.

If you paste your upstream bug URL here, we will track the issue
in the X.Org bugzilla.

    http://bugs.freedesktop.org "xorg" component

Thanks in advance.

Comment 22 Mike A. Harris 2005-03-06 22:28:25 UTC
If anyone is still experiencing this problem, and is still interested
in finding a solution, once you have filed a bug report at X.Org
bugzilla located at http://bugs.freedesktop.org, if you are
still interested in Red Hat tracking the issue and reviewing any
fixes that become available for future updates, paste the bug report
URL for your X.org bug report into this bug.

Comment 23 Mark Derricutt 2005-03-06 22:36:07 UTC
Of course we're still interested in this - ITS STILL BROKEN.

xorg on other distributions don't have this issue, only Fedora, and
the way it handles its initialisation.

Havn't tried anything from Rawhide so I don't know if its fixed, but
its still broken in FC3.  I'll repost all this in an xorg entry later
today in anycase.

Comment 24 ray 2005-10-07 13:44:59 UTC
FWIW, I don't think this is specific to Fedora.  This seems like the same problem I am having on Mandrake 
(now Mandriva) linux.  It occurred beginning with the switch-over from xfree86 (where everything worked 
fine) to x.org in 10.1 and persists in the Mandriva merged versions.  I am using a Matrox 550 with two 
monitors.  If I either try cinerama or try configuring the heads independently, I lose the second head (it 
doesn't power up) after the first reboot.  I keep hoping others will log it and get it fixed for me, but I am 
losing patience (laziness) and may get motivated to do it myself.  If I go in and play with the configuration, 
I can get them both powered on and working as a result of the reconfiguration process, but it is lost again 
after the next reboot.


Note You need to log in before you can comment on or make changes to this bug.