[mythtv-users] XFree86 at 60%cpu when "Use GUI size for playback"

Daniel Walton dwalton at cisco.com
Mon Aug 7 19:06:56 UTC 2006


On Mon, 7 Aug 2006, Robin Hill wrote:

> On Mon Aug 07, 2006 at 02:08:40AM -0400, Daniel Walton wrote:
>
> > I'm using a 1080i modeline that has a fair amount of overscan so I use
> > the "Use GUI size for playback" option.  This works but I've noticed
> > that when I enable this feature XFree86 chews up a ton of cpu, it
> > normally spikes up to 60%.
> >
> > Is this normal?
> >
> This'll be pretty normal, yes - you're making X scale the video output
> from its native resolution (1920x1080) to whatever size your GUI is set
> to.  This is a pretty intensive process, hence the CPU load.

hmmm, looks like I need to retract my original statement because I'm seeing the
XFree86 at 60%cpu even after I turned off "Use GUI size for playback".  I'm
testing by playing back last night's NFL preseason game, after I watch about 5
seconds of video XFree86 goes nuts:

Tasks:  89 total,   3 running,  86 sleeping,   0 stopped,   0 zombie
Cpu(s): 35.3% us, 60.8% sy,  0.0% ni,  2.0% id,  0.0% wa,  0.0% hi,  2.0% si
Mem:   1033024k total,   794368k used,   238656k free,    28204k buffers
Swap:  1959920k total,    54208k used,  1905712k free,   382284k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 5736 root      15   0  109m  97m  18m R 61.4  9.7   0:23.65 XFree86
 5791 mythtv    15   0  341m 182m  36m S 35.6 18.1   0:22.17 mythfrontend
    1 root      16   0   156   48   24 S  0.0  0.0   0:01.59 init
    2 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/0


/var/log/XFree86.0.log added the following when I started playing the show:

GetModeLine - scrn: 0 clock: 74520
GetModeLine - hdsp: 1920 hbeg: 1952 hend: 2016 httl: 2208
              vdsp: 1080 vbeg: 1084 vend: 1096 vttl: 1126 flags: 26
GetModeLine - scrn: 0 clock: 74520
GetModeLine - hdsp: 1920 hbeg: 1952 hend: 2016 httl: 2208
              vdsp: 1080 vbeg: 1084 vend: 1096 vttl: 1126 flags: 26

but after that nothing, no signs of any problems.  The show plays back without
stuttering so this isn't a critical problem but it would be nice to free up
those CPU cycles.  Is there a way to enable more detailed logging for XFree86?

Other details:

- Nvidia FX5200 with 8762 drivers
- I'm using a 1080i modeline from Jarod's How-to
- I'm using XvMC and I've enabled the hack for full color OSD
http://www.mythtv.org/wiki/index.php/XvMC#Greyscale_OSD_.28NVidia_4_.26_5.29
- Here is my XF86Config-4 file

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 1.0  (buildmeister at builder3)  Mon May 15 13:23:42 PDT
2006

# Auto-generated by KNOPPIX mkxf86config

Section "ServerLayout"

# PS/2 Mouse using /dev/input/mice in Kernel 2.6
# Serial Mouse not detected
    Identifier     "XFree86 Configured"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "USB Mouse" "CorePointer"
EndSection
Section "Files"

# Additional fonts: Locale, Gimp, TTF...
#       FontPath     "/usr/X11R6/lib/X11/fonts/latin2/75dpi"
#       FontPath     "/usr/X11R6/lib/X11/fonts/latin2/100dpi"
# True type and type1 fonts are also handled via xftlib, see /etc/X11/XftConfig!
    RgbPath         "/usr/X11R6/lib/X11/rgb"
    ModulePath      "/usr/X11R6/lib/modules"
    FontPath        "/usr/X11R6/lib/X11/fonts/misc:unscaled"
    FontPath        "/usr/X11R6/lib/X11/fonts/misc"
    FontPath        "/usr/X11R6/lib/X11/fonts/75dpi:unscaled"
    FontPath        "/usr/X11R6/lib/X11/fonts/75dpi"
    FontPath        "/usr/X11R6/lib/X11/fonts/100dpi:unscaled"
    FontPath        "/usr/X11R6/lib/X11/fonts/100dpi"
    FontPath        "/usr/X11R6/lib/X11/fonts/Speedo"
    FontPath        "/usr/X11R6/lib/X11/fonts/PEX"
    FontPath        "/usr/X11R6/lib/X11/fonts/cyrillic"
    FontPath        "/usr/X11R6/lib/X11/fonts/Type1"
    FontPath        "/usr/share/fonts/ttf/western"
    FontPath        "/usr/share/fonts/ttf/decoratives"
    FontPath        "/usr/share/fonts/truetype"
    FontPath        "/usr/share/fonts/truetype/openoffice"
    FontPath        "/usr/share/fonts/truetype/ttf-bitstream-vera"
    FontPath        "/usr/share/fonts/latex-ttf-fonts"
    FontPath        "/usr/X11R6/lib/X11/fonts/defoma/CID"
    FontPath        "/usr/X11R6/lib/X11/fonts/defoma/TrueType"
