XBMC Community Forum
[Linux] HOW-TO achieve perfect playback at 23.97 or 59.94 Hz with NVIDIA GPU hardware - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Announcements, Info, and General Discussion (/forumdisplay.php?fid=85)
+--- Forum: Tips, tricks, and step by step guides (/forumdisplay.php?fid=110)
+--- Thread: [Linux] HOW-TO achieve perfect playback at 23.97 or 59.94 Hz with NVIDIA GPU hardware (/showthread.php?tid=70068)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36


- JunkDeluxe - 2010-03-27 16:45

New at Ubuntu, so its a bit hard to wrap your mind around these kind of things.
I was having a bunch of problems with tearing af refreshrates, then i finally found this post. I followed it as best as i could, and the refresh rate issue is fixed, but now i am having trouble with the aspect ratio Sad

When i load a 1080p movie i the video is stretched really far out, and the same for 720p.
If i correct the aspect ratio manually for a 1080p movie the aspect ratio wont work on 720p, and i have to adjust it again. Tried all the "normal" modes in XBMC, Stretch, Original, Normal, etc. Can't XBMC pull the native aspect ratio from the file and just send that?

I tried going to the IRC chan, but people werent answering there.

My xorg.conf is as follows:

Please reply if i'm doing anything wrong or you need other information.

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

# dePool for Panasonic-TV (DFP-0) ---
# lect" : 1920 x 1080 @  50.0 Hz  
#       : 1920 x 1080 @  50.0 Hz  
#       : 1920 x 1080 @  50.0 Hz  
#       : 1920 x 1080 @  60.0 Hz  
# "     : 1920 x 1080 @ 59.94/60 Hz (CEA-861B Format 16)
#       : 1920 x 1080 @ 23.97/24 Hz (CEA-861B Format 32)
#       : 1920 x 1080 @ 59.94/60 Hz (CEA-861B Format 5)
#       : 1920 x 1080 @ 50 Hz Interlace (CEA-861B Format 20)
#       : 1280 x  720 @  60.0 Hz  
#       : 1280 x  720 @  60.0 Hz  
#       : 1280 x  720 @ 59.94/60 Hz (CEA-861B Format 4)
#       : 1280 x  720 @  50.0 Hz  
#       :  720 x  576 @ 50 Hz (CEA-861B Format 18)
#       :  720 x  576 @ 50 Hz (CEA-861B Format 18)
#       : (1440)x 576 @ 50 Hz Interlace (CEA-861B Format 22)
#       :  720 x  480 @ 59.94/60 Hz (CEA-861B Format 3)
#       :  720 x  480 @ 59.94/60 Hz (CEA-861B Format 3)
#       : (1440)x 480 @ 59.94/60 Hz Interlace (CEA-861B Format 7)
#       :  640 x  480 @ 59.94/60 Hz Interlace (CEA-861B Format 1)
#       :  640 x  480 @ 59.94/60 Hz Interlace (CEA-861B Format 1)
# Pool for Panasonic-TV (DFP-0): ---

Section "ServerLayout"
    Identifier     "Default Layout"
    Screen         "screen" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "keyboard"
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 "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
    Option "ExactModeTimingsDVI" "TRUE"
EndSection

Section "Device"
    Identifier     "nvidia"
    Driver         "nvidia"
    Option "ModeValidation" "NoEdidModes"
EndSection

Section "Screen"
    Identifier     "screen"
    Device         "nvidia"
    Monitor        "Monitor0"
    Option         "NoLogo" "true"
    Option         "DynamicTwinView" "false"
    Option         "FlatPanelProperties" "Scaling = Native"
    Option         "ModeValidation" "NoVesaModes, NoXServerModes, NoVertRefreshCheck, NoHorizSyncCheck"
    Option         "UseDisplayDevice" "DFP-0"
    Option         "ModeDebug" "true"
    Option         "HWCursor" "false"
    SubSection     "Display"
        Modes      "1920x1080_60_0" "1920x1080_24_0"
    EndSubSection
EndSection

Section "Extensions"
    Option         "Composite" "false"
EndSection



- Evanrich - 2010-03-28 06:09

