• 1
  • 26
  • 27
  • 28(current)
  • 29
  • 30
  • 36
Linux HOW-TO achieve perfect playback at 23.97 or 59.94 Hz with NVIDIA GPU hardware
Okay, not sure what was wrong, but I ran the script again, and everything's working as it should this time.....odd.
Reply
Hi,

Just wanted to say thank you for this script and other pieces, all of my HD blu-ray's full rips work now as do my old dvd collexction Big Grin


This should be placed front and centre on the stick page for XBMC Linux.. It would have saved me an age til 2am most mornings getting it working

Again thank you Smile
Reply
Question 
Ok, so I don't know if this is an issue or not;

I have a Sony X series TV - a few years old now, but in any case it does support 24p beautifully. I've had Win 7 and XBMC running on it well - but recently moved to OpenElec via an ION2 box.

Anyway. It's hooked up via HDMI to an Onkyo 607 - and then to the TV.

I've added the modes manually as suggested by the OP. XBMC runs well. Movies and TV look sweet. No tearing.

BUT

Bluray rips flick to 24p. When I go back to the menu, the TV goes back to 1080. If I watch an SD tv episode, TV flips back to 24p. If I watch a high res tv episode, TV flips back to 24p.

So it would appear that all of my content now wants to run at 24p. It looks good, but is this right?

My modes are;
Modes "1920x1080_60_0" "1920x1080_24" "1280x720_60_0"

Is this normal? Should XBMC really be thinking 24p is the best playback resolution in all cases? Big Grin

Oh - this is on the latest pre-eden OpenElec build.
Reply
Cadriel Wrote:Ok, so I don't know if this is an issue or not;

I have a Sony X series TV - a few years old now, but in any case it does support 24p beautifully. I've had Win 7 and XBMC running on it well - but recently moved to OpenElec via an ION2 box.

Anyway. It's hooked up via HDMI to an Onkyo 607 - and then to the TV.

I've added the modes manually as suggested by the OP. XBMC runs well. Movies and TV look sweet. No tearing.

BUT

Bluray rips flick to 24p. When I go back to the menu, the TV goes back to 1080. If I watch an SD tv episode, TV flips back to 24p. If I watch a high res tv episode, TV flips back to 24p.

You can check the fps of any video with a program called

So it would appear that all of my content now wants to run at 24p. It looks good, but is this right?

My modes are;
Modes "1920x1080_60_0" "1920x1080_24" "1280x720_60_0"

Is this normal? Should XBMC really be thinking 24p is the best playback resolution in all cases? Big Grin

Oh - this is on the latest pre-eden OpenElec build.

Firstly 24p is a refresh rate, not a resolution like 1080p (1920 x 1080).

All Blu-ray rips should be 24p (23.97 fps).
Tv Shows are mostly 24p as well.

I would hazard a guess and say that you have your XBMC menu set at 60Hz, if so this is why you get the "flicking" from the menu to BD rip/tv and vice versa. Basically the TV is adjusting it's refresh rate.

On a PC you can check the fps of any video with a program called Media Info
Reply
I've used this script countless times on Lucid\Karmic, I've got 10.10 Maverick x64 minimal, then unstable 01\11\11 build installed and this happens when doing the "automatic" steps in the OP

