Home > General > DVI to HDMI overscan (screen edge cutoff) on an HDTV

DVI to HDMI overscan (screen edge cutoff) on an HDTV

Update – 4/1/2010: Latest nVidia drivers have overscan correction built in

Well I learned something new recently. I have a friend that’s making the Ubuntu switch and he called me up with a bizarre problem. He’s using an nVidia card (although other cards have the same issue) with a DVI out port to a DVI->HDMI converter to an HDMI input on a 26″ HDTV that he uses as a monitor.

He called me up and described the problem and I confessed that I had never heard of this before. All 4 sides of his sides of his screen were getting cut off. He could only see part of his menu bars at the top and bottom and the left/right edges were cut off as well. After some Googling, I at least found the name for the problem: overscan.

And once I figured out the name, that’s when my Google searches became eye openers. There are a lot of people out there with overscan problems and there are very few solutions in Linux. The Windows nVidia drivers allow dynamic overscan correction inside of their driver toolbox. The X server nVidia drivers have no options (for DVI out… for TV out there apparently are).

The problem, as I understand it, is that the PC is sending a DVI PC style output, but the TV is reading a HDMI TV style input. As such, the TV thinks it’s receiving a TV signal and acts accordingly. If your TV has a DVI input, it should treat that as a PC input and give you 1:1 pixel mapping (which is what you’re looking for). If not, you’ll need to adjust for the overscan on the PC side. Some TVs even have an option to treat an HDMI signal as if it were PC. Check your TV’s manual.

Anyhow, there are a lot of people asking for help for this issue but is very hard to find any actual information.

Option 1 – Manually

I don’t know if this works, but it looks like good info. If you’re looking for a way to fix this (and you’re ready to spend quite a while doing it), you should read this:

Ubuntu Forums: Nvidia, Modelines, Overscan…8.10

Basically it’s trial and error to get the correct X server config’s Modeline. It’s mindboggling that no one (especially nVidia, which seems to care about Linux a little bit) has put out any definitive information on this topic.

Option 2 – A little less manually

I definitely don’t know if this works. I don’t know if anyone has even tried it. If this works/doesn’t work for you, post in the comments.

You can see if the Xfree modeline generator will give you something that works. I don’t really understand what all the modeline timings mean, but here’s a shot in the dark (You’re probably desparate at this point anyway… and I have no way of testing this so I don’t know if it even works at all). Also, I’ll give the same warning everyone gives on this… I take no responsibility at all of this damages your television. Try this at your own risk.

First things first, back up your xorg.conf file (/etc/X11/xorg.conf) somewhere safe (like your home directory).

I wrote a quick program that will help you determine your visible screen size:

Source: findcoords.c (source)
Binary: findcoords (compiled on Ubuntu 9.04)

If the binary doesn’t work for you or you’d prefer to compile from source, you’ll need the libx11 development packages installed (as well as the standard stuff like gcc and whatnot). On Ubuntu, running “sudo apt-get install build-essentials libx11-dev” should do the trick. To compile it run: gcc -lX11 -o findcoords findcoords.c

Now run it by typing ./findcoords

It’ll tell you to click the upper left and bottom right corners of the screen. Get as close as possible. You want the very point of the cursor as close to the edge as possible. That means in the bottom right, you should only be able to see about 1 pixel of your cursor. When you’ve done that it’ll calculate your viewable screen size. It will output something like this:

Root Window Size: 2880x900
Viewable Size: 2764x798
Your screen is cut off by the following number of pixels:
Left  : 31
Right : 85
Top   : 24
Bottom: 78

Armed with the actual visible screen size, head over to the XFree Modeline Calculator (it works for Xorg too).

1. Enter the values under “Monitor Configuration” if you know them. If not leave that section blank.
2. Under “Basic Configuration” enter the viewable size that got output from findcoords.
3. If you know the max refresh rate for your TV, you can enter it here. If not, just use 60Hz.
4. If you know the dot clock frequency enter it as well, otherwise, just leave it blank.
5. IMPORTANT: If you’re TV is interlaced at max resolution (i.e. 1080i), check the interlaced button.
6. Click the “Calculate Modeline” button and it should give you a modeline at the top of the screen.
7. In your xorg.conf file, put the modeline it gives you into the Monitor section
8. And this line to your Monitor section as well:

