View Full Version : custom resolution

27th December 2002, 19:51

anyone have any luck using a custom resolution in xfree86 4.2, i want to use 960x720 but i fail...

i have added it to the Modes part of the Screens section ... but whenever i do 'startx' it goes into 1400x1050 :eek: (which is *really* bad since my monitor officially supports 1280x1024 max)

if anyone has any luck... please tell me how u did it...


28th December 2002, 10:25
You must make sure that the first resolution listed is the one you desire. That's the one that it'll boot into. Can you cut and paste your Screens section?


28th December 2002, 10:40
it is... off course, otherwise it wouldn't have gone into 1400x1050 (which seems to happen only if 960x720 is the only res there, otherwise it goes into the next valid one.. in this case 800x600)... anyways here is my screen section:

Section "Screen"
Identifier "Screen 1"
Device "Matrox Millennium G200 16MB"
Monitor "My Monitor"
DefaultDepth 16

Subsection "Display"
Depth 16
Modes "960x720" "800x600" "640x480" "512x384"
ViewPort 0 0

all i gotta do is change 960x720 to 1024x768 and all is fine...

28th December 2002, 22:43
Try remming out the Viewport line, that could help. I'm pretty sure custom resolutions work the same as the standard ones, At one point I had all the custom resolutions for mame to run full screen in X.


29th December 2002, 07:29
Do you have a modeline set up for 960x720? You can't just throw arbitrary modes into the Screen/Display sections, the X server needs to know the timings.

30th December 2002, 10:15
Heck, last time I tried I couldn't even get it to do 1280x960 properly (tho 1280x1024 works fine).

As for all the timing issues, isn't that all supposed to be covered by DDC?

30th December 2002, 12:11
DDC gives you the monitor's limits on refresh rates. It doesn't give the individual timings for sync pulse, front porch, etc.

One way I've found to create custom modes is this:
- Clone the modeline for the nearest higher resolution. So for 960x720, use a 1024x768 modeline. Use one your monitor can handle, and be aware that the horizontal and vertical refresh rates will be higher when you're done.
- Rename the modeline and change the visible pixel numbers (1st and 5th) appropriately.
- Put the modeline into the Display section and start X with it. You now have a screen of the desired resolution, but tucked into the top left corner.
- Here's the dangerous part. Start xvidtune (I think you need to be root), set the 'Auto' box, and carefully and slowly adjust with the 'Left', 'Wider', etc. buttons until the image fills the screen appropriately.
- Click the 'Show' button, and replace your new modeline with the output. Restart X and be happy.

Note that like all things that mess with your video timings, the above is dangerous and could potentially damage or destroy your monitor. DO NOT do this if you are unsure of what is going on. Don't do it on a fixed-frequency monitor (do they still exist?). It's probably a very bad idea to do it with an LCD monitor as well - last I heard, LCDs had very strict timing requirements. Basically, if you have any doubts, just don't do it.

That said, I've done it a few times, with good results.

However, if I'm reading the changelogs right, CVS versions of XFree86 now have a script to calculate GTF timings for you. That would be far, far safer than the procedure I just outlined.

2nd January 2003, 09:34
Originally posted by Ribbit
Do you have a modeline set up for 960x720? You can't just throw arbitrary modes into the Screen/Display sections, the X server needs to know the timings.

it worked! well at least somewhat worked... it goes into 960x720 but, the screen is WAY off centre, and like u said, correct values are needed for Modeline... how do i find the correct values... or should i use xvidtune...?

thx, Nehal

2nd January 2003, 10:16
You mean you modified a 1024x768 mode? That's why it's off-centre. Essentially you're still in 1024x768 mode, but only drawing 960x720 pixels.

Yes, use xvidtune to fix it, but at your own risk. Stop if anything weird happens. Make sure the 'Auto' button is highlighted so it makes the changes in real time. When you've got something that works, the 'Show' button will print out the new modeline in the terminal where you ran xvidtune, so you can copy it into your XF86Config. Good luck!

2nd January 2003, 10:49
Ribbit: there are NO modes at all (there are default ones which it uses if i cant find a modeline, but there is no default for 960) ... i searched for one from the net and used it for 960x720... i guess that was dangerous but what the heck... my monitor turns off when it can't handle it...

anyways i used xvidtune, found the correct values, plugged into XF86Config and voila! ... works now...

thx for ur help... :)