[LINUX] HOW-TO setup XBMC and Linux with correct 1080p HD
#1
Rainbow 
If you are having issues geting XBMC to display in the correct resolution, have the option to select them within settings, or 24Hz is not selectable when you know your tv is capable, this How-To is for you.

I performed this on an ION based HTPC but it has worked with a 8600gt also. I've had a little mission discovering how to get XBMC list and output the appropiate HD outputs (1080p / 24hz etc) allowing XBMC to adjust display refresh rate to match video.

This is assuming you have a 1080p 24hz (24Hz not required) capable HDTV via HDMI (DVI) as myself have a sony Bravia.

Apon completion XBMC would:

-Output : 1920x1080@60p ( @ 60 / 50 / 23.976 / 24 / 25 refers to refresh rate : Hz)
1920x1080@50p
1920x1080@60i
1920x1080@50i
[email protected]
1920x1080@24p
1920x1080@25p

-Adjust display refresh rate to match video (60/50Hz in menu)

I use windows on my laptop so i FTP into my XBMC HTPC via WinSCP (FREE)
Code:
http://winscp.net
XBMC displays your ip so as long as your running X-server you can FTP
Lets get to it!!

STEP 1: Back up your original xorg.conf

Location:
Code:
/etc/X11/xorg.conf
FTP and back that up.

STEP 2: Create new xorg.conf
Copy:
Code:
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 1.0  (buildd@palmer)  Sun Feb  1 20:21:04 UTC 2009

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 1.0  (buildmeister@builder63)  Fri Aug 14 17:54:58 PDT 2009

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

Section "Files"
EndSection

Section "ServerFlags"
    Option         "Xinerama" "0"
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      "TSB TOSHIBA-TV"
    HorizSync       15.0 - 81.0
    VertRefresh     23.0 - 76.0
    Option         "DPMS"
    ModeLine "1920x1080@60p" 148.50 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
    ModeLine "1920x1080@50p" 148.50 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
    ModeLine "1920x1080@60i" 74.18 1920 2008 2052 2200 1080 1084 1094 1124 +hsync +vsync Interlace
    ModeLine "1920x1080@50i" 74.25 1920 2448 2492 2640 1080 1084 1094 1124 +hsync +vsync Interlace
    ModeLine "[email protected]" 74.175 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync
    ModeLine "1920x1080@24p" 74.16 1920 2558 2620 2750 1080 1084 1089 1125 +hsync +vsync
    ModeLine "1920x1080@25p" 74.25 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "ION"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "NoLogo" "True"
    Option         "TwinView" "0"
    Option "DynamicTwinView" "false"
    Option "FlatPanelProperties" "Scaling = Native"
    SubSection     "Display"
        Depth       24
    Modes "1920x1080@60p" "1920x1080@24p" "1920x1080@25p" "1920x1080@50i" "1920x1080@50p" "1920x1080@60i" "[email protected]"
    EndSubSection
EndSection

Section "Extensions"
    Option         "Composite" "Disable"
EndSection
Paste that into a new notepad
Save and name it xorgtochange.txt
FTP that over to your XBMC HTPC
location:
Code:
/home/xbmc/(put file in here)

Step 3: Rename: xorg.conf

Close XBMC: (CTRL + ALT + F1)
Stop/Close X: (CTRL + c)
You are now back in the terminal.

open up our new file:
Code:
sudo nano /home/xbmc/xorgtochange.txt
we need to save that to a new location under another name so just delete a character and type it back in, i did the S in the Section (backspace; then enter back a capital S)
now close it (CTRL + x)
Type Y for yes
Now it says File name to write thats where you erase the /home/xbmc/xorgtochange.txt
and type the new file and location:
Code:
/etc/X11/xorg.conf
enter and yes when asked about overwriting

AND WE'RE DONE :
sudo reboot

P.S. Besure to calibrate your video overscan in settings/system/video output within xbmc settings. I believe you have to do it for each resolution your going to use as XBMC stores those settings for each out put, so if you have it to auto adjust Hz to video, when you play a 24Hz media, and press pause, in the confludence skin you should see on the bottom right the skin is cut off the screen, but not in 60Hz.
Enjoy

Thanks to :

X3lectric: who linked me to the well hidden post by
Ben8472: who created the xorg.conf with the tutorial by
The-Boxhead: who started the thread/ how to

I just think its a whole lot more easy with this step by step.
Reply
#2
I can't tell you how much this helped me. I bought a revo a few weeks back and was struggling getting it to display 1080p.....

THIS WORKS GREAT.......

Thanks for the how-to...... (should be moved to the how-to section..... quickly)

speedbal
Reply
#3
Question for ya... In your Xorg.0.log file what mode does the NVIDIA module claim to use when you load a 23.976fps video?
Reply
#4
This works great on my tv!!! Thanks!
Reply
#5
is the new XF86Config the same format as the old xorg? can I follow this tutorial replacing xorg with XF86Config with the same outcome?
Reply
#6
brownstein Wrote:is the new XF86Config the same format as the old xorg? can I follow this tutorial replacing xorg with XF86Config with the same outcome?