Option "ExactModeTimingsDVI" "TRUE"

9. Now, to use this, you’ll need to add this line to your Device section:

Option "UseEDID" "FALSE"

10. Then in the Display section, add a line that LOOKS like this, but define the mode specified in the modeline that the generator gave you:

Modes "1960x1080@60i"

In other words, if the modeline generator spit out:

Modeline "1816x980@60i" 65.89 1816 1848 2096 2128 980 1002 1008 1031 interlace

You would put the following in the Display section:

Modes "1816x980@60i"

That text has to match EXACTLY. When it’s all said and done, you should end up with an xorg.conf that looks something like this:

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "DELL S199WFP"
    HorizSync       30.0 - 83.0
    VertRefresh     56.0 - 75.0
    Option         "ExactModeTimingsDVI" "TRUE"
    Modeline "1816x980@60i" 65.89 1816 1848 2096 2128 980 1002 1008 1031 interlace

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 9800 GT"
    Option         "UseEDID" "FALSE"

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
        Modes       "1816x980@60i"

Give that a shot and see what you get. Can’t be much worse, can it? If it doesn’t work, just revert back to what you had by replacing your xorg.conf file from the backup. If you get any halfway decent results at all, let me know.

More terms to know:

1-to-1 pixel mapping: If your HDTV (as a monitor) supports this option, chances are this will solve your problem. This means that every pixel sent by the PC will be mapped to a pixel on the screen (i.e. disable overscan).

Full Pixel: This is the same as 1:1 pixel mapping

Modelines: Definitions of video modes that control the display size in the X server

Overscan: Part of standard TV input where a percentage of the edges of the screen are cut off. Not noticeable for normal TV viewing, but very noticeable on a PC desktop.

EDID: Monitor/TV device information telling the PC what modes are supported (stored in the monitor and not configurable)

Good luck.

