[mythtv-users] Occasional projector usage - X setup advice

Al Bates d2a at lineone.net
Wed Oct 3 17:36:01 UTC 2018


> On 2 Oct 2018, at 05:48, Mark Wedel <mwedel at sonic.net> wrote:
> 
> On 10/01/2018 07:43 AM, Al Bates wrote:
>>> On 29 Sep 2018, at 20:59, Mark Wedel <mwedel at sonic.net> wrote:
>>> 
>>> On 09/28/2018 05:16 AM, Al Bates wrote:
>>>> My ubuntu 16.04 myth setup runs 24/7 and normally displays on a TV connected to the DVI output of my system. But i’ve recently picked up an old projector which I’ve connected to the VGA output.
>>>> When they are both connected the projector is identified as Display1 @ 1280x1024, TV as  Display 2 @ 1360x768
>>>> NB The aspect ratio/fill settings of the myth video seem to get distorted because of the different ratio of the projector.
>>>> When I restart, myth ends up on the projector display. In order to have myth display normally on the TV, I have to disable the projector display via the ubuntu Settings/Display manager
>>>> I’d like to be able to just power up the projector as and when needed, and have the system move any interface or video playback onto that display, and have the ability to switch it back and forth via a script linked to a remote keypress or even a skin button?
>>>> I’m sure a lot of people have a similar setup so just wondering how you’ve handled it? Thanks for your help!
>>> 
>>> You don't mention what graphics card you are using.  I'm using Nvidia, and have this in my Device section for my TV set:
>>> 
>>> Section "Device"
>>> 	Identifier "GT440"
>>> 	Driver "nvidia"
>>> 	Option "ConnectedMonitor" "DFP-2"
>>> 	Option "CustomEDID" "DFP-2:/etc/X11/sharp.edid"
>>> 	#Option "ModeDebug" "true"
>>> 	BusID	"PCI:2:0:0"
>>> 	MatchSeat	"seat1"
>>> EndSection
>>> 
>>> In that way, it will run the Xserver on that display even if the TV is turned off.
>>> 
>>> I can't remember exactly how I got that edid data, but this article looks to be pretty complete:
>>> 
>>> https://kodi.wiki/view/Creating_and_using_edid.bin_via_xorg.conf
>>> 
>> Thanks Mark - yup nVidia here too. I’ll take a look and see if that points me in the right direction. To me (forgive my ignorance) this sounds like it will enable me to glue the Xserver to one display regardless of which is powered up, which is halfway to my solution. I would like one display to be my default (e.g. the TV) and have a secondary display which can be powered on occasionally, and have the Xserver switched onto it, reverting to the default TV display either via a command line, script, emote press or simply by powering off the display. I’ll get reading...
> 
> yes, it gets you halfway - you can make sure that the one you use the most is always the one brought up.
> 
> Switching gets a little more complicated.  I have a slightly simpler, and perhaps slightly more complex case - I have 2 different displays, with different resolutions & audio, but both hang off the same HDMI port.
> 
> So I have 2 different mythtv profiles switch up.  I have programmable remotes, and set up global actions within mythv that if it gets a certain remote keycode, it switches its config (as well as uses nvidia-settings to change the resolution).
> 
> I believe a similar logic could be used to either switch what X-server mythtv is running, or perhaps switch xorg config files.  Since it sounds like your config is otherwise the same, you may not need the profile switching (though that may help with your aspect ratio issue).
> 
> Its been a while since I played with nvidia-settings.  It may be possible to configure it so that it tries to output to both outputs regardless, and use nvidia-settings to control which is the 'main' monitor, which is hopefully where mythtv ends up.  It does seem that regardless, you are going to need to have some way to tell the system to switch things around - you might be able to do that just by detecting when the vga port gets a signal, but not quite sure how you would do that.
> 


OK - I’m making some progress thanks to Mark’s helpful pointers, and a bit of digging around. So far, I have found a nice command line which allows me to kick the entire screen from one display to the other.

output of xrandr:

Screen 0: minimum 8 x 8, current 2640 x 1024, maximum 8192 x 8192
DVI-I-0 disconnected (normal left inverted right x axis y axis)
VGA-0 connected 1280x1024+1360+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1280x1024     75.02*+  60.02  
   1400x1050     59.98  
   1280x960      75.00    60.00  
   1152x864      85.00  
   1024x768      85.00    75.03    70.07    60.00  
   800x600       85.06    75.00    72.19    60.32    56.25  
   640x480       85.01    75.00    72.81    59.94  
TV-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 connected primary 1360x768+0+0 (normal left inverted right x axis y axis) 1600mm x 900mm
   1360x768      60.02*+
   1920x1080     60.05    60.00    50.04  
   1280x720      60.00    60.00    59.94    50.00  
   1024x768      60.00  
   800x600       60.32  
   720x576       50.00    50.08  
   720x480       59.94    60.05  
   640x480       59.94    59.93

so to kill my DVI connected TV and move the screen to the VGA projector I run:

xrandr --output VGA-0 --auto --output DVI-I-1 —off

and to reverse it:

xrandr --output VGA-0 --off --output DVI-I-1 —auto

At the moment the mythtv interface only displays correctly if it’s launched after the switch above. If I can then combine it with a different mythtv profile for each, I should be able to have a single script to bounce my media from one to the other. I need to look into that part still…

NB i also launch Kodi for things like BBC iPlayer, but their interface becomes corrupt after switching from one display to the other. Assuming it’s a Kodi specific thing so will look into that elsewhere.

I’ll also need to make sure the box keeps the screen on the TV display after reboot. Haven’t tested that yet…
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20181003/88d0e727/attachment.html>


More information about the mythtv-users mailing list