All pastes #18267 Raw Edit

Someone

public text v1 · immutable
#18267 ·published 2005-07-22 08:59 UTC
rendered paste body
Xvidtune seems like a pretty intuitive utility, but there are a few tricks to it. When you first start it (by typing "xvidtune" in an xterm), a very nasty warning flashes across the screen:

The incorrect use of this program can do permanent damange to your monitor and video card. If you are not sure what you are doing, hit cancel now. Otherwise, hit OK to continue.

Despite this intimidating message, it's unlikely you'll cause your monitor to blow up, especially if the only thing you are doing is changing the horizontal and/or vertical settings. Yes, you can damage a monitor if you exceed it's horizontal or vertical display frequencies, but you aren't going to be messing with that. All I want to do is center the display on the screen. So in other words, hitting "OK" should be OK.

Once I've given the OK, I click on the button that says <Left>, expecting the screen to move left. Actually, it won't move until I hit the button that says <Apply>. I find that four clicks on the <Left> button and then hitting <Apply> does the trick. My screen is centered. So great, no problem, right?

Wrong. This will work fine, but the settings are not saved. My screen will remain centered, but when I exit X everything will revert back to the default settings. In fact, Xvidtune cannot save these new settings. I must cut and paste the settings manually into file /etc/X11/XF86Config-4.

First I need to see the settings. I can get this by clicking the <show> button in Xvidtune. The settings will then appear in my xterm. As it so happens, the settings it shows me look like this:

"800x600"  49.50  800  832  912 1056  600  601  604  625 +hsync +vsync

Well that's nice, but what do I do with these settings? Unfortunately, that's a little more complicated than it should be. I must modify file XF86Config-4 manually. Before I do that, I make a backup copy of it called XF86Config-4.original, but use whatever name suits your fancy. I then, as root, must edit the file.

I open file /etc/X11/XF86Config-4, and search for the section that says "Monitor" - it looks like this:

Section "Monitor"
    Identifier    "Generic Monitor"
    HorizSync    28-50
    VertRefresh    43-75
    Option        "DPMS"
EndSection

I then add a line that says:

    UseModes "Ulycom"

So that it now looks like this:

Section "Monitor"
    UseModes "Ulycom"
    Identifier    "Generic Monitor"
    HorizSync    28-50
    VertRefresh    43-75
    Option        "DPMS"
EndSection

Why "Ulycom"? That just happens to be the brand name of my monitor. I could have used any name really - "Aardvark" would have been fine. But I do need to have a name, because I need to create a new section called "Modes" that identifies my monitor and its settings. This section does not exist - it will be my own creation, from scratch. It will look like this:

Section "Modes"
    Identifier    "Ulycom"
    ModeLine    "800x600"      49.50    800  832  912 1056    600  601  604  625 +hsync +vsync
EndSection

Note that the settings after the word "ModeLine" are the settings I was given by Xvidtune when I hit the <Show> button.

So to summarize, when I am all done, my file /etc/X11/XF86Config-4 will have a whole new section called "Modes", followed by a section called "Monitor" (to which I added a line called "UseModes"). The whole thing looks like this:

Section "Modes"
    Identifier    "Ulycom"
    ModeLine    "800x600"      49.50    800  832  912 1056    600  601  604  625 +hsync +vsync
EndSection

Section "Monitor"
    UseModes "Ulycom"
    Identifier    "Generic Monitor"
    HorizSync    28-50
    VertRefresh    43-75
    Option        "DPMS"
EndSection


Hopefully, that all makes sense. I restart X, and the screen is properly centered. Whew!