Fixing TV screen size via nVidia HDMI for MythTV

A bit of a brain-dump to record what I just (re?) did having bought a new telly and finding that the HDMI output of my MythTV PVR was overscanning so I was losing a large margin of picture around the edges.

Some memory was triggered by this blog post and this documentation, so I think I must have done this before for my old TV!

The first step is to figure out your visible screen size;  I accidentally did this via MythTV itself via the screen-size wizard, so I suggest that’s the best way to do it.  Get MythTV displaying fully using that and a re-written unmodified xorg.conf file (nvidia-xconfig).  Word of warning:  at least with my 0.26 MythTV the wizard’s buggy, so you have to set the top-left first, exit/apply, and then set the size, otherwise it all goes a bit doolally!

Remember that size, or find it in the MythTV SQL under settings/GuiWidth and GuiHeight.  Mine was 1844×1034 (for a 1920×1080 display).

You need the left/top offsets that will make up the full screen size, so that’s half of each of the differences of the above values (to centre the output).  I have (1920-1844)÷2 = 38 and (1080-1034)÷2 = 23.  You also need to ID your display, which you can via the nvidia-settings application.  Mine’s DFP-1, and yours will be similar.

Now you can test from the command line.  I did it remotely, just in case, with DISPLAY=:0.0.  Feed your numbers into the following on the command line (see the above links for a bit more on what the options are):

nvidia-settings --assign CurrentMetaMode="DFP-1: 1920x1080+0+0 { ViewPortIn=1920x1080, ViewPortOut=1844x1034+38+23 }"

At least for me, hey presto the screen is all visible!  That mode definition now goes into the Screen section of /etc/X11/xorg.conf:

Section "Screen"
# other stuff
Option "metamodes" "1920x1080+0+0 { ViewPortIn=1920x1080, ViewPortOut=1844x1034+38+23 }"

You also need to reset the MythTV screen size to have no offset and full screen;  I shall do that directly into the settings database instead of fighting the wizard again!


About fnx

PSN: the_phoenix
This entry was posted in Software, Tech and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *