An overscan fix for the Sharp LC-42SB45U television set when connected to a computer with a Linux operating system (Ubuntu, etc.)

 

Important
This is an edited version of a post that originally appeared on a blog called The Michigan Telephone Blog, which in turn was reposted with the permission of the original author from a now-defunct Macintosh-oriented blog. It is reposted with his permission. Comments dated before the year 2013 were originally posted to The Michigan Telephone Blog.

If you bought a Sharp LC-42SB45U TV, perhaps because it was on a super great (and very lightly advertised) deal at Wal-Mart back in November, and then later tried to hook up a home theater PC to it, you may have been disappointed to discover that unlike most flat screen digital TV’s it doesn’t have a “pixel-to-pixel” or similar 1:1 pixel mapping mode. The result is that when you hook up a computer to one of the HDMI ports, there is a serious overscan problem — for example, if you are running Ubuntu Linux (or some other version of Linux) you won’t see the top or bottom menu bars, because they are outside the visible screen area. If you use XBMC or Boxee, you can go into that program’s settings menu and apply overscan correction from within the program, but most other programs and video players don’t offer an overscan correction option.

The problem is not that there’s no “Dot by Dot” setting in the Sharp TV — it’s just that it’s a (very) hidden option, and as far as I know, there is nothing you can do using the buttons on the TV or on the remote to make it appear (I’d be very happy to be proven wrong on this point; if there is some sort of hidden remote control key sequence that can make the Dot by Dot option always appear, I wish someone would spill the beans so we can fix this issue the right way). But with one small tweak in a Linux configuration file, you can make it appear, like so:

Sharp LC-42SB45U TV showing Dot by Dot option

My first approach to this came at a cost: I read that if you could send the Sharp a non-standard vertical sync frequency (refresh rate) a bit below the normal 60 Hz, the alternate View Mode would appear.  That did work, and in my non-scientific testing, I found that 59.55 Hz was about the cutoff point.  Anything above that, and you get the normal menu of View Mode options when you press the View Mode button on the remote.  Anything at about that or below,  and you get the View Mode options menu shown above. However, this was certainly less than ideal because of the non-standard refresh rate. I got started on that path after reading a forum post that suggested a custom ModeLine in your /etc/X11/xorg.conf file to give you a 1816×1026 display.  While this will work to fix the overscan, it also cuts down on the pixels available to programs, and makes things not quite as sharp (no pun intended) as they should be.

Now, the idea of using a custom ModeLine in your /etc/X11/xorg.conf file is not a bad idea, and the above-referenced post did contain some good information  (especially about disabling some unwanted Ubuntu packages that might cause your xorg.conf to be ignored).  So I tried the xorg.conf shown in that post, except I used the original ModeLine shown (which is correct for the Sharp LC-42SB45U as long as you don’t mind the overscan).  I then read in another forum post (on a different site) that someone had found that the Dot by Dot option would appear if the refresh rate were set to 59 Hz rather than 60 Hz.  However they were doing that on a Windows machine, not a Linux box, if I recall correctly.

But again, that had the disadvantage of a non-standard refresh rate.  I’ve read on several sites that the ideal refresh rate is 59.94 Hz (it’s very close to 60 Hz and is exactly twice the ATSC 1920×1080 progressive scan frequency of 29.97 Hz) so my goal was to get as close to that as possible. I then read that someone had actually accomplished this on a Windows box by changing the timing to something called “CVT reduced blank” (the procedure on a Windows box is to bring up the NVIDIA Control Panel, then click on Change Resolution, then Add Resolution, then Create Custom Resolution, then in the “Timing” section find the “Standard” drop-down box and select CVT reduced blank. Make sure the other settings look sane, click the Test button and go from there. Mac OS X users can do something similar using a program called SwitchResX — see Brian Semiglia’s comment in the Comments section for a link to instructions. The reason this doesn’t work under Linux is that the Linux version of the NVIDIA Control Panel doesn’t offer this level of functionality, and also, some might encounter this issue even if not using NVIDIA graphics). So my goal was to find a ModeLine that would do the CVT reduced blank but not use a non-standard screen size nor refresh rate. After searching the web, playing around with an online Calculator for video timings which I saved to a local drive and then hacked a bit to display four decimal points of precision on some key values, and generally spending more time than I intended, I came up with a working ModeLine.

