[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)
HOW-TO achieve perfect playback at 23.97 or 59.94 Hz with NVIDIA GPU hardware - JumJum - 2010-03-17 16:12
OUTDATED with NVidia driver 302.17!!!!!
(It has support for xrandr 1.2/1.3 and can distinguish between 23.976 and 24)
Howto achieve judder free perfectly synced playback.
Since there's a lot of misinformation in the forum about how xorg display modes works, I though I'd post a howto and explain how to do it the (in my opinion) right way.
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.
To check how ~24 and ~60 Hz modes are currently handled on your setup you can run the following command:
(XBMC Live doesn't have libgtk, which is required by nvidia-settings. Either check the refresh inside XBMC instead by pausing a video and pressing "o", or run "sudo apt-get install libgtk2.0-0".)
The steps needed to set everything up are:
All the steps can be performed automatically by dropping to a shell by pressing CTRL-ALT-F1 and running this script either by using copy & paste to an empty file
or by downloading it using:
The script has been tested on
If you don't trust my bash scripting skills. (Nobody's perfect... ) Here's how to do it step by step:
Backing up your current settings
This is all that is needed. Don't use options you don't understand! Explanations to all the options can be found in the NVIDIA drivers manual.
The ModeDebug option makes the nvidia driver print all the available modes to Xorg's log file.
2. Finding what modes the TV says it supports in it's EDID.
Now that ModeDebug is enabled Xorg needs to be restarted so the available modes will be written to the log file.
Hook up your HDMI cable and restart Xorg.
Open up modes.txt and /etc/X11/xorg.conf in your favourite editor.
My TV supports both both 60 and 59.94 Hz. The left column is the name of the mode. As you can see both modes have names that start with "1920x1080_60". Since xrandr can't have two ~60 Hz modes available at the same time, we need to tell it to use the 59.94 Hz mode when switching to a ~60 Hz refresh rate. Same needs to be done with the ~24 Hz mode.
The two modes I want are called "1920x1080_60_0" and "1920x1080_24_0" since they provide the correct refresh rates. To enable these, paste the names of the modes to the Modes-line of /etc/X11/xorg.conf replacing the current setting. The first mode on the line will be your default mode. In my case it looks like this when done:
To enable all the right and disable all the wrong options in the drivers you can run this command: (Not needed on XBMC Live)
5. Adjusting the settings in XBMC.
In XBMC you want to set "Render method" to Auto, "Use pixel buffer objects" to On, "Adjust display refresh..." to On, "Sync playback to display" to On, A/V sync method to "Audio" and "Vertical blank sync" to Always.
Voila, XBMC now automatically switches between 23.97, 50, and 59.94 Hz for 23.97, 25 and 29.97 FPS content respectively.
Two settings that you might want to try if you run into trouble is setting "Sync playback to display" to Off in XBMC and/or change NoFlip to "false" in /etc/X11/xorg.conf.
Restoring your previous settings
Your Xorg settings:
Forcing target refresh rates for ranges of source fps
- finite3 - 2010-03-18 10:33
Thanks - for reference sake, the script ran just fine under xbmcfreak v11 live.
- Ayla - 2010-03-18 13:07
In the other thread recovered, it says that: ""Sync playback to display" to On, A/V sync method to "Audio"" should be OFF, because it speeds up 23.976 to 24.000.
Here it says it should be ON.
What is the correct way to do it?
- JumJum - 2010-03-18 13:57
That was incorrect information. It does not speed up the video at all.
This is the correct way to do it.
- Ayla - 2010-03-18 14:16
Thanks for that, I will try it when I get home!
The only problem I have is, that I need to set a sound delay of 200ms for all my movies to be in sync, but when I save it with "Set as default for all movies", it only lasts until XBMC restarts... then it forgets the 200ms delay setting and resets it to zero.
Anyone else experiencing that?
PS. I only need the 200ms delay for 23.976hz movies (not 50hz videos). That's a bit strange!?
- Ayla - 2010-03-18 14:23
Another problem I have is that sometimes XBMC doesn't switch back to 1080p@60hz resolution when I stop a movie.
I always use 1080p@60hz when browsing in XBMC and when I start a 23.976hz movie, the resolution switches like it should to 1080p@24hz.
Then I press Stop and return to the menu and once in a while XBMC stays in 1080p@24hz instead of switching back to 1080p@60hz.
This is rather annoying as I have to go to Settings and switch back to 1080p@60hz manually every time.
Anyone else experiencing this or have a solution?
- JumJum - 2010-03-18 14:33
Ayla Wrote:Thanks for that, I will try it when I get home!
Works fine here.
You can check if it's saved at all with:
Also, make a backup of guisettings.xml and see if the problem still exists after xbmc creates a fresh one. I once had a similar issue but with screen calibration settings.
Create a new thread for this issue if that doesn't work.
- bobo1on1 - 2010-03-18 14:45
Ayla Wrote:Another problem I have is that sometimes XBMC doesn't switch back to 1080p@60hz resolution when I stop a movie.
What revision are you running?
- Ayla - 2010-03-18 15:49
bobo1on1 Wrote:What revision are you running?
I'm using the latest "safe" build, r28256.
- coupas - 2010-03-18 17:54
I just wanted to say thanks for this post. It saved me a lot of time and everything works pretty good for me now. Not perfect, but good enough.