EndSection

Section "Module"

#       Load  "GLcore"
    Load           "ddc"  # ddc probing of monitor
    Load           "dbe"
#       Load  "dri"
    Load           "extmod"
    Load           "glx"
    Load           "bitmap" # bitmap-fonts
    Load           "speedo"
    Load           "type1"
    Load           "freetype"
    Load           "record"
EndSection

Section "ServerFlags"
    Option         "AllowMouseOpenFail" "true"
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "keyboard"
    Option         "CoreKeyboard"
    Option         "XkbRules" "xfree86"
    Option         "XkbModel" "pc105"
    Option         "XkbLayout" "us"
EndSection

Section "InputDevice"
    Identifier     "Serial Mouse"
    Driver         "mouse"
    Option         "Protocol" "Microsoft"
    Option         "Device" "/dev/ttyS0"
    Option         "Emulate3Buttons" "true"
    Option         "Emulate3Timeout" "70"
    Option         "SendCoreEvents" "true"
EndSection

Section "InputDevice"
    Identifier     "PS/2 Mouse"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "ZAxisMapping" "4 5"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "true"
    Option         "Emulate3Timeout" "70"
    Option         "SendCoreEvents" "true"
EndSection

Section "InputDevice"
    Identifier     "USB Mouse"
    Driver         "mouse"
    Option         "Device" "/dev/input/mice"
    Option         "SendCoreEvents" "true"
    Option         "Protocol" "IMPS/2"
    Option         "ZAxisMapping" "4 5"
    Option         "Buttons" "5"
EndSection

Section "Monitor"
 # DDC-probed
 # DDC-probed
        # These are the DDC-probed settings reported by your monitor.
        # 1600x1200, 75.0Hz; hfreq=93.75, vfreq=75.00
    Identifier     "Monitor0"
    VendorName     "DPC"
    ModelName      "DPC4346"

    # dwalton - changed per Jarod's guide
    # HorizSync       30.0 - 95.0
    # VertRefresh     50.0 - 160.0
    HorizSync 31.5 - 37.9
    VertRefresh 59.9 - 60.1
    ModeLine       "1600x1200" 202.5 1600 1664 1856 2160 1200 1201 1204 1250
+hsync +vsync
    ModeLine       "1280x1024" 157.5 1280 1344 1504 1728 1024 1025 1028 1072
+hsync +vsync
    ModeLine       "1280x1024" 135.0 1280 1296 1440 1688 1024 1025 1028 1066
+hsync +vsync
    ModeLine       "1280x960" 148.5 1280 1344 1504 1728 960 961 964 1011 +hsync
+vsync
    ModeLine       "1152x864" 108.0 1152 1216 1344 1600 864 865 868 900 +hsync
+vsync
    ModeLine       "1024x768" 94.5 1024 1072 1168 1376 768 769 772 808 +hsync
+vsync
    ModeLine       "1024x768" 78.8 1024 1040 1136 1312 768 769 772 800 +hsync
+vsync
    ModeLine       "1024x768" 75.0 1024 1048 1184 1328 768 771 777 806 -hsync
-vsync
    ModeLine       "1024x768" 65.0 1024 1048 1184 1344 768 771 777 806 -hsync
-vsync
    ModeLine       "800x600" 56.2 800 832 896 1048 600 601 604 631 +hsync +vsync
    ModeLine       "800x600" 49.5 800 816 896 1056 600 601 604 625 +hsync +vsync
    ModeLine       "800x600" 50.0 800 856 976 1040 600 637 643 666 +hsync +vsync
    ModeLine       "800x600" 40.0 800 840 968 1056 600 601 605 628 +hsync +vsync
    ModeLine       "800x600" 36.0 800 824 896 1024 600 601 603 625 +hsync +vsync
    ModeLine       "640x480" 36.0 640 696 752 832 480 481 484 509 -hsync -vsync
    ModeLine       "640x480" 31.5 640 656 720 840 480 481 484 500 -hsync -vsync
    ModeLine       "640x480" 31.5 640 656 696 816 480 481 484 504 -hsync -vsync
    ModeLine       "640x480" 25.2 640 648 744 784 480 482 484 509 -hsync -vsync
    ModeLine       "640x480" 43.2 640 680 744 848 480 481 484 509 -hsync +vsync
    ModeLine       "768x576" 35.0 768 792 872 976 576 577 580 597 -hsync +vsync
    ModeLine       "768x576" 42.9 768 800 880 992 576 577 580 601 -hsync +vsync
    ModeLine       "768x576" 45.5 768 808 888 1008 576 577 580 602 -hsync +vsync
    ModeLine       "768x576" 51.8 768 808 888 1008 576 577 580 605 -hsync +vsync
    ModeLine       "768x576" 62.6 768 816 896 1024 576 577 580 611 -hsync +vsync
    ModeLine       "800x600" 68.2 800 848 936 1072 600 601 604 636 -hsync +vsync
    ModeLine       "1024x768" 113.3 1024 1096 1208 1392 768 769 772 814 -hsync
