[mythtv-users] Running TV out OR DVI out, not both

Friedrich Clausen fred at derf.nl
Sun Dec 7 22:45:53 UTC 2008


On Sun, Dec 7, 2008 at 9:02 AM, Allen Edwards <allen.p.edwards at gmail.com> wrote:
> On Sat, Dec 6, 2008 at 11:49 PM, Bill Williamson <bill at bbqninja.com> wrote:
>> On Sun, Dec 7, 2008 at 6:36 PM, Bill Williamson <bill at bbqninja.com> wrote:
>>> On Sun, Dec 7, 2008 at 4:56 PM, Allen Edwards <allen.p.edwards at gmail.com> wrote:
>>>>
>>>> On Sat, Dec 6, 2008 at 8:26 PM, Bill Williamson <bill at bbqninja.com> wrote:
>>>> > This is a bit more of a basic Linux question, so please forgive, but has
>>>> > specifics that are valid here.  For reference, I am running ubuntu 8.10 and
>>>> > myth .21 from mythbuntu packages.
>>>> >
>>>> > Basically what I want is a dual headed machine where only 1 head is active
>>>> > at a time.  I got a nice new geforce 8400 for future use with VDAPU, and it
>>>> > has tv out (going to a smaller PAL tv via component) and dvi out (going to a
>>>> > 720p projector via hdmi converter).  I want to be able to run via TV, OR run
>>>> > via projector.  I do not care (nor want) dual outputs.
>>>> >
>>>> > In the olden days (slackware 1998-ish), before gdm and the like, I'd just
>>>> > run "startx" from my first two terminals, and use ctrl-alt-f7 and
>>>> > ctrl-alt-f8 for the two x sessions.  I don't want to do something that
>>>> > manual, but is there perhaps an easy way to tell GDM to spawn twice, with a
>>>> > different xorg config?  Or is there a way to force the nvidia
>>>> >
>>>> > I don't mind having to do a key combination (and run blind for 10 seconds if
>>>> > it starts in the wrong one), but don't want to be dropping to console/etc
>>>> > every login.  I don't mind if technically it's running two x-servers as long
>>>> > as mythtv works, and with the correct settings for each (I guess I'd set up
>>>> > two different settings names in two different shortcuts?)
>>>> >
>>>> > My "ideal" setup would be similar how laptops work in windows.  You hit some
>>>> > key combinations to activate TV-Out, then another combo to disable it.
>>>> >
>>>> > _______________________________________________
>>>> > mythtv-users mailing list
>>>> > mythtv-users at mythtv.org
>>>> > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>>>> >
>>>> >
>>>>
>>>> You have the same setup I have.  Normally I watch myth with S-video
>>>> out playing to a CRT TV.  When we want to use the projector, we use
>>>> DVI output to a HDMI projector.  I have tried several arrangements but
>>>> what I do it to have the projector switched away from the myth box (by
>>>> selecting DVD on my DVI switching preamp) and start X so that it
>>>> starts up on the TV.  I then do a CTRL-ALT-BS and myth shows up on the
>>>> TV.  Turn the projector on and switch to it, CTRL-ALT-BS and in a few
>>>> seconds myth is on the projector.  The Xorg.conf setup is key to
>>>> making the setup work.  The outputs are assigned single resolutions,
>>>> not auto.  I have two displays defined in xorg.  Basically if myth
>>>> sees the projector, it starts up there, if not it starts up on the TV.
>>>>
>>>> There are other ways of doing this.  You can start myth on either
>>>> display if both display/desktops are there but be sure to close myth
>>>> down if you leave a display.  You can switch desktops with the mouse
>>>> but the problem is that the remote will operate both instances of myth
>>>> if you happen to have one on each desktop/display.  With two instances
>>>> running, they will get out of sync and you have no idea what the one
>>>> you are not watching is doing.  Since you cannot see a screen that is
>>>> turned off, this can be a problem which led to my solution being
>>>> easier even though it seems crude.
>>>>
>>>> If I didn't have a preamp that switched the DVI for me, I would
>>>> probably just unplug the hdmi cable into the projector so that myth
>>>> would not see it when X starts up.
>>>>
>>>> Hope this helps,
>>>>
>>>> Allen
>>>
>>> Can you post your xorg (or mail it to me privately?) That REALLY may
>>> work for me, as I can boot with the projector off most of the time,
>>> and with it on (and restart X) when I want.
>>>
>>
>>
>> Actually, current research may help both of us.  If you don't mind the
>> ctrl-alt-f7 business, in /etc/gdm/gdm.conf there is a [servers]
>> section... you can make it run more than one, and (hopefully?) specify
>> the config file X will use!
>>
>
> I can make it run more than one desktop with this setup.  The problem
> is that the remote works both instances of myth if I forget and leave
> one on while I am watching the other.
>
> There us a command I issue from one of the init files that deals with
> overscan on the TV.  Let me know if you need that as well.  If you
> don't know what I mean, you don't need it.  It is for the case where
> the TV picture won't fill the screen.
>
> Allen
>
<snip config>

My approach to all this was to have only one X server active at one
time for each type of output. I achieved this by having two
configuration files -

* /etc/X11/xorg.conf.working_projectoronly
* /etc/X11/xorg.conf.working_tv800x600
* /etc/X11/xorg.conf - Symlink to active configuration depending on
which display is in use.

and then a script called from Lirc using "irexec". In my case, I need
to "double-click" the LOGO button on my remote the trigger a display
change. The lirc snippet is:

# Switch output
begin
 prog = irexec
 button = SYSTEM-LOGO
 repeat = 0
 config = /home/mythtv/bin/switch_projector_with_remote.sh
end

I have put that script at:

http://www.derf.nl/drop/code/switch_projector_with_remote.sh

but it is just a quick hack of a script - some notes if anyone wants to try it

* Edit the variables at the top
* Edit the If statement in the current_source() function
* It assumes that you are running KDM. If you are running some other
session manager then you will have to edit lines 37 and 41.

It works for me but it can also get out of state sometimes because my
NVIDIA 6200 will *always* choose the DVI even if it is told by the X
config to use S-Video. This means I have to switch off the projector
when I want to change back to TV.

Good luck!

Fred


More information about the mythtv-users mailing list