Hey, honestly i dont even know what the new XF86Config, i've never heard of it, i did this on ubuntu 9.10 karmic, freshinstall. Tomorrow i will write a full tutorial with some things i discovered also how to do a fresh install, does any body know why with jaunty i was able to hit the power button on my pc and it will start a shutdown, where now on 9.10 karmic it does not?

and can anyone point me in the dirrection geting the imon VFD working aswell as its remote and customize the buttons to my config?
Reply
#7
brownstein Wrote:is the new XF86Config the same format as the old xorg? can I follow this tutorial replacing xorg with XF86Config with the same outcome?

It's the other way around. xorg.conf is the replacement to XF86Config. Xorg took over XF86 some years ago as the main X server for Linux distributions. Xorg will, however, still read XF86Config as a configuration file as far as I know. I'm not sure you'd want to do that though since everything you'll find online is talking about xorg.conf today.
Reply
#8
I had to change the XF86Config for my settings because I couldn't find xorg.conf. This happened after updating to karmic.
Reply
#9
same here. Where did this XF86Config come from all of a sudden?
Reply
#10
Lightbulb 
Hey geant90 thx for the mention but I have another tip that will suit you or anyone else. in fact this resolution seems to be such a problem for so many people it may as well have its how to.

Good to see I am actually helping ppl and as a result their going forth and helping themselves and others. This I like to see. However.

You can get you specific modeline by using a simple command and a few attributes instead of going all out with one that may not be suited 100% for your machine even if it seemingly fixes your issues.
Please create your own xorg.conf using the preset one may not suit your machine/TV you can always add the modifications later.

Create YOUR OWN new xorg.conf HIGHLY recommended dont just copy and paste all contents
Code:
dpkg-reconfigure xserver-xorg
The First settings that are not the same for your TV are the ones in red there and bold.

*edit off original post

Code:
Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
[color=black] [b]   [COLOR=red]ModelName      "TSB TOSHIBA-TV"
    HorizSync       15.0 - 81.0
    VertRefresh     23.0 - 76.0[/color][/b][/COLOR]
Those settings are not the same for every TV using a wrong config may well break something or if your lucky may not! Either way you all have been warned.

All other tweaks can be applied under each section safely

e.g.

for my machine which is 1080p I would do

Code:
$ gtf 1920 1080 24
the output is your modeline in my case

Code:
Modeline "1920x1080_24.00"  61.81  1920 1944 2136 2352  1080 1081 1084 1095  -HSync +Vsyncc
and that just gets slotted under the appropriater heading within your xorg.conf

I would presume no one here needs a breakdown of what each entry after gtf means adapting it then to your resolution and refresh rates needs making this a 100% your machine compatible.

Also please note that you will need to enable the allow resolution change in XBMC settings to be able to select whatever resolution you really want to use.

I only have one modeline in my xorg.conf and it does the job it needs.

offtopic: I continue to believe by many personal experiences with ION machines that many issues with karmic kernels prevent a proper working XBMC for not allowing certain modules to be loaded or by generally blurting smbus conflicts where there should be none.

I would make sure that for some bizarre reason there are no conflicting settings in the old files which xorg.conf may or may not read from still for legacy purposes.

Someone asks where XF86Config came from? A swift wikipedia search will tell you what you need to know... by Default I search and research before I ask such/similar questions.
Reply
#11
I'll further this discussion with information related to ION (any NVIDIA really) running under Xorg with XBMC. I've been spending considerable time in the evenings trying to get perfect 23.976 playback with my Revo on my 1080p 120hz TV. I've gotten darn close... and have learned a lot along the way.

First off 24hz is not the same as 23.976. If you run 23.976hz material on a 24hz modeline you'll get a double frame every 40 seconds or so. Most US movies (blu-ray included) are 23.976hz (you can google why...) and not 24hz. It's called 24hz to be easy, but in the case of xorg they are different.


NVidia drivers with "DynamicTwinView" enabled have incorrect refresh rates listed in xrandr. xrandr is what XBMC uses to "adjust refresh rate" to match the video. What the NVidia drivers do is just start at 50hz and count up with each subsequent refresh rate at that resolution. So 60hz might say 50, 60hz Interlaced might say 51, 24hz might say 52, 23.976 hz might say 53, etc. This is fine if you pick the resolution yourself in X, but won't work with XBMC "adjust refresh rate".

NOTE!
Disabling DynamicTwinView allows correct (to a point) refresh rates listed in xrandr and selected by XBMC. HOWEVER xrandr DOES NOT support non integer refresh rates (like 23.976) (hence why NVidia decided to count them isntead). So if you want a 23.976 refresh rate you can't also have a 24hz refresh rate since xrandr will only list the closer of the two. If you only have the 23.976 rate, xrandr will call it 24 and select it appropriately. This means it's impossible for XBMC to select a 24hz refresh rate for 24hz material and a 23.976 refresh rate for 23.976 (or 60 and 59.94) material, at least in Linux.

