Linux - HOW-TO achieve perfect playback at 23.97 or 59.94 Hz with NVIDIA GPU hardware

  Thread Rating:
  • 16 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
JunkDeluxe Offline
Junior Member
Posts: 6
Joined: Mar 2010
Reputation: 0
Post: #31
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
find quote
Evanrich Offline
Fan
Posts: 491
Joined: Nov 2008
Reputation: 0
Location: Sunnyvale, CA
Post: #32
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

Board: Zotac ION-A-U Case: M350 Mini ITX Memory: 4GB Patriot PC6400 OS: XBMC on OpenELEC.tv build 6936 on a Corsair 32GB SSD Media Storage: W2K8 running on 14TB RAID 5 on an Asrock board w/ AMD Athlon X2 250 and PERC 6/I controller w/ 8 Samsung HD204UI Green drives Time to interface from power switch: 22.4 seconds.
find quote
JuiceZ Offline
Junior Member
Posts: 12
Joined: Mar 2009
Reputation: 0
Rainbow   
Post: #33
Just wanted to say thanks to OP, that guide worked for me. Cool
find quote
JumJum Offline
Senior Member
Posts: 138
Joined: Jun 2009
Reputation: 7
Post: #34
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.
find quote
JumJum Offline
Senior Member
Posts: 138
Joined: Jun 2009
Reputation: 7
Post: #35
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.
find quote
satch Offline
Junior Member
Posts: 6
Joined: Mar 2010
Reputation: 0
Post: #36
When I try to run the script I get the following error msg:

nvidia.sh: 12: Syntax error: "||" unexpected
find quote
JumJum Offline
Senior Member
Posts: 138
Joined: Jun 2009
Reputation: 7
Post: #37
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
find quote
satch Offline
Junior Member
Posts: 6
Joined: Mar 2010
Reputation: 0
Post: #38
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.
find quote
JumJum Offline
Senior Member
Posts: 138
Joined: Jun 2009
Reputation: 7
Post: #39
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.
find quote
bobo1on1 Offline
cheapass Team-XBMC Developer
Posts: 2,758
Joined: Dec 2008
Reputation: 22
Post: #40
Overscan is usually a feature of your tv, check the manual.
find quote
satch Offline
Junior Member
Posts: 6
Joined: Mar 2010
Reputation: 0
Post: #41
Found the setting (was called just scan), everything's fine now Big Grin
Thank you!
find quote
zosky Offline
Donor
Posts: 304
Joined: Dec 2008
Reputation: 1
Location: toronto. canada
Post: #42
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

eight xbmc devices mostly openElec
atom/ion | iphone4 | hpTouchPad | raspberryPI ...
central mySQL db ( +20TB NAS ) +maraschino +IRtoy.v2 +yatse
[Image: widget]
find quote
OcnewB Offline
Junior Member
Posts: 16
Joined: Jan 2010
Reputation: 0
Post: #43
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!
find quote
Starstream Offline
Donor
Posts: 636
Joined: Apr 2009
Reputation: 16
Post: #44
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.
find quote
TheShortOfIt Offline
Junior Member
Posts: 32
Joined: Mar 2010
Reputation: 0
Post: #45
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?
find quote
Post Reply