General , , ,

  1. July 13th, 2009 at 05:04 | #1

    Thanks for this post. I had the same problem with my Zotac ION board. My TV (Philips 32″ 16:9 HD ready) cut of bottom, top and left/right off of the screen even in 640*480 mode.
    With custom mode-lines I got no signal on TV altough I used correct HSync, VRefresh etc. which had been reported by EDID.
    I assume that the EDID information of Philips TV is broken, but I can’t really verify it.

    But: Option “ExactModeTimingsDVI” “TRUE” did the trick for me and now I have a low, but working resolution which has no dead areas.

  2. sixman9
    July 17th, 2009 at 23:31 | #2

    Thanks for the findcoords code! I came across you site while looking to correct an ubuntu/xbuntu 9.04 on ps3. Between your code and this post (http://psubuntu.com/forums/viewtopic.php?f=4&t=225), I was able to resize my desktop using on a 1366×768 720p Acer at3201w. The resolution is now set to:

    video=ps3fb:mode:136 (fullscreen 720p 1280×720 50hz, try 131 for 60hz) see kboot.conf

    fbset -xres 1208 -yres 680 -vxres 1208 -vyres 680 (in new /etc/init.d/fbset.sh, linked to /etc/rc2.d/S26fbset for start up)

    Sorry about off loading here, this is just for Google/community sake.



  3. Gary Murphy
    October 18th, 2009 at 09:21 | #3

    Great post.

    My resolution ended up being at the TV. My Philips had a setting called “Unscaled” that did the 1:1 pixel mapping that you mentioned. For others reading this, I am not terribly happy with the Philips. It is a FullHD, 1080p 1920×1080 TV and the quality from the PC is still isn’t that great.

  4. Chris
    November 9th, 2009 at 10:26 | #4

    Thanks so much for your help. After reading this post, I knew to look for the 1:1 mode on my TV, which I found. It was MUCH easier than all the messing with xorg.conf I tried.

  5. Dutchman
    November 12th, 2009 at 11:00 | #5


    On my Toshiba XV365DB I can solve the problem by selecting ‘game mode’ in the setup menus of the TV itself. Maybe not an elegant solution, but it works for me (and is very easy). Hope this helps someone.

  6. Dude
    November 13th, 2009 at 00:40 | #6

    I just wasted two days playing with modelines and my Toshiba Regza TV via DVI-HDMI. I guess it doesnt matter what are the modelines settings if connected via HDMI. Finally, I found a setting in the TV menu to use “native” screen size (used to be “natural”) and it works perfect with ANY modelines.


  7. Alex Mcmanus
    January 17th, 2010 at 09:05 | #7

    Thanks for the info!

    My setup is an NVidia graphics card with HDMI output going to an Panasonic Viera 1080p TV – solved by turning off the Overscan option in the TV settings menu.

  8. Daniel
    March 4th, 2010 at 07:05 | #8

    I also had this problem, and your page was the very first to appear when doing a google search, thank you for the suggestion to look on the TV itself. I found that my Samsung 40″ Series 6 TV had a display mode of “Just scan” to fix the problem. Without it, all four sides of the picture were indeed cut off.

  9. doorknob60
    May 22nd, 2011 at 01:15 | #9

    Wow, thanks! With the open source ATI drivers and HDMI out, my Sony 32″ LCD was cutting things off (the proprietary Catalyst has overscan correction, but I wanted to try the free drivers), and this worked great. I used the findcoords program and used new modelines and set them with xrandr, and it seems to work just fine, cool. Now, if only sound will start outputting out of HDMI like it was earlier, don’t know why it stopped working….

  10. kristianhk
    July 1st, 2011 at 08:44 | #10

    Thanks. The modeline-trick didn’t work, but got me going to a working solution:
    1. Added

    Option “UseEDID” “False”
    Option “ExactModeTimingsDVI” “True”

    to the “Monitor” section.
    2. Restarted Xorg/gdm.
    3. Ran the nvidia-settings program as root.
    4. Saw that even more resolutions now was detected, strangely enough.
    5. Changed to my preferred resolution, and it worked without overscan!
    6. Saved the X configuration from nvidia-settings (check for merge with existing file, so you keep the two beforementioned lines).
    7. Enjoy.

    I can, ofcourse, not guarantee that this works for anyone else, but it’s worth a try.

  11. Batshua
    May 18th, 2012 at 20:06 | #11

    My current nvidia drivers don’t have overscan correction for some reason, so I thought I’d try your suggestions as part of the solution. Unfortunately, I got this:

    $ gcc -lX11 -o findcoords findcoords.c
    /tmp/ccGbCjsL.o: In function `main’:
    findcoords.c:(.text+0×66): undefined reference to `XOpenDisplay’
    findcoords.c:(.text+0×81): undefined reference to `XCreateFontCursor’
    findcoords.c:(.text+0xf8): undefined reference to `XGetGeometry’
    findcoords.c:(.text+0×131): undefined reference to `XAllowEvents’
    findcoords.c:(.text+0×195): undefined reference to `XGrabPointer’
    findcoords.c:(.text+0x1d4): undefined reference to `XPending’
    findcoords.c:(.text+0x1f1): undefined reference to `XNextEvent’
    findcoords.c:(.text+0×290): undefined reference to `XAllowEvents’
    findcoords.c:(.text+0x2e5): undefined reference to `XPending’
    findcoords.c:(.text+0×302): undefined reference to `XNextEvent’
    findcoords.c:(.text+0x3a1): undefined reference to `XAllowEvents’
    collect2: ld returned 1 exit status

    So, I guess that’s not going to work for now. :-/

  12. Jon
    May 3rd, 2013 at 06:12 | #12

    >$ gcc -lX11 -o findcoords findcoords.c

    I had this issue with Ubuntu, try to move the library option like this:

    $ gcc -o findcoords findcoords.c -lX11


    p.s. Nearly a year late I know! ;)

  13. anonymous
    May 21st, 2013 at 20:27 | #13

    @Batshua Had the same issue, order of options in gcc is causing that. try with gcc -o findcoords findcoords.c -lX11

  1. April 1st, 2010 at 20:03 | #1
  2. July 7th, 2011 at 09:26 | #2