Dual Head

Hi all

SYSTEM: Fedora Core 3 Heidelberg
DISPLAY CARD: ATI RADEON S300 w 128Mb, VGA, DVI, TVOUT

I can run X in Dual Head mode but only when I do it like this:

>Boot with configuration file (xorg.conf) in single head mode
>login
>change to dual head with system-config-display
>logout
>login


If I happen to forget to put the xorg.conf file back in single head mode before rebooting or if the system hangs and I have to restart manually (power), it WILL not start and I have to use knoppix or the fedora rescue mode to mount the filesystem and replace the xorg.conf file.


This is very annoying and I would like either

>A solution

or

>A hack that can put the xorg.conf in single head mode BEFORE X is started on boot



With kind regards




Ramses (x_terminat_or_3)  *°oO°Make Love Not War°Oo°*
LVL 2
x_terminat_or_3Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jeilerCommented:
Don't know of a solution but here is a hack that might help...

Create a singlehead_xorg.conf
Create a script in /etc/init.d which copies singlehead_xorg.conf to xorg.conf (cp -f  /etc/X11/singlehead_xorg.conf  /etc/X11/xorg.conf)
Add links to run this script before starting X (ln -s /etc/init.d/copyscript /etc/rc.d/rc5.d/S##copyscript)
You will need to replace ## with a number that makes sense but you are probably safe putting in at the same level as network.

0
x_terminat_or_3Author Commented:
jeiler


Ooops.... Fedora don't like that

Boot hangs when I do that, maybe because Fedora uses the X-Window system while booting.

For this to work, it should be executed before the booting goes to the graphical mode.

You should know that, as opposed to Red-Hat, Fedora goes to graphical mode during boot to display a progressbar of the global boot process.
0
wesly_chenCommented:
> If I happen to forget to put the xorg.conf file back in single head mode
> it WILL not start and I have to use knoppix or the fedora rescue mode to mount the filesystem and replace the
> xorg.conf file.
Ctrl+Alt+F1 (F2, F3, F4 .. F6) will give you text mode console.

> opposed to Red-Hat, Fedora goes to graphical mode during boot to display a progressbar of the global boot process.
In /etc/inittab, change
id:5:initdefault:  ====> id:3:initdefault:
And it will boot in to text mode.

>A hack that can put the xorg.conf in single head mode BEFORE X is started on boot
Say you have
/etc/X11/singlehead_xorg.conf  
/etc/X11/dualhead_xorg.conf
and a symbolic link (created later)
/etc/X11/xorg.conf  --> /etc/X11/singlehead_xorg.conf

In /etc/inittab, change
id:5:initdefault:  ====> id:3:initdefault:   <=== Boot in text mode first

Add the following into /etc/rc.d/rc.local
------
rm -f /etc/X11/xorg.conf; ln -s /etc/X11/singlehead_xorg.conf /etc/X11/xorg.conf
init 5   <=== continue to graphic mode
-----

Wesly
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

jeilerCommented:
I believe the graphical mode during bootup isn't X, it is framebuffer.

Just a thought:
Is it possible the system got updated and the mkinitrd failed to happen?

Anyways, here is an init script that I tested on Fedora Core 3 that you are welcome to try if you haven't found a better solution yet.
#!/bin/sh
#
# singlehead: puts xorg.conf back in single head mode
#
# chkconfig: 5 07 93
# description:  Moves graphics to single head
#
# Source function library.
. /etc/init.d/functions

SINGLE_CONFIG=/etc/X11/singlehead_xorg.conf
MAIN_CONFIG=/etc/X11/xorg.conf

start() {
    # Do not start if there is no config file.
    [ -f "$SINGLE_CONFIG" ] || return 1

    action "Resetting to Single Head Config:" cp -f $SINGLE_CONFIG $MAIN_CONFIG
}

stop() {
    # Nothing to do in in stop.
    return 0
}

case "$1" in
    start)
        start
        RETVAL=$?
        ;;
    stop)
        stop
        RETVAL=$?
        ;;
    *)
        echo $"Usage: $0 {start|stop}"
        exit 1
        ;;
esac

exit $RETVAL
0
x_terminat_or_3Author Commented:
< I believe the graphical mode during bootup isn't X, it is framebuffer. >

Maybe so, but it definitly uses the xorg config file because the 2nd monitor is blacked-out if the system is in dualhead mode, and a clone of monitor 1 if the system is in singlehead mode.  Which means that framebuffer or X, it uses xorg.conf


Anyway, I'm going to do a test in a few hours...
0
x_terminat_or_3Author Commented:
Guys,


I made a little mistake in rc.local

I put in

echo -n "Putting system in singlehead
rm .. blabla
echo  " done"

And it so happened that it was interpreted by echo

This means that:

The FIX to the problem I was having is:
==================================
In /etc/inittab, change
id:5:initdefault:  ====> id:3:initdefault:
Add the following into /etc/rc.d/rc.local
init 5   <=== continue to graphic mode
==================================



Thanks Wesley.  the system boots correctly now, regardless of single head or multihead in xorg.conf


>thank you also jeiler for your participation

0
x_terminat_or_3Author Commented:
I meant that the file was not deleted because the command 'rm -f xorg.conf: ls -s xorg.config.singlehead xorg.conf  was not executed by the system but interpreted by the ECHO command.  It means that my system booted correctly with dualhead mode activated.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.