just ran your script, but got the following errors...are these ignorable (the can't resolve ones)?
Quote:xbmc@ION-HTPC:/tmp$ sh nvidia.sh
1/6 Backing up settings
2/6 Applying Xorg settings
sudo: unable to resolve host ION-HTPC
[sudo] password for xbmc:
3/6 Restarting Xorg to find available modes
sudo: unable to resolve host ION-HTPC
xbmc-live stop/waiting
sudo: unable to resolve host ION-HTPC
xbmc-live start/running, process 1840
sudo: unable to resolve host ION-HTPC
4/6 Adding 23.97Hz and 59.94Hz to xorg.conf
sudo: unable to resolve host ION-HTPC
sudo: unable to resolve host ION-HTPC
xbmc-live stop/waiting
sudo: unable to resolve host ION-HTPC
xbmc-live start/running, process 2082
5/6 Applying NVIDIA settings
6/6 Applying XBMC settings
--- All done



- JuiceZ - 2010-03-30 03:15

Just wanted to say thanks to OP, that guide worked for me. Cool


- JumJum - 2010-03-30 07:38

Evanrich Wrote:just ran your script, but got the following errors...are these ignorable (the can't resolve ones)?

The errors are harmless and completely unrelated to the script. My guess is you changed your hostname without adding it to /etc/hosts.


- JumJum - 2010-03-30 07:46

JunkDeluxe Wrote:New at Ubuntu, so its a bit hard to wrap your mind around these kind of things.
I was having a bunch of problems with tearing af refreshrates, then i finally found this post. I followed it as best as i could, and the refresh rate issue is fixed, but now i am having trouble with the aspect ratio Sad

When i load a 1080p movie i the video is stretched really far out, and the same for 720p.
If i correct the aspect ratio manually for a 1080p movie the aspect ratio wont work on 720p, and i have to adjust it again. Tried all the "normal" modes in XBMC, Stretch, Original, Normal, etc. Can't XBMC pull the native aspect ratio from the file and just send that?

I tried going to the IRC chan, but people werent answering there.

My xorg.conf is as follows:

Please reply if i'm doing anything wrong or you need other information.

If you use the modes and settings posted here, your computer does output the correct aspect ratio. Your problem is almost certainly that your tv is not set to display exactly what it recieves without changing the aspect ratio.

Find and enable the pixel mapping or dot-by-dot setting on your tv and you should be fine.


- satch - 2010-03-30 11:40

When I try to run the script I get the following error msg:

nvidia.sh: 12: Syntax error: "||" unexpected


- JumJum - 2010-03-30 16:26

satch Wrote:When I try to run the script I get the following error msg:

nvidia.sh: 12: Syntax error: "||" unexpected

You probably have DOS line feeds in your file. Either download the script using the command in the first post, or fix your current script with:
Code:
cat nvidia.sh | tr -d \\r > nvidia-fixed.sh



- satch - 2010-03-30 18:29

JumJum Wrote:You probably have DOS line feeds in your file. Either download the script using the command in the first post, or fix your current script with:
Code:
cat nvidia.sh | tr -d \\r > nvidia-fixed.sh

That solved the problem, thank you! The only problem now is that I have quite a bit of overscan now within ubuntu - what's the best way to fix that? I can adjust the overscan for xbmc, but I have no idea how to adjust it for ubuntu.


- JumJum - 2010-03-30 18:36

satch Wrote:That solved the problem, thank you! The only problem now is that I have quite a bit of overscan now within ubuntu - what's the best way to fix that? I can adjust the overscan for xbmc, but I have no idea how to adjust it for ubuntu.

You'll get the best image quality if your TV has a dot-by-dot or or pixel mapping setting. This fixes the overscan in both Ubuntu and XBMC.
Since a few releases back there's also a overscan compensation setting in nvidia-settings. Using this will reduce the image quality slightly.


- bobo1on1 - 2010-03-30 18:49

Overscan is usually a feature of your tv, check the manual.


- satch - 2010-03-30 20:01

Found the setting (was called just scan), everything's fine now Big Grin
Thank you!


- zosky - 2010-03-30 20:29

i ran the script on a fresh xbmcBuntu (r28256) and all went smooth

there's a lot of misconception and confusion around what to do for things to run optimally
& it sounds like you know what you're taking about NerdLaugh

thanks mate


- OcnewB - 2010-04-01 17:52

Your guide / script helped me to finally get rid of THE judder i experienced.
Thank you so much!

However one q:
my asrock is hooked up to my tv via my marantz7002 receiver.
What way should i run the script? Tv directly connected by hdmi and run?
Or should i use the script on the receiver ? And leave the tv out?
Becuz it will produce 2 different xorg's. Which one 2 use?

Thanks!


- Starstream - 2010-04-02 15:48

Did this on my XBMC Live system with Philips TV through Putty and worked fine.

Though to be be honest I never really noticed judder to be begin with & was just curious but everything seems a lot quicker in action 30 rock especially.

One thing does the automatic script sets the XBMC resolution to 1920x1080@60Hz mine was already that.


- TheShortOfIt - 2010-04-02 21:10

Hey guys... using this script too.. changing on 24hz and else works fine but I still have small judder in some movies... every few minutes... like a framerate drop... how can this be?