I have not seen that mentioned many places on this board, but based on my searching and information around the net that is the case. You can verify which mode is being selected in the Xorg.0.log file in /var/log when the refresh rate is adjusted by XBMC (they'll have the same name as your xorg.conf file modelines).
Reply
#12
X3lectric, I think that what people mean when they say "Where did XF86Config" come from is that in 9.11 beta2 and 9.11 RC1 (Live) it is this one which are there in th X11 directory, after installing from CD.

I have experienced this myself on both versions.

If I however use 9.04, it's the "xorg.conf" which is there.

The problems however don't stop there, because the XF86Config can not be edited. If edited, and then restarting system, it will revert back to the old content.

This I have found no solution for here in the forum. But do note, this is in Live.

/PerM...
Reply
#13
Where do you find these settings:
HorizSync 15.0 - 81.0
VertRefresh 23.0 - 76.0

I have a samsung LN52B750 an I searched but can't find anything on this.
Reply
#14
dan1son Wrote:I'll further this discussion with information related to ION (any NVIDIA really) running under Xorg with XBMC. I've been spending considerable time in the evenings trying to get perfect 23.976 playback with my Revo on my 1080p 120hz TV. I've gotten darn close... and have learned a lot along the way.

First off 24hz is not the same as 23.976. If you run 23.976hz material on a 24hz modeline you'll get a double frame every 40 seconds or so. Most US movies (blu-ray included) are 23.976hz (you can google why...) and not 24hz. It's called 24hz to be easy, but in the case of xorg they are different.


NVidia drivers with "DynamicTwinView" enabled have incorrect refresh rates listed in xrandr. xrandr is what XBMC uses to "adjust refresh rate" to match the video. What the NVidia drivers do is just start at 50hz and count up with each subsequent refresh rate at that resolution. So 60hz might say 50, 60hz Interlaced might say 51, 24hz might say 52, 23.976 hz might say 53, etc. This is fine if you pick the resolution yourself in X, but won't work with XBMC "adjust refresh rate".

NOTE!
Disabling DynamicTwinView allows correct (to a point) refresh rates listed in xrandr and selected by XBMC. HOWEVER xrandr DOES NOT support non integer refresh rates (like 23.976) (hence why NVidia decided to count them isntead). So if you want a 23.976 refresh rate you can't also have a 24hz refresh rate since xrandr will only list the closer of the two. If you only have the 23.976 rate, xrandr will call it 24 and select it appropriately. This means it's impossible for XBMC to select a 24hz refresh rate for 24hz material and a 23.976 refresh rate for 23.976 (or 60 and 59.94) material, at least in Linux.

I have not seen that mentioned many places on this board, but based on my searching and information around the net that is the case. You can verify which mode is being selected in the Xorg.0.log file in /var/log when the refresh rate is adjusted by XBMC (they'll have the same name as your xorg.conf file modelines).

dan1son, thanks for sharing your findings. I had concerns about the difference between 23.976 and 24. Even though I knew that my files are 23.976 and XBMC says playback is 24. I just hoped everything was working as it should.

Is the double frame every 40 seconds the only issue? Are there any audio sync issues?

Thanks
Reply
#15
Question 
MrStarhouse Wrote:X3lectric, I think that what people mean when they say "Where did XF86Config" come from is that in 9.11 beta2 and 9.11 RC1 (Live) it is this one which are there in th X11 directory, after installing from CD.

I have experienced this myself on both versions.

If I however use 9.04, it's the "xorg.conf" which is there.

The problems however don't stop there, because the XF86Config can not be edited. If edited, and then restarting system, it will revert back to the old content.

This I have found no solution for here in the forum. But do note, this is in Live.

/PerM...

Ah in that case let me put my Mind Readers Hat on I forgot to wear it earlier on.

Since I haven't installed it from CD (I'm upgrading from one version to the other as they become available) and since that is a old not use license incompatible whatever that's is you cant really blame me for not guessing what they were talking about but if this is the case this is not true on an upgrade and if this file is there on install from CD report it as bug or post a separate topic on relevant forums for support on this. It shouldn't be there since xbmc/nvidia should use xorg.conf

odd anyways I cant see why XBMC would now suddenly decide to be using that.

Ritzie Wrote:Where do you find these settings:
HorizSync 15.0 - 81.0
VertRefresh 23.0 - 76.0

I have a samsung LN52B750 an I searched but can't find anything on this.

you find it inside your own /etc/X11 presuming you havent already fiddled with this file called xorg.conf or where the xorg logs are kept

Also funnily enough its mentioned several times in this topic specially the first I guess your reading glasses were misplaced?
Reply

Logout Mark Read Team Forum Stats Members Help
[LINUX] HOW-TO setup XBMC and Linux with correct 1080p HD1