First, let’s look at the original 1920×1080 ModeLine from the above-linked forum post:

ModeLine "1920x1080" 148.50 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync

If you change the pixel clock frequency value in a ModeLine (the 148.50 in the line shown above) you change the refresh rate, and if you change certain other values you change the other timings.  I cheated a bit and used Google to search for a working ModeLine that provided 1920×1080 at 59.94 progressive scan, and found one that was very close (59.93, actually) so I tweaked the refresh to give me exactly 59.94.  This is the final ModeLine I came up with:

Modeline "1920x1080" 138.5141 1920 1968 2000 2080 1080 1083 1088 1111 +hsync +vsync

Okay, so you may think it ridiculous to specify the pixel clock frequency out to four decimal places, but hey, it works! So, this is what I’m now using for an xorg.conf file (by the way, if any of the ModeLines in this article are truncated on your display, just keep in mind that the last two values in each line are +hsync +vsync — if you copy and paste any of the long ModeLines, hopefully you’ll get the complete line).  Bear in mind that I’m using this with an Acer Aspire Revo, so some of these lines are specific to the NVIDIA graphics chipset, but the principle of changing the ModeLine probably should work with this model Sharp TV even if some other graphics chipset is used on the computer:

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 1.0  (buildmeister@builder75)  Tue Dec  8 21:04:28 PST 2009

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       15.0 - 75.0
    VertRefresh     55.0 - 76.0
    ModeLine       "1920x1080" 138.5141 1920 1968 2000 2080 1080 1083 1088 1111 +hsync +vsync
    Option         "ExactModeTimingsDVI" "TRUE"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Option         "ModeValidation" "NoEdidModes"
    Option         "HWCursor" "false"
    Option         "DynamicTwinView" "false"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Modes      "1920x1080"
        Depth       24
    EndSubSection
EndSection

Section "Extensions"
     Option         "Composite" "Disable"
EndSection

This seems to work well on a Acer Aspire Revo running Ubuntu Karmic Koala (EDIT: and I’ve also used it under Maverick Meerkat), though I imagine it would work with other Linux distributions that use an xorg.conf file (including XBMC Live), however as far as I know this trick only works with the Sharp LC-42SB45U TV and no other model.  With this xorg.conf I don’t have to tweak the overscan settings in XBMC or Boxee at all. It works for me, but it may or may not work for you.  Standard disclaimers apply – I’m not telling you to do this on your setup, and if you break something, you own all the pieces, but from me you’ll get nothing more than perhaps a bit of sympathy. Don’t even think of doing this if you are not willing to assume any and all risks.

EDIT: If you don’t want to go through all the hassle I went through to calculate the correct ModeLine, you can run the cvt program with the -r option from the Linux command prompt, like this:

cvt -r 1920 1080

That’s for a 1920 x 1080 display. On my system this generated the following output:

# 1920x1080 59.93 Hz (CVT 2.07M9-R) hsync: 66.59 kHz; pclk: 138.50 MHz
Modeline "1920x1080R"  138.50  1920 1968 2000 2080  1080 1083 1088 1111 +hsync -vsync

You’ll notice this is nearly identical to the ModeLine I generated (the vsync is the opposite, though — don’t know if that would be an issue). What I’ve read is that you paste the generated ModeLine into your xorg.conf file and make sure you also have the line

Option         "ExactModeTimingsDVI" "TRUE"

in your xorg.conf (to force it to use your generated ModeLine) and that may be all you need. Certainly simpler than how I did it, but I didn’t know about the cvt program. (End EDIT).

By the way, if you want to hack that Calculator for video timings, just save the HTML page to your local hard drive, open it in a text editor and look for this section (it’s very close to the top):

function TwoDecimal(number) {
 number=((Math.round(number*100)/100));
 return number;
}

Change that second line to

number=((Math.round(number*10000)/10000));

Then load the page into your favorite browser (with JavaScript enabled). That will display a couple extra decimal points on some of the critical values.