Difference between revisions of "Working with Modelines"
m (ModeLinesHowTo moved to Working with Modelines) |
(Categorized) |
||
Line 104: | Line 104: | ||
It needs Front & back porch and sync pulse info - I'm not sure what they are. Can I get this from the h/v frequency? | It needs Front & back porch and sync pulse info - I'm not sure what they are. Can I get this from the h/v frequency? | ||
+ | |||
+ | [[Category:HOWTO]] |
Revision as of 03:08, 2 December 2005
Contents
Modelines
OK, so you want to generate a modeline for X for your HDTV / Projector...
What's a modeline?
It tells your videocard how to draw a picture on your display (monitor/TV/projector etc) Each display has different capabilities. Most obviously they have different sizes and resolutions.
Each modeline describes how to achieve a given resolution.
For more details see how to /Do It By Hand
And why would I care?
When ever you look at something on your display it's shown at a certain resolutions and certain refresh frequencies. Some displays will happily accept video signals for different resolutions and convert them for you - the problem is that this can reduce the quality of the video signal. So ideally you'll get myth or xine to convert your signal once to the right resolution for your tv/projector and avoid unnecessary degradation.
Simply - it can look better.
My Problem
I have a Panasonic AE100 LCD projector. I want to set it up to get the best posible resolution.
The book tells me it has a native pixel size of 858 x484. It also lists the video modes it supports with various frequencies.
I pick 856 x 480 with the following frequencies:
- 30.057 kHz Horiz scanning frequency
- 60.114 Hz Vert scanning frequency
- 31.500 MHz Dot clock
So the problem is "How do I create a modeline given this input data?"
A google returns a few options (some listed below) the most promising seemed to be videogen
.
Being a Debian user a quick apt-get install videogen
has me up and running.
man videogen
is useful - the most important options being:
-m=XxY describes the mode you want a modeline for
-mdc=xx sets the maximum Dot-clock of the videocard, not the monitor
-mhf=xx sets the maximum horizontal frequency for your monitor
-mvf=xx sets the maximum vertical frequency for your monitor
-dvf=xx sets the desired vertical frequency for your monitor (I use pal so I'd like it to refresh at 50Hz)
It's not obvious how to use it though, the HTPC How To suggestion didn't work but after a bit this command produces the desited results:
$ videogen -m=856x480 -mdc=34 -mhf=31 -mvf=61 -dvf=60.114 -nnv Modeline "856x480" 33.27 856 880 896 1096 480 482 483 505 # 33 MHz, 30.4 kHz, 60.1 Hz
It turns out that only some resolutions are allowed; eg videogen -m=858x480
won't work and gives
argument 2 (-m=858x480) has an invalid parameter
Update: I kept playing with this and found that this javascript calculator gave me more feedback and I ended up with a perfect modeline for a Panasonic PT AE100-E:
Modeline "856x480" 31.50 856 910 918 1048 480 484 485 500 -hsync -vsync
OK, now we have a modeline - time to use it.
Edit your XF86Config-4 file and find the Section "Monitor"
part. Now simply insert the modeline generated above. Note the part in "s is the name of this mode.
Now find the Section "Screen"
part of the file. There should be a "Display"
subsection and that should have a Modes
line. This line contains a space seperated list of mode names - you cycle through these when you press Ctrl Alt + and Ctrl Alt - (that plus and minus keys)
As always an example should make it easier:
Section "Screen" Identifier "[[Proj Screen]]" Device "[[Ge Force]]" Monitor "Projector" [[Default Color Depth]] 24 [[Default Fbbpp]] 32 [[Sub Section]] "Display" Depth 24 [[Fb Bpp]] 32 Modes "856x480" [[End Sub Section]] [[End Section]]
Now start X and you should have a shiny new mode.
Useful Links:
Linux HTPC How-to
In particular this page:
http://www.sllug.org/how-to/linux-htpc/video_card_configuration.html
provides a useful overview.
Videogen
http://www.dynaweb.hu/opensource/videogen/
It's similar to Powerstrip.
A quick calculator
http://www.hut.fi/Misc/Electronics/faq/vga2rgb/calc.html
It needs Front & back porch and sync pulse info - I'm not sure what they are. Can I get this from the h/v frequency?