User:UNiversal

From Official Kodi Wiki
Jump to navigation Jump to search
uNiversal
uNiversal
Error! Out of Memory
Forumite & Wikifier
System Details: Linux.0.1~Custom
Brain Version: Positronic alpha 0.2
Power Matrix: Hybrid/Biologic
Ctrl+Alt+Del



wip refresh rate and resolutions /etc/xorg.conf

Information: This page contains explanation about modelines in xorg.conf
Advanced: The information contained in this page is considered advanced.
Warning: The informations contained in this page can cause issues with your X if any errors or incorrect information is entered.


Outline

The xorg.conf is a integral part of running XBMC in X via for e.g. xinit in some controllable manner. While in recent Linux the device drivers have improved considerably and deem xorg.conf unneeded, it still has its niche.

If you ever had problems getting the correct resolution or correct modelines on your HTPC this is an easy guide. You can also use this guide to tweak 23.976Hz and 24Hz modelines for smoother playback..

Introduction

This guide should be quite "generic", use this guide on your own risk. if you end up without a picture on your screen restore the backup xorg.conf. References[1][2][3]

The Beginning

Backing up any existing xorg.conf is a integral step in achieving butter smooth playback.

cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak

Then generate a new clean xorg.conf to have a base which to build on later, Note: You probably can use this for other non-NVidia systems, this is something you need to research how-to generate a xorg.conf for ATI or Intel and if you need one to begin with.

sudo nvidia-xconfig -s --no-logo --force-generate --output-xconfig=/etc/X11/xorg.conf

Now we need to edit the new xorg.conf to add some options.

sudo nano /etc/X11/xorg.conf

then add the following lines in the correct section of that file:

Section "monitor"
	Option			"ExactModeTimingsDVI"		 "true"
	Option			"DPI" "96 x 96"
	Option			"DPMS"				 "false"

The validation lines vary from setup to setup and depend very much on how well your TV handles EDID, Telling xorg to ignore EDID may result in low resolution being shown in xbmc, if you dont offer correct and valid modelines for xbmc-xandrc to pick from. In this example we are not disabling EDID data. We definitely dont want vesa modes or xserver modes


Section "Device"
Option				"ModeValidation"		 "NoVesaModes, NoXServerModes"

Some difficult TV's Edid can be turned off by appending

"NoEdidModes"

To the Modevalidation line parameters.

Now close and save the file by hitting Ctrl+X on your keyboard. Then press Y followed by  Enter

Now we need to figure out what kind of resolution your TV supports by its EDID info:

Kill xbmc if it's running by

sudo stop xbmc

Then we need to setup a logfile which logs your TV's EDID modes:

cd $USER

X -verbose 6 > ~/xlog.txt 2>&1

kill X by pressing Ctrl+C

In the root of your home directory you will find a xlog.txt (/home/xbmc/xlog.txt) Open the file and browse until you see something like this section:

(II) NVIDIA(0): Frequency information for SAMSUNG (DFP-1):
(II) NVIDIA(0): HorizSync : 15.000-50.000 kHz
(II) NVIDIA(0): VertRefresh : 48.000-62.000 Hz
(II) NVIDIA(0): (HorizSync from EDID)
(II) NVIDIA(0): (VertRefresh from EDID)

Write Down the HorizSync and VertRefresh values.

Browse further and find all the validated modes. Like the example underneath:

(II) NVIDIA(0): Validating Mode "1920x1080":
(II) NVIDIA(0): 1920 x 1080 @ 60 Hz
(II) NVIDIA(0): For use as DFP backend.
(II) NVIDIA(0): Mode Source: EDID
(II) NVIDIA(0): Pixel Clock : 74.25 MHz
(II) NVIDIA(0): HRes, HSyncStart : 1920, 2008
(II) NVIDIA(0): HSyncEnd, HTotal : 2052, 2200
(II) NVIDIA(0): VRes, VSyncStart : 1080, 1084
(II) NVIDIA(0): VSyncEnd, VTotal : 1094, 1124
(II) NVIDIA(0): H/V Polarity : +/+
(II) NVIDIA(0): Extra : Interlace
(II)NVIDIA(0): Mode is valid.

Make sure that the "(II)NVIDIA(0): Mode is valid." line exists on the one you pick. To create a modeline from this is easy. From my example above the first line would be "1920x1080" and then 74.25 and then 1920 2008 and 2052 2200 and so on. you just read the values from top to bottom. So in this example the modeline that section gives me would be:

ModeLine "1920x1080" 74.25 1920 2008 2052 2200 1080 1084 1094 1124 +hsync +vsync Interlace

Now that we got bot vsync,hsync and a working modeline lets put it in our xorg.conf.

issue from terminal:

sudo nano /etc/X11/xorg.conf

Then add from what you wrote down earlier.

Section "Monitor"
HorizSync      15 - 50
VertRefresh    48 - 62
ModeLine "1920x1080" 74.25 1920 2008 2052 2200 1080 1084 1094 1124 +hsync +vsync Interlace

(edit the ones there already)

SubSection "Display"
Modes "1920x1080"

IMPORTANT! This line must match the modeline you created ! In my case it was "1920x1080"

Now close and save the file by hitting Ctrl+X on your keyboard. Then press Y followed by  Enter

Start xbmc by running it:

sudo xbmc start

You should get a nice correct screen, make sure to go into settings - screen and calibrate/adjust your new resolution.

If not try another modeline using same methods and see if that works.

This guide was made from the following sources:

References

templates to be

Template:orangev

{{{1}}} {{{1}}}
[create] Documentation

Template:goldv

{{{1}}} {{{1}}}
[create] Documentation


{{{1}}}

Template:Quote

HELP NOTICE: {{{1}}}
[create] Documentation
[create] Documentation

Template:Note REMEMBER

[create] Documentation

Template:Tip TIP

[create] Documentation

Template:Help HELP

[create] Documentation