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
dan991199 Offline
Member
Posts: 56
Joined: Mar 2010
Reputation: 0
Post: #16
thank you for this!

this solved a problem that was plaguing me. this should be sticky'd!
find quote
JumJum Offline
Senior Member
Posts: 138
Joined: Jun 2009
Reputation: 7
Post: #17
johnskiller Wrote:which refresh rate should I use for 29.97 movie? 1920x1080_30 or 1920x1080_0? Also if my tv support 25Hz, should I use it instead of 50Hz for some PAL TV show?

I have a movie that has lots of jutter and tear when use 24Hz, but played well when use 60Hz. the movie is 24p(or 23.97, not sure), any idear?

Using a 59.94 Hz mode is your best option for a 29.97 fps movie. On many tvs the video looks smoother, and you also get smother animations in the menus. Same applies to 25 vs 50 Hz.

Could be many reasons behind the issue with 24 Hz. If it's not fixed by performing the steps in the guide, post some more info about your setup.
(This post was last modified: 2010-03-20 14:55 by JumJum.)
find quote
xbmcliveuser Offline
Junior Member
Posts: 46
Joined: Jan 2010
Reputation: 0
Post: #18
Just a data point here. You said:

Quote:First of all, modelines are not a the magic solution to all your problems. Modelines are only needed with tv's that have faulty EDID information. Most TVs provide the correct modes for 29.97/59.94 Hz, but the modes are not used by xrandr by default, so XBMC can't see that they are available.