+vsync
    ModeLine       "1152x864" 81.6 1152 1216 1336 1520 864 865 868 895 -hsync
+vsync
    ModeLine       "1152x864" 119.7 1152 1224 1352 1552 864 865 868 907 -hsync
+vsync
    ModeLine       "1152x864" 143.5 1152 1232 1360 1568 864 865 868 915 -hsync
+vsync
    ModeLine       "1280x960" 124.5 1280 1368 1504 1728 960 961 964 1001 -hsync
+vsync
    ModeLine       "1280x960" 129.9 1280 1368 1504 1728 960 961 964 1002 -hsync
+vsync
    ModeLine       "1280x960" 179.0 1280 1376 1520 1760 960 961 964 1017 -hsync
+vsync
    ModeLine       "1280x1024" 191.0 1280 1376 1520 1760 1024 1025 1028 1085
-hsync +vsync
    ModeLine       "1400x1050" 122.6 1400 1488 1640 1880 1050 1051 1054 1087
-hsync +vsync
    ModeLine       "1400x1050" 149.3 1400 1496 1648 1896 1050 1051 1054 1094
-hsync +vsync
    ModeLine       "1400x1050" 155.8 1400 1496 1648 1896 1050 1051 1054 1096
-hsync +vsync
    ModeLine       "1400x1050" 179.3 1400 1504 1656 1912 1050 1051 1054 1103
-hsync +vsync
    ModeLine       "1400x1050" 214.4 1400 1512 1664 1928 1050 1051 1054 1112
-hsync +vsync
    ModeLine       "1600x1200" 280.6 1600 1728 1904 2208 1200 1201 1204 1271
-hsync +vsync

    # dwalton - power strip modelines
    ModeLine       "848x480" 34.670 848 904 992 1088 480 491 494 530 -hsync
-vsync

    # dwalton - Jarod's modelines
    # MythTV coordinates
    #
    # GUI width - 1752
    # GUI height - 992
    # GUI X offset 64
    # GUI Y offset 48
    #
    # Small Font  - 19
    # Medium Font - 23
    # Large Font  - 32
    #
    # My 1920x1080i mode
    Mode "1920x1080i"
        DotClock 74.52
        HTimings 1920 1952 2016 2208
        VTimings 1080 1084 1096 1126
        Flags "-HSync" "-VSync" "Interlace"
    EndMode

    Option         "DPMS" "true"
EndSection

Section "Device"

        ### Available Driver options are:-
# sw_cursor is needed for some ati and radeon cards
        #Option     "sw_cursor"
        #Option     "hw_cursor"
        #Option     "NoAccel"
        #Option     "ShowCache"
        #Option     "ShadowFB"
        #Option     "UseFBDev"
        #Option     "Rotate"
    # dwalton - added for color OSD hack
    Option "XvmcUsesTextures" "false"
# The following line is auto-generated by KNOPPIX mkxf86config
#       BusID       "PCI:1:0:0"
    Identifier     "Card0"
    Driver         "nvidia"
    VendorName     "All"
    BoardName      "All"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Card0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       1
        Modes      "1920x1080i"
    EndSubSection
    SubSection     "Display"
        Depth       4
        Modes      "1920x1080i"
    EndSubSection
    SubSection     "Display"
        Depth       8
        Modes      "1920x1080i"
    EndSubSection
    SubSection     "Display"
        Depth       15
        Modes      "1920x1080i"
    EndSubSection
    SubSection     "Display"
        Depth       16
        Modes      "1920x1080i"
    EndSubSection
    SubSection     "Display"
        Depth       24
        Modes      "1920x1080i"
    EndSubSection
    SubSection     "Display"
        Depth       32
        Modes      "1920x1080i"
    EndSubSection
EndSection


Thanks
Daniel






More information about the mythtv-users mailing list