Quote:rob@XBMC-Bedroom:~$ 1/6 Backing up settings
-bash: 1/6: No such file or directory
rob@XBMC-Bedroom:~$ cp: cannot stat `/home/rob/.xbmc/userdata/guisettings.xml': No such file or directory
> 2/6 Applying Xorg settings
> 3/6 Restarting Xorg to find available modes
> stop: Unknown instance:
> xbmc-live start/running, process 1716
> sed: can't read /var/log/Xorg.0.log: No such file or directory
> 4/6 Adding 23.97Hz and 59.94Hz to xorg.conf
> sed: can't read /var/log/Xorg.0.log: No such file or directory
> stop: Unknown instance:
> xbmc-live start/running, process 1779
> 5/6 Applying NVIDIA settings
>
> Attribute 'SyncToVBlank' (XBMC-Bedroom:0.0) assigned value 1.
>
> Attribute 'AllowFlipping' (XBMC-Bedroom:0.0) assigned value 1.
>
> Attribute 'FSAAAppControlled' (XBMC-Bedroom:0.0) assigned value 1.
>
> Attribute 'OpenGLImageSettings' (XBMC-Bedroom:0.0) assigned value 3.
>
> Attribute 'LogAniso' (XBMC-Bedroom:0.0) assigned value 0.
>
> Attribute 'GPUScaling' (XBMC-Bedroom:0.0, display device: DFP-1) assigned
> value 1,1.
>
> 6/6 Applying XBMC settings
> sed: can't read /home/rob/.xbmc/userdata/guisettings.xml: No such file or directory
> sed: can't read /home/rob/.xbmc/userdata/guisettings.xml: No such file or directory
> sed: can't read /home/rob/.xbmc/userdata/guisettings.xml: No such file or directory
> sed: can't read /home/rob/.xbmc/userdata/guisettings.xml: No such file or directory
> sed: can't read /home/rob/.xbmc/userdata/guisettings.xml: No such file or directory
> sed: can't read /home/rob/.xbmc/userdata/guisettings.xml: No such file or directory
> --- All done

Any ideas?

Thanks Smile

edit - this was under my account, tried logging in to the XBMC created account and it seems to work still get the bolded error, can't quite remember if that is normal though, it may well be?
Reply
I was getting the same errors as a few others, where xrandr kept returning the following errors:

Rate 24.0 Hz not available for this size
Rate 60.0 Hz not available for this size

Even though I could use nvidia-settings to manually change to those refresh rates! No matter what steps I took, I couldn't get xrandr to see anything except 50hz. I spent a while trying to get modelines working but didn't have much luck either.

In the end, this is how I solved my problem:

Removed xorg.conf
Ran nvidia-xconfig to generate a new one
Edited the xorg.conf and replaced the Device, Screen and Extensions sections with the ones posted at the start of this thread
Followed the rest of the guide

Important:
These steps alone would not work - the key was changing the refresh rates. Although the xorg log reported the following refresh rates
HorizSync : 15.000-68.000 kHz
VertRefresh : 23.000-61.000 Hz

I needed to use the refresh rates from my TV's manual, which are
HorizSync 31.0 - 69.0
VertRefresh 59.0 - 86.0

I saved xorg.conf, rebooted and everything worked perfectly.

For reference I am using an Asus GT520 and Panasonic TH-P54VT20A.
One more point is that I connected the HDMI directly from the PC to the TV during this process, to avoid the AVR complicating matters. After it was all working, I put it back through the AVR and all still working.

Hope this helps someone, as it took me ages to figure it out, but looking great now!
Cheers

Here is my xorg.conf

Code:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 270.41.06  ([email protected])  Mon Apr 18 15:15:12 PDT 2011

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

Section "Files"
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      "Unknown"
    HorizSync       31.0 - 69.0
    VertRefresh     59.0 - 86.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
        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     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    Modes "1920x1080_60_0" "1920x1080_24"
    EndSubSection
EndSection

Section "Extensions"
        Option  "Composite"           "false"
EndSection
Reply
The Script is outdatet. It does not work with Pre-Eden Builds.

My Problem is that i switched my tv set but the edid that the script reads are the edids from my old tv. Is there a methode to reset and get the edids from my new tv set?

I deleted the old xorg.0.log but after a reboot x does not create a new one...
Reply
it does not work with eden builds

how can I solve this? please help!

below info:
sh nvidia.sh
1/6 Backing up settings
2/6 Applying Xorg settings
3/6 Restarting Xorg to find available modes
stop: Unknown instance:
xbmc-live start/running, process 1967
4/6 Adding 23.97Hz and 59.94Hz to xorg.conf
stop: Unknown instance:
xbmc-live start/running, process 2079
5/6 Applying NVIDIA settings
Reply
update:

actually it does work after a reboot, it just cannot stop xorg...
i can play after a reboot on 24hz..

gjergji Wrote:it does not work with eden builds

how can I solve this? please help!

below info:
sh nvidia.sh
1/6 Backing up settings
2/6 Applying Xorg settings
3/6 Restarting Xorg to find available modes
stop: Unknown instance:
xbmc-live start/running, process 1967
4/6 Adding 23.97Hz and 59.94Hz to xorg.conf
stop: Unknown instance:
xbmc-live start/running, process 2079
5/6 Applying NVIDIA settings
Reply
as I am using ubuntu oneiric 11.10 which uses lightdm I simply modified the script, changing the script twice from
Quote:if [ -f /var/run/gdm.pid ]; then
sudo service gdm restart

to
Quote:if [ -f /var/run/lightdm.pid ]; then
sudo /etc/init.d/lightdm restart

after running the script, I have new entries in /etc/X11/xorg.conf as well as a the following:
# - Modes in ModePool for SAMSUNG (DFP-0) ---
# vidia-auto-select" : 1920 x 1080 @ 60.0 Hz
# 920x1080" : 1920 x 1080 @ 60.0 Hz
# 920x1080_60" : 1920 x 1080 @ 60.0 Hz
# 920x1080_60_0" : 1920 x 1080 @ 59.94/60 Hz (CEA-861B Format 16)
# 920x1080_50" : 1920 x 1080 @ 50.0 Hz
[...]
# - End of ModePool for SAMSUNG (DFP-0): ---
so I assume with all supported lines of my display as it seems, so I assume this works just fine, just wanted to share this
Reply
Hello and thanks for this nice tutorial.

I currently have a problem with overscanning on my TV. It's a LG 42PC1R, HD Ready, no 24hz.
Using your tutorial, I wanted to set my box to output 720p or 1080i (I tried both), I have overscanning problem on both resolution.

Here are the settings accepted from the EDID of the TV:
Code:
--- Modes in ModePool for LG Electronics 42PC1R-ZH (DFP-0) ---
"nvidia-auto-select" : 1024 x  768 @  60.0 Hz  (from: EDID)
"1920x1080"          : 1920 x 1080 @ 59.94/60 Hz (CEA-861B Format 5) (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)
"1280x1024"          : 1280 x 1024 @  60.0 Hz  (from: EDID)
"1280x1024_60"       : 1280 x 1024 @  60.0 Hz  (from: EDID)
"1280x768"           : 1280 x  768 @  74.9 Hz  (from: EDID)
"1280x768_75"        : 1280 x  768 @  74.9 Hz  (from: EDID)
"1280x720"           : 1280 x  720 @ 59.94/60 Hz (CEA-861B Format 4) (from: EDID)
"1280x720_60"        : 1280 x  720 @ 59.94/60 Hz (CEA-861B Format 4) (from: EDID)
"1280x720_50"        : 1280 x  720 @ 50 Hz (CEA-861B Format 19) (from: EDID)
"1024x768"           : 1024 x  768 @  60.0 Hz  (from: EDID)
"1024x768_60"        : 1024 x  768 @  60.0 Hz  (from: EDID)
"1024x768_75"        : 1024 x  768 @  75.0 Hz  (from: EDID)
"1024x768_70"        : 1024 x  768 @  70.1 Hz  (from: EDID)
"800x600"            :  800 x  600 @  75.0 Hz  (from: EDID)
"800x600_75"         :  800 x  600 @  75.0 Hz  (from: EDID)
"800x600_72"         :  800 x  600 @  72.2 Hz  (from: EDID)
"800x600_60"         :  800 x  600 @  60.3 Hz  (from: EDID)
"720x576"            :  720 x  576 @ 50 Hz (CEA-861B Format 17) (from: EDID)
"720x576_50"         :  720 x  576 @ 50 Hz (CEA-861B Format 17) (from: EDID)
"720x480"            :  720 x  480 @ 59.94/60 Hz (CEA-861B Format 2) (from: EDID)
"720x480_60"         :  720 x  480 @ 59.94/60 Hz (CEA-861B Format 2) (from: EDID)
"640x480"            :  640 x  480 @  75.0 Hz  (from: EDID)
"640x480_75"         :  640 x  480 @  75.0 Hz  (from: EDID)
"640x480_73"         :  640 x  480 @  72.8 Hz  (from: EDID)
"640x480_60"         :  640 x  480 @ 59.94/60 Hz Interlace (CEA-861B Format 1) (from: EDID)
--- End of ModePool for LG Electronics 42PC1R-ZH (DFP-0): ---

I have tried with xorg.conf to use 1920x1080_50i or 1280x720_50 (I'm in France and 50hz is the default here).
Anyway, with those resolutions, I have a lot of overscanning, everywhere around the screen! So I tried with modelines, but the problem is the same (from what I've understood, modelines is used to move the picture, not to resize it (since I want to use 1280x720)).

Since I dont have settings for overscan and 1:1 pixel on my TV, the solution I have found atm is to use the overscanning compensation of nvidia-settings, its set to 90.

My xorg.conf:
Code:
...
Section "Monitor"
  Identifier  "MonitorPlasmaLG"
  VendorName  "LG"
  ModelName   "LG Electronics 42PC1R-ZH"
EndSection

Section "Device"
        Identifier "nvidia"
        Driver  "nvidia"
        VendorName     "NVIDIA Corporation"
        BoardName      "ION"
        Option  "NoLogo"              "true"
        Option  "DynamicTwinView"     "false"
        Option  "NoFlip"              "false"
        Option  "FlatPanelProperties" "Scaling = Native"
        Option  "ModeValidation"      "NoVesaModes, NoXServerModes"
        Option  "UseDisplayDevice"    "DFP-0"
        Option  "ModeDebug"           "true"
        Option  "HWCursor"            "false"
EndSection

Section "Screen"
        Identifier      "ScreenPlasmaLG"
        Monitor         "MonitorPlasmaLG"
        Device          "nvidia"
        SubSection      "Display"
                Modes "1280x720_50"
        EndSubSection
EndSection

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


Does anyone have another solution than using nvidia overscanning compensation & keeping same resolution (720p, I think its better for movies) ?
Reply
eldo Wrote:I was getting the same errors as a few others, where xrandr kept returning the following errors:

Rate 24.0 Hz not available for this size
Rate 60.0 Hz not available for this size

Even though I could use nvidia-settings to manually change to those refresh rates! No matter what steps I took, I couldn't get xrandr to see anything except 50hz. I spent a while trying to get modelines working but didn't have much luck either.

In the end, this is how I solved my problem:

Removed xorg.conf
Ran nvidia-xconfig to generate a new one
Edited the xorg.conf and replaced the Device, Screen and Extensions sections with the ones posted at the start of this thread
Followed the rest of the guide

Important:
These steps alone would not work - the key was changing the refresh rates. Although the xorg log reported the following refresh rates
HorizSync : 15.000-68.000 kHz
VertRefresh : 23.000-61.000 Hz

I needed to use the refresh rates from my TV's manual, which are
HorizSync 31.0 - 69.0
VertRefresh 59.0 - 86.0

I saved xorg.conf, rebooted and everything worked perfectly.

For reference I am using an Asus GT520 and Panasonic TH-P54VT20A.
One more point is that I connected the HDMI directly from the PC to the TV during this process, to avoid the AVR complicating matters. After it was all working, I put it back through the AVR and all still working.

Hope this helps someone, as it took me ages to figure it out, but looking great now!
Cheers

Here is my xorg.conf

Code:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 270.41.06  ([email protected])  Mon Apr 18 15:15:12 PDT 2011

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

Section "Files"
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      "Unknown"
    HorizSync       31.0 - 69.0
    VertRefresh     59.0 - 86.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
        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     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    Modes "1920x1080_60_0" "1920x1080_24"
    EndSubSection
EndSection

Section "Extensions"
        Option  "Composite"           "false"
EndSection
That worked beautifully! Thanks.Big Grin
Reply
First of all: Thank you for this tutorial! Big Grin

I used to have Windows 7 with XBMC and it worked brillianty, but for the sake of supporting open source software I switched to Ubuntu 11.04 with XBMC pre-eden.

Under Windows the TV (Panasonic TX-P46U20) would switch automatically with source input to the correct freq. with this setting in XBMC. However under Ubuntu it didn't. So I started reading about modelines and I created a beautiful xorg.conf with all the supported modelines I could come up with... but still I didn't have smooth playback.

Untill I found this topic and decided that the approach in the topicstart was better, so I followed it and hoped that I would get buttersmooth playback. All my setting were correct and the 24Hz and 60Hz settings would report back 23.97Hz and 59.94Hz and XBMC would switch correctly to these freqs. However, I still didn't have smooth playback although no frames were dropped. I would see however that the fps of the movie/series was far from constant and would switch between ~22fps and ~25fps for a 23.97fps source.

I was so fed up with it that I almost reinstalled Windows 7... :mad:

Last saturday I decided to read this entire topic for more information and noticed that some people saw a improvement when they turned off "flipping" in their drivers. So I tried this and now the fps of a source is much more stable. But more importantly, the playback is perfect! Without judder etc. I have no idea what this setting does and why it works. But maybe more people can benefit from this info.

Setup:
Panasonic TX-P46U20
Nvidia 430GT card with proprietary drivers
connected directly through HDMI
Ubuntu 11.04
XBMC pre-eden
Reply
I'm using a computer monitor (Acer 26" LCD) with XBMC, am I affected by this? How can I tell? My playback seems perfectly fine, but just curious. Thanks.
Reply
I guess if your playback is fine then don't start messing with it Big Grin

My playback had small glitches, about 2-3 a minute where the video seemed to pause or hickup without frame loss. It drove me crazy but my boyfriend didn't seem to notice.
Reply
  • 1
  • 26
  • 27
  • 28(current)
  • 29
  • 30
  • 36

Logout Mark Read Team Forum Stats Members Help
HOW-TO achieve perfect playback at 23.97 or 59.94 Hz with NVIDIA GPU hardware16