I wanted to note that I just ran into one case where a ModeLine seemed to be necessary (okay, maybe not necessary if the only software you are using is XBMC, but certainly desirable if you want to use the Ubuntu desktop, or any other software that doesn't have built-in overscan correction like XBMC does). That was on a Sharp TV that had a serious overscan issue, and apparently no "pixel by pixel" option. To make a long story short, after putting the TV model number and the word "overscan" in Google, you arrive at this page, which describes how a ModeLine is used to emulate the "CVT reduced blank" option that is apparently available on a Windows machine. Those instructions are ONLY for that particular model TV, but it makes me wonder if perhaps there are other TV's that may look at timing parameters to determine whether to make the "dot by dot" or "pixel by pixel" option visible, or usable (not grayed out).

Maybe it's my imagination, but to me the picture seemed a bit sharper when we could get the "Dot by Dot" option to work on that TV, and did not have to use the overscan correction in XBMC.

The one issue I had was that we did try JumJum's script, but in the end still had to put back the custom xorg.conf file from the above-linked article in order to get the "dot by dot" option to reappear. I wonder if only some small part of that xorg.conf could be cut and pasted into the xorg.conf returned by the script, to get the benefits of the script along with the making the "dot by dot" option available.
find quote
JumJum Offline
Senior Member
Posts: 138
Joined: Jun 2009
Reputation: 7
Post: #19
xbmcliveuser Wrote:Just a data point here. You said:

I wanted to note that I just ran into one case where a ModeLine seemed to be necessary (okay, maybe not necessary if the only software you are using is XBMC, but certainly desirable if you want to use the Ubuntu desktop, or any other software that doesn't have built-in overscan correction like XBMC does). That was on a Sharp TV that had a serious overscan issue, and apparently no "pixel by pixel" option. To make a long story short, after putting the TV model number and the word "overscan" in Google, you arrive at this page, which describes how a ModeLine is used to emulate the "CVT reduced blank" option that is apparently available on a Windows machine. Those instructions are ONLY for that particular model TV, but it makes me wonder if perhaps there are other TV's that may look at timing parameters to determine whether to make the "dot by dot" or "pixel by pixel" option visible, or usable (not grayed out).

Maybe it's my imagination, but to me the picture seemed a bit sharper when we could get the "Dot by Dot" option to work on that TV, and did not have to use the overscan correction in XBMC.

The one issue I had was that we did try JumJum's script, but in the end still had to put back the custom xorg.conf file from the above-linked article in order to get the "dot by dot" option to reappear. I wonder if only some small part of that xorg.conf could be cut and pasted into the xorg.conf returned by the script, to get the benefits of the script along with the making the "dot by dot" option available.

I would still call this a faulty EDID though, since it does work with a modeline and that mode is not available in the EDID. Had the manufacturer supplied the proper modes in the EDID it would have worked out of the box.

It's not your imagination. The image is sharper when your use pixel mapping or dot by dot since no resizing of the image occurs.

You can use your working xorg.conf, but replace the Device section with the one from the guide. Then, in the new device section, change the Identifier value to the value from your working config and change the ModeValidation setting to "NoVesaModes, NoXServerModes, NoEdidModes"

This is just off the top of my head, but it should work.
find quote
Ayla Offline
Fan
Posts: 607
Joined: Feb 2008
Reputation: 0
Post: #20
JumJum,

I have set my system up with your script and I use 1080p@60Hz in the XBMC menus, for smoother browsing.

But, after my HTPC (XBMC) has been suspended (sleep) and resumed, it always defaults to 1080p@24Hz.

Any way I can change that?
find quote
sdsnyr94 Offline
Fan
Posts: 492
Joined: Aug 2009
Reputation: 2
Location: Greensboro, NC
Post: #21
I used to have a setting in my old xorg.conf to change the Gamma setting. It was listed under the "monitor" section, which does not exist in the one created using this script. I have tried to add it, but cannot get the setting to be recognized.

I can use the xgamma command to set it, but I lose that setting on a reboot. Any Ideas?
find quote
dinozzo Offline
Junior Member
Posts: 13
Joined: Mar 2010
Reputation: 0
Post: #22
Hi. Im a little confused. I have followed the manual guide and when playing an mkv and bringing up the info pane it shows the video as 23.97 fps but the refresh rate is 24Hz. Shouldnt the refresh rate be 23.97 too so that its perfectly in sync and eliminate tearing? It seems odd the the modeline has 23.97/24 Hz and not solely 23.97. How can it tell which one to use? it uses 24hz everytime?

My available modes look like this from my Samsung TV

# --- Modes in ModePool for SAMSUNG (DFP-1) ---
# "nvidia-auto-select" : 1920 x 1080 @ 60.0 Hz
# "1920x1080" : 1920 x 1080 @ 60.0 Hz
# "1920x1080_60" : 1920 x 1080 @ 60.0 Hz
# "1920x1080_60_0" : 1920 x 1080 @ 59.94/60 Hz (CEA-861B Format 16)
# "1920x1080_50" : 1920 x 1080 @ 50 Hz (CEA-861B Format 31)
# "1920x1080_30" : 1920 x 1080 @ 29.97/30 Hz (CEA-861B Format 34)
# "1920x1080_25" : 1920 x 1080 @ 25 Hz (CEA-861B Format 33)
# "1920x1080_24" : 1920 x 1080 @ 23.97/24 Hz (CEA-861B Format 32)
# "1920x1080_60i" : 1920 x 1080 @ 59.94/60 Hz (CEA-861B Format 5)
# "1920x1080_50i" : 1920 x 1080 @ 50.0 Hz Interlace

And my xorg.conf looks like this

Section "Device"
Identifier "nvidia"
Driver "nvidia"
Option "NoLogo" "true"
Option "DynamicTwinView" "false"
Option "NoFlip" "false"
Option "FlatPanelProperties" "Scaling = Native"
Option "ModeValidation" "NoVesaModes, NoXServerModes"
Option "UseDisplayDevice" "DFP-1"
Option "ModeDebug" "true"
Option "HWCursor" "false"
EndSection

Section "Screen"
Identifier "screen"
Device "nvidia"
SubSection "Display"
Modes "1920x1080_60_0" "1920x1080_24"
EndSubSection
EndSection

Section "Extensions"
Option "Composite" "false"
EndSection
find quote
JumJum Offline
Senior Member
Posts: 138
Joined: Jun 2009
Reputation: 7
Post: #23
dinozzo Wrote:Hi. Im a little confused. I have followed the manual guide and when playing an mkv and bringing up the info pane it shows the video as 23.97 fps but the refresh rate is 24Hz. Shouldnt the refresh rate be 23.97 too so that its perfectly in sync and eliminate tearing? It seems odd the the modeline has 23.97/24 Hz and not solely 23.97. How can it tell which one to use? it uses 24hz everytime?

My available modes look like this from my Samsung TV

# --- Modes in ModePool for SAMSUNG (DFP-1) ---
# "nvidia-auto-select" : 1920 x 1080 @ 60.0 Hz
# "1920x1080" : 1920 x 1080 @ 60.0 Hz
# "1920x1080_60" : 1920 x 1080 @ 60.0 Hz
# "1920x1080_60_0" : 1920 x 1080 @ 59.94/60 Hz (CEA-861B Format 16)
# "1920x1080_50" : 1920 x 1080 @ 50 Hz (CEA-861B Format 31)
# "1920x1080_30" : 1920 x 1080 @ 29.97/30 Hz (CEA-861B Format 34)
# "1920x1080_25" : 1920 x 1080 @ 25 Hz (CEA-861B Format 33)
# "1920x1080_24" : 1920 x 1080 @ 23.97/24 Hz (CEA-861B Format 32)
# "1920x1080_60i" : 1920 x 1080 @ 59.94/60 Hz (CEA-861B Format 5)
# "1920x1080_50i" : 1920 x 1080 @ 50.0 Hz Interlace

And my xorg.conf looks like this

Section "Device"
Identifier "nvidia"
Driver "nvidia"
Option "NoLogo" "true"
Option "DynamicTwinView" "false"
Option "NoFlip" "false"
Option "FlatPanelProperties" "Scaling = Native"
Option "ModeValidation" "NoVesaModes, NoXServerModes"
Option "UseDisplayDevice" "DFP-1"
Option "ModeDebug" "true"
Option "HWCursor" "false"
EndSection

Section "Screen"
Identifier "screen"
Device "nvidia"
SubSection "Display"
Modes "1920x1080_60_0" "1920x1080_24"
EndSubSection
EndSection

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

The info inside XBMC shows 24 Hz even if it's running at 23.97 Hz.

To check the current refresh, pause the video and bring up the info. The fps to the left is synced to the screen refresh, so it should show 23.97 and not 24.00. Again, you have to pause the video.

The 23.97 Hz modes are often (if not always) called 23.97/24 Hz for reasons unknown to me.
find quote
JumJum Offline
Senior Member
Posts: 138
Joined: Jun 2009
Reputation: 7
Post: #24
sdsnyr94 Wrote:I used to have a setting in my old xorg.conf to change the Gamma setting. It was listed under the "monitor" section, which does not exist in the one created using this script. I have tried to add it, but cannot get the setting to be recognized.

I can use the xgamma command to set it, but I lose that setting on a reboot. Any Ideas?

For the monitor section to be used, you also need a screen section that specifies which other sections should be used.

Copy and paste your old screen section to your new xorg.conf and check to make sure the name of the device line match the name of the device section in the new xorg.conf.
find quote
JumJum Offline
Senior Member
Posts: 138
Joined: Jun 2009
Reputation: 7
Post: #25
Ayla Wrote:JumJum,

I have set my system up with your script and I use 1080p@60Hz in the XBMC menus, for smoother browsing.

But, after my HTPC (XBMC) has been suspended (sleep) and resumed, it always defaults to 1080p@24Hz.

Any way I can change that?

Is 24 Hz your default mode in Xorg? It's hard to say without knowing anything about your setup, but my guess is the first mode in your Modes line in xorg.conf is a _24 mode. If so, put a _60 mode before the _24 mode.
find quote
erhnam Offline
Team-XBMC Live Developer
Posts: 673
Joined: May 2009
Reputation: 2
Location: The Netherlands
Post: #26
JumJum Wrote:[SIZE="5"]If you don't have any 23.97 or 59.94 modes here, that's when you need to use modelines instead! Use the test command in the beginning of the post to see if your modelines work as expected. Then continue with step 4.

Is it possible to combine one and another? Use modes and modelines?

My rates look like this. Which one should I take?

Code:
"nvidia-auto-select" : 1920 x 1080 @  50.0 Hz  (from: EDID)
"1920x1080"          : 1920 x 1080 @  50.0 Hz  (from: EDID)
"1920x1080_50"       : 1920 x 1080 @  50.0 Hz  (from: EDID)
"1920x1080_60"       : 1920 x 1080 @  60.0 Hz  (from: EDID)
"1920x1080_60_0"     : 1920 x 1080 @ 59.94/60 Hz (CEA-861B Format 16) (from: EDID)
"1920x1080_60_1"     : 1920 x 1080 @  59.9 Hz  (from: X Server)
"1920x1080_24"       : 1920 x 1080 @ 23.97/24 Hz (CEA-861B Format 32) (from: EDID)
"1920x1080_60i"      : 1920 x 1080 @ 59.94/60 Hz (CEA-861B Format 5) (from: EDID)
"1920x1080_50i"      : 1920 x 1080 @ 50 Hz Interlace (CEA-861B Format 20) (from: EDID)
find quote
JumJum Offline
Senior Member
Posts: 138
Joined: Jun 2009
Reputation: 7
Post: #27
erhnam Wrote:Is it possible to combine one and another? Use modes and modelines?

My rates look like this. Which one should I take?

Code:
"nvidia-auto-select" : 1920 x 1080 @  50.0 Hz  (from: EDID)
"1920x1080"          : 1920 x 1080 @  50.0 Hz  (from: EDID)
"1920x1080_50"       : 1920 x 1080 @  50.0 Hz  (from: EDID)
"1920x1080_60"       : 1920 x 1080 @  60.0 Hz  (from: EDID)
"1920x1080_60_0"     : 1920 x 1080 @ 59.94/60 Hz (CEA-861B Format 16) (from: EDID)
"1920x1080_60_1"     : 1920 x 1080 @  59.9 Hz  (from: X Server)
"1920x1080_24"       : 1920 x 1080 @ 23.97/24 Hz (CEA-861B Format 32) (from: EDID)
"1920x1080_60i"      : 1920 x 1080 @ 59.94/60 Hz (CEA-861B Format 5) (from: EDID)
"1920x1080_50i"      : 1920 x 1080 @ 50 Hz Interlace (CEA-861B Format 20) (from: EDID)

You should be good with "1920x1080_60_0" and "1920x1080_24". I don't think you'll need to use modelines.

I'd use modelines only instead of combining modelines and modes. You can find the modelines for these two modes in your /var/log/Xorg.0.log
find quote
erhnam Offline
Team-XBMC Live Developer
Posts: 673
Joined: May 2009
Reputation: 2
Location: The Netherlands
Post: #28
JumJum Wrote:You should be good with "1920x1080_60_0" and "1920x1080_24". I don't think you'll need to use modelines.

I'd use modelines only instead of combining modelines and modes. You can find the modelines for these two modes in your /var/log/Xorg.0.log

Thanks for your answer, I'll give it a try!
find quote
Fliposide Offline
Junior Member
Posts: 24
Joined: Mar 2010
Reputation: 0
Post: #29
Will this script work for an ACER Aspire R3600 ION?

Fliposide
Smile
find quote
ferry Offline
Member
Posts: 62
Joined: Apr 2009
Reputation: 0
Post: #30
How do I get the | symbol using a UK keyboard? It shows as a > symbol on the screen

Thanks
find quote
Post Reply