public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Choppy video playback
@ 2008-01-25 10:26 Mike Mazur
  2008-01-25 11:55 ` Tomas Papan
  0 siblings, 1 reply; 20+ messages in thread
From: Mike Mazur @ 2008-01-25 10:26 UTC (permalink / raw
  To: gentoo-user

Hi,

I'm having choppy video playback in mplayer, vlc and also in Firefox
on YouTube and the like. I notice a video freeze every 1-2 seconds or
so, then the video snaps back to where it should be. The audio sounds
fine. Mplayer often spits out a warning message[1].

I also noticed that typing into forms (like an email in Gmail) in
Firefox, after Firefox has been running a few hours also suffers from
this freeze every 1-2 seconds.

A typical workload is Gnome, Firefox, Claws-Mail, Pidgin, Tomboy,
xmms2 and a bunch of terminals with SSH sessions and irssi.

I have an Intel Core 2 Duo 2GHz with 2 GB of RAM, so this shouldn't be
happening. I'm running kernel 2.6.23-gentoo-r3. I don't remember when
exactly this started, I don't really watch video too often.

Could it be the scheduler with which my kernel is compiled? Currently
it's set to "Preemptible Kernel (Low-Latency Desktop)".

Any ideas? What to start tweaking with?

Thanks for any help,
Mike


[1] Mplayer warning message:
           ************************************************
           **** Your system is too SLOW to play this!  ****
           ************************************************

Possible reasons, problems, workarounds:
- Most common: broken/buggy _audio_ driver
  - Try -ao sdl or use the OSS emulation of ALSA.
  - Experiment with different values for -autosync, 30 is a good start.
- Slow video output
  - Try a different -vo driver (-vo help for a list) or try -framedrop!
- Slow CPU
  - Don't try to play a big DVD/DivX on a slow CPU! Try some of the lavdopts,
    e.g. -vfm ffmpeg -lavdopts lowres=1:fast:skiploopfilter=all.
- Broken file
  - Try various combinations of -nobps -ni -forceidx -mc 0.
- Slow media (NFS/SMB mounts, DVD, VCD etc)
  - Try -cache 8192.
- Are you using -cache to play a non-interleaved AVI file?
  - Try -nocache.
Read DOCS/HTML/en/video.html for tuning/speedup tips.
If none of this helps you, read DOCS/HTML/en/bugreports.html.
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Choppy video playback
  2008-01-25 10:26 [gentoo-user] Choppy video playback Mike Mazur
@ 2008-01-25 11:55 ` Tomas Papan
  2008-01-26 10:39   ` Mike Mazur
  0 siblings, 1 reply; 20+ messages in thread
From: Tomas Papan @ 2008-01-25 11:55 UTC (permalink / raw
  To: gentoo-user

hello,

can you send us your /etc/make.conf ?

br
tomas

Mike Mazur wrote:
> Hi,
>
> I'm having choppy video playback in mplayer, vlc and also in Firefox
> on YouTube and the like. I notice a video freeze every 1-2 seconds or
> so, then the video snaps back to where it should be. The audio sounds
> fine. Mplayer often spits out a warning message[1].
>
> I also noticed that typing into forms (like an email in Gmail) in
> Firefox, after Firefox has been running a few hours also suffers from
> this freeze every 1-2 seconds.
>
> A typical workload is Gnome, Firefox, Claws-Mail, Pidgin, Tomboy,
> xmms2 and a bunch of terminals with SSH sessions and irssi.
>
> I have an Intel Core 2 Duo 2GHz with 2 GB of RAM, so this shouldn't be
> happening. I'm running kernel 2.6.23-gentoo-r3. I don't remember when
> exactly this started, I don't really watch video too often.
>
> Could it be the scheduler with which my kernel is compiled? Currently
> it's set to "Preemptible Kernel (Low-Latency Desktop)".
>
> Any ideas? What to start tweaking with?
>
> Thanks for any help,
> Mike
>
>
> [1] Mplayer warning message:
>            ************************************************
>            **** Your system is too SLOW to play this!  ****
>            ************************************************
>
> Possible reasons, problems, workarounds:
> - Most common: broken/buggy _audio_ driver
>   - Try -ao sdl or use the OSS emulation of ALSA.
>   - Experiment with different values for -autosync, 30 is a good start.
> - Slow video output
>   - Try a different -vo driver (-vo help for a list) or try -framedrop!
> - Slow CPU
>   - Don't try to play a big DVD/DivX on a slow CPU! Try some of the lavdopts,
>     e.g. -vfm ffmpeg -lavdopts lowres=1:fast:skiploopfilter=all.
> - Broken file
>   - Try various combinations of -nobps -ni -forceidx -mc 0.
> - Slow media (NFS/SMB mounts, DVD, VCD etc)
>   - Try -cache 8192.
> - Are you using -cache to play a non-interleaved AVI file?
>   - Try -nocache.
> Read DOCS/HTML/en/video.html for tuning/speedup tips.
> If none of this helps you, read DOCS/HTML/en/bugreports.html.
>   

-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Choppy video playback
  2008-01-25 11:55 ` Tomas Papan
@ 2008-01-26 10:39   ` Mike Mazur
  2008-01-27  6:55     ` Walter Dnes
  0 siblings, 1 reply; 20+ messages in thread
From: Mike Mazur @ 2008-01-26 10:39 UTC (permalink / raw
  To: gentoo-user

Hi Tomas,

On Jan 25, 2008 8:55 PM, Tomas Papan <tomas.papan@siemens.com> wrote:
> can you send us your /etc/make.conf ?

Here it is (with comments stripped out):

CHOST="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

USE="gtk gtk2 gnome -apm -eds -emboss -gstreamer -qt -qt3 -qt4 -kde
-ldap -arts -esd -oss -xv X a52 aac acpi alsa avahi bash-completion
bluetooth cdr cjk crypt dbus dvd dvdr exif firefox gphoto hal ipod
jpeg mbox mp3 nptl nptlonly ogg opengl png pulseaudio spell ssl
startup-notification svg theora tiff vorbis wifi xinerama"

MAKEOPTS="-j3"
FEATURES="parallel-fetch ccache"

VIDEO_CARDS="nvidia"
INPUT_DEVICES="keyboard mouse evdev synaptics"

Thanks,
Mike
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Choppy video playback
  2008-01-26 10:39   ` Mike Mazur
@ 2008-01-27  6:55     ` Walter Dnes
  2008-01-27 12:18       ` Mike Mazur
  2008-01-27 12:55       ` ionut cucu
  0 siblings, 2 replies; 20+ messages in thread
From: Walter Dnes @ 2008-01-27  6:55 UTC (permalink / raw
  To: gentoo-user

On Sat, Jan 26, 2008 at 07:39:47PM +0900, Mike Mazur wrote

> CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"

  The -march option may or may not invoke mmx, sse, sse2, etc in the
CFLAGS line but it definitely does *NOT* invoke them in the USE variable.

> USE="gtk gtk2 gnome -apm -eds -emboss -gstreamer -qt -qt3 -qt4 -kde
> -ldap -arts -esd -oss -xv X a52 aac acpi alsa avahi bash-completion
> bluetooth cdr cjk crypt dbus dvd dvdr exif firefox gphoto hal ipod
> jpeg mbox mp3 nptl nptlonly ogg opengl png pulseaudio spell ssl
> startup-notification svg theora tiff vorbis wifi xinerama"

  I have mmx, sse, sse2, and a few AMD-specific options in my USE
variable.  Can you show us the output of the command...

grep flags /proc/cpuinfo

  Then we can see what to add.  If you are *NOT* taking advantage of the
available extensions, you won't get the available oomph out of your cpu.
It's not so much a matter of raw speed as ability to do complex
calculations in the chipset microcode, rather than painfully emulating
it in software.  One of the features of Gentoo is customizing your build
to get the most out of your cpu.  Use it... within reason.

  mplayer also takes a few custom flags.  In /etc/portage/package.use I
have the entry

media-video/mplayer custom-cflags i8x0 real 3dnowext mmxext

  With an Intel cpu, you obviously don't want "3dnowext", but there may
be other stuff worth using.  To find out what's available, use...

grep mplayer /usr/portage/profiles/use.local.desc | less

-- 
Walter Dnes <waltdnes@waltdnes.org>
I'm not repeating myself
I'm an X Window user...  I'm an ex-Windows-user
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Choppy video playback
  2008-01-27  6:55     ` Walter Dnes
@ 2008-01-27 12:18       ` Mike Mazur
  2008-01-28  2:08         ` Walter Dnes
  2008-01-27 12:55       ` ionut cucu
  1 sibling, 1 reply; 20+ messages in thread
From: Mike Mazur @ 2008-01-27 12:18 UTC (permalink / raw
  To: gentoo-user

Hi Walter,

On Jan 27, 2008 3:55 PM, Walter Dnes <waltdnes@waltdnes.org> wrote:
> On Sat, Jan 26, 2008 at 07:39:47PM +0900, Mike Mazur wrote
>
> > CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
>
>   The -march option may or may not invoke mmx, sse, sse2, etc in the
> CFLAGS line but it definitely does *NOT* invoke them in the USE variable.
>
> > USE="gtk gtk2 gnome -apm -eds -emboss -gstreamer -qt -qt3 -qt4 -kde
> > -ldap -arts -esd -oss -xv X a52 aac acpi alsa avahi bash-completion
> > bluetooth cdr cjk crypt dbus dvd dvdr exif firefox gphoto hal ipod
> > jpeg mbox mp3 nptl nptlonly ogg opengl png pulseaudio spell ssl
> > startup-notification svg theora tiff vorbis wifi xinerama"
>
>   I have mmx, sse, sse2, and a few AMD-specific options in my USE
> variable.  Can you show us the output of the command...
>
> grep flags /proc/cpuinfo

The output of `grep flags /proc/cpuinfo` is:

flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx
lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl vmx est tm2
ssse3 cx16 xtpr lahf_lm

>   Then we can see what to add.  If you are *NOT* taking advantage of the
> available extensions, you won't get the available oomph out of your cpu.
> It's not so much a matter of raw speed as ability to do complex
> calculations in the chipset microcode, rather than painfully emulating
> it in software.  One of the features of Gentoo is customizing your build
> to get the most out of your cpu.  Use it... within reason.

This enters a realm I haven't visited before...

Makes lots of sense. I guess I'll need to recompile everything if I
want any changes to come into effect?

>   mplayer also takes a few custom flags.  In /etc/portage/package.use I
> have the entry
>
> media-video/mplayer custom-cflags i8x0 real 3dnowext mmxext
>
>   With an Intel cpu, you obviously don't want "3dnowext", but there may
> be other stuff worth using.  To find out what's available, use...
>
> grep mplayer /usr/portage/profiles/use.local.desc | less

Looks like I have lots of reading ahead of me :) Need to figure out
what those CPU extensions mean or do and how not to abuse that power!

Thanks a lot,
Mike
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Choppy video playback
  2008-01-27  6:55     ` Walter Dnes
  2008-01-27 12:18       ` Mike Mazur
@ 2008-01-27 12:55       ` ionut cucu
  2008-01-27 22:28         ` Mike Mazur
  1 sibling, 1 reply; 20+ messages in thread
From: ionut cucu @ 2008-01-27 12:55 UTC (permalink / raw
  To: gentoo-user

On Sun, 27 Jan 2008 01:55:59 -0500
"Walter Dnes" <waltdnes@waltdnes.org> wrote:

> On Sat, Jan 26, 2008 at 07:39:47PM +0900, Mike Mazur wrote
> 
> > CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
> 
>   The -march option may or may not invoke mmx, sse, sse2, etc in the
> CFLAGS line but it definitely does *NOT* invoke them in the USE
> variable.
> 
> > USE="gtk gtk2 gnome -apm -eds -emboss -gstreamer -qt -qt3 -qt4 -kde
> > -ldap -arts -esd -oss -xv X a52 aac acpi alsa avahi bash-completion
> > bluetooth cdr cjk crypt dbus dvd dvdr exif firefox gphoto hal ipod
> > jpeg mbox mp3 nptl nptlonly ogg opengl png pulseaudio spell ssl
> > startup-notification svg theora tiff vorbis wifi xinerama"
> 
>   I have mmx, sse, sse2, and a few AMD-specific options in my USE
> variable.  Can you show us the output of the command...
> 
> grep flags /proc/cpuinfo
> 
>   Then we can see what to add.  If you are *NOT* taking advantage of
> the available extensions, you won't get the available oomph out of
> your cpu. It's not so much a matter of raw speed as ability to do
> complex calculations in the chipset microcode, rather than painfully
> emulating it in software.  One of the features of Gentoo is
> customizing your build to get the most out of your cpu.  Use it...
> within reason.
> 
>   mplayer also takes a few custom flags.  In /etc/portage/package.use
> I have the entry
> 
> media-video/mplayer custom-cflags i8x0 real 3dnowext mmxext
> 
>   With an Intel cpu, you obviously don't want "3dnowext", but there
> may be other stuff worth using.  To find out what's available, use...
> 
> grep mplayer /usr/portage/profiles/use.local.desc | less
> 
True as that is, is think it's kind a of the point. I have been using
mplayer to see movies since k7-2(I think it as a k7-2 don't remember
for sure). I've seldom got the error about CPU being to slow and always
it was another reason for mplayer not being able to play it. I would
rather say you should look in mplayer -vo help and try different
drivers until you get the one it suites you. If you have a 3d card
choose gl or gl2, if not xv. Also please check that you have setup
preperly the graphics card.
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Choppy video playback
  2008-01-27 12:55       ` ionut cucu
@ 2008-01-27 22:28         ` Mike Mazur
  2008-01-27 22:55           ` ionut cucu
  0 siblings, 1 reply; 20+ messages in thread
From: Mike Mazur @ 2008-01-27 22:28 UTC (permalink / raw
  To: gentoo-user

Hi,

On Jan 27, 2008 9:55 PM, ionut cucu <cuciferus@gmail.com> wrote:
> True as that is, is think it's kind a of the point. I have been using
> mplayer to see movies since k7-2(I think it as a k7-2 don't remember
> for sure). I've seldom got the error about CPU being to slow and always
> it was another reason for mplayer not being able to play it. I would
> rather say you should look in mplayer -vo help and try different
> drivers until you get the one it suites you. If you have a 3d card
> choose gl or gl2, if not xv. Also please check that you have setup
> preperly the graphics card.

Ah yes you reminded me that I wanted to include my mplayer settings in
my original email. My /etc/mplayer/mplayer.conf contains:

vo=gl2
monitoraspect=16:10
mixer = hw:0
fontconfig=1
subfont-osd-scale=4
subfont-text-scale=3

I have an nVidia graphics card in my laptop:

# lspci | grep -i nvidia
01:00.0 VGA compatible controller: nVidia Corporation GeForce Go 7700 (rev a1)

I set it up by basically installing x11-drivers/nvidia-drivers,
currently I'm at version 100.14.19.

Some sections from /etc/X11/xorg.conf (if you would like more, let me know):

Section "Module"
        Load  "record"
        Load  "xtrap"
        Load  "glx"
        Load  "extmod"
        Load  "dbe"
        Load  "freetype"
        Load  "type1"
EndSection

Section "Device"
        Identifier  "GeForce 7700 Go"
        Driver      "nvidia"
        VendorName  "nVidia Corporation"
        BoardName   "GeForce 7700 Go"
        BusID       "PCI:1:0:0"
        Option      "NoLogo" "true"
        Option      "BackingStore" "true"
        Option      "AddARGBGLXVisuals" "true"
        Option      "TwinView"
        Option      "HorizSync" "LCD: 31.5-79; Ext: 31.5-80; TV: 47.7"
        Option      "VertRefresh" "LCD: 60-60; Ext: 70-75; TV: 60"
        Option      "MetaModes" "Ext: 1280x1024 +1440+0, LCD: 1440x900
@1440x1024 +0+0; LCD: 1440x900, Ext: NULL"
        Option      "TwinViewXineramaInfoOrder" "LCD"
        Option      "RenderAccel" "true"
EndSection

Currently I'm not using twin displays, just my laptop.

As I'm typing this email in Firefox, I notice every second or so a
pause. My cursor freezes, even though I continue to type, and only
after hanging for a split-second, the display catches up with what I
have been typing. This is after Firefox has been used yesterday and
sat idle overnight and doesn't involve mplayer at all.

Thanks for the help so far guys :)
Mike
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Choppy video playback
  2008-01-27 22:28         ` Mike Mazur
@ 2008-01-27 22:55           ` ionut cucu
  2008-01-28  0:39             ` Mike Mazur
  0 siblings, 1 reply; 20+ messages in thread
From: ionut cucu @ 2008-01-27 22:55 UTC (permalink / raw
  To: gentoo-user

On Mon, 28 Jan 2008 07:28:35 +0900
"Mike Mazur" <mmazur@gmail.com> wrote:

> Hi,
> 
> On Jan 27, 2008 9:55 PM, ionut cucu <cuciferus@gmail.com> wrote:
> > True as that is, is think it's kind a of the point. I have been
> > using mplayer to see movies since k7-2(I think it as a k7-2 don't
> > remember for sure). I've seldom got the error about CPU being to
> > slow and always it was another reason for mplayer not being able to
> > play it. I would rather say you should look in mplayer -vo help and
> > try different drivers until you get the one it suites you. If you
> > have a 3d card choose gl or gl2, if not xv. Also please check that
> > you have setup preperly the graphics card.
> 
> Ah yes you reminded me that I wanted to include my mplayer settings in
> my original email. My /etc/mplayer/mplayer.conf contains:
> 
> vo=gl2
> monitoraspect=16:10
> mixer = hw:0
> fontconfig=1
> subfont-osd-scale=4
> subfont-text-scale=3
> 
> I have an nVidia graphics card in my laptop:
> 
> # lspci | grep -i nvidia
> 01:00.0 VGA compatible controller: nVidia Corporation GeForce Go 7700
> (rev a1)
> 
> I set it up by basically installing x11-drivers/nvidia-drivers,
> currently I'm at version 100.14.19.
<snip>
I to am using the same version of it and using vo=gl2 on mplayer gets
me a choppy playback. But vo=gl or xv works fine for me.
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Choppy video playback
  2008-01-27 22:55           ` ionut cucu
@ 2008-01-28  0:39             ` Mike Mazur
  2008-01-28 10:33               ` Paul Sobey
  0 siblings, 1 reply; 20+ messages in thread
From: Mike Mazur @ 2008-01-28  0:39 UTC (permalink / raw
  To: gentoo-user

Hi,

On Jan 28, 2008 7:55 AM, ionut cucu <cuciferus@gmail.com> wrote:
>
> On Mon, 28 Jan 2008 07:28:35 +0900
> "Mike Mazur" <mmazur@gmail.com> wrote:
>
> > Hi,
> >
> > On Jan 27, 2008 9:55 PM, ionut cucu <cuciferus@gmail.com> wrote:
> > > True as that is, is think it's kind a of the point. I have been
> > > using mplayer to see movies since k7-2(I think it as a k7-2 don't
> > > remember for sure). I've seldom got the error about CPU being to
> > > slow and always it was another reason for mplayer not being able to
> > > play it. I would rather say you should look in mplayer -vo help and
> > > try different drivers until you get the one it suites you. If you
> > > have a 3d card choose gl or gl2, if not xv. Also please check that
> > > you have setup preperly the graphics card.
> >
> > Ah yes you reminded me that I wanted to include my mplayer settings in
> > my original email. My /etc/mplayer/mplayer.conf contains:
> >
> > vo=gl2
> > monitoraspect=16:10
> > mixer = hw:0
> > fontconfig=1
> > subfont-osd-scale=4
> > subfont-text-scale=3
> >
> > I have an nVidia graphics card in my laptop:
> >
> > # lspci | grep -i nvidia
> > 01:00.0 VGA compatible controller: nVidia Corporation GeForce Go 7700
> > (rev a1)
> >
> > I set it up by basically installing x11-drivers/nvidia-drivers,
> > currently I'm at version 100.14.19.
> <snip>
> I to am using the same version of it and using vo=gl2 on mplayer gets
> me a choppy playback. But vo=gl or xv works fine for me.

In my case, vo=gl2, vo=gl and vo=x11 all behave the same, with regular
pauses. xv is not listed when I type `mplayer -vo help`.

So doesn't this indicate that it's perhaps not mplayer itself causing
trouble, but rather something system-wide instead? Especially since
this regular pause also occurs while I type in text fields in Firefox.

Thanks,
Mike
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Choppy video playback
  2008-01-27 12:18       ` Mike Mazur
@ 2008-01-28  2:08         ` Walter Dnes
  2008-01-28  8:04           ` ionut cucu
  0 siblings, 1 reply; 20+ messages in thread
From: Walter Dnes @ 2008-01-28  2:08 UTC (permalink / raw
  To: gentoo-user

On Sun, Jan 27, 2008 at 09:18:26PM +0900, Mike Mazur wrote

> The output of `grep flags /proc/cpuinfo` is:
> 
> flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
> mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx
> lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl vmx est tm2
> ssse3 cx16 xtpr lahf_lm

  The "mmx", "sse", "sse2", and "sse3" items look relevant.  Change your
CFLAGS line (watch the linewrap)...

CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer -mmmx -msse -msse2 -msse3 -mfpmath=sse"

  The "-mmmx -msse -msse2 -msse3" flags may be redundant if "prescott"
implies them, but they won't hurt.  The "-mfpmath=sse" may or may not
be redundant.  In a worst case, it won't hurt.  It greatly speeds up
floating-point calculations on X86-type systems (including AMD).  In
another message in this thread, you said...

> xv is not listed when I type `mplayer -vo help`.

  This is to be expected.  Since you have "-xv" in USE, xv support is
blocked.  Did you have any problems with xv that caused you to block it?
If not, change "-xv" to "xv" in USE in /etc/make.conf.  And while you're
at it, add...

mmx sse sse2

to your USE parameters.  In /etc/portage/package.use, add the line...

media-video/mplayer ssse3

> I guess I'll need to recompile everything if I want any changes to
> come into effect?

  Hopefully, not everything.  *AFTER MAKING ALL THE ABOVE CHANGES* try...

emerge --ask --deep --newuse --update --world

  The --newuse forces a recompile of every item directly affected by any
changes in CFLAGS or USE.  The --deep forces a recompile of indirectly
affected items.  If there don't seem to be any problems, let it rebuild
the listed items.

-- 
Walter Dnes <waltdnes@waltdnes.org>
I'm not repeating myself
I'm an X Window user...  I'm an ex-Windows-user
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Choppy video playback
  2008-01-28  2:08         ` Walter Dnes
@ 2008-01-28  8:04           ` ionut cucu
  2008-01-29 22:09             ` Mike Mazur
  0 siblings, 1 reply; 20+ messages in thread
From: ionut cucu @ 2008-01-28  8:04 UTC (permalink / raw
  To: gentoo-user

On Sun, 27 Jan 2008 21:08:02 -0500
"Walter Dnes" <waltdnes@waltdnes.org> wrote:

> On Sun, Jan 27, 2008 at 09:18:26PM +0900, Mike Mazur wrote
> 
> > The output of `grep flags /proc/cpuinfo` is:
> > 
> > flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr
> > pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
> > pbe nx lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl vmx
> > est tm2 ssse3 cx16 xtpr lahf_lm
> 
>   The "mmx", "sse", "sse2", and "sse3" items look relevant.  Change
> your CFLAGS line (watch the linewrap)...
> 
> CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer -mmmx -msse
> -msse2 -msse3 -mfpmath=sse"
> 
for a gcc above 4.2 march=native will do, but this is only for racing
it has nothing to do with the mplayer issue

>   The "-mmmx -msse -msse2 -msse3" flags may be redundant if "prescott"
> implies them, but they won't hurt.  The "-mfpmath=sse" may or may not
> be redundant.  In a worst case, it won't hurt.  It greatly speeds up
> floating-point calculations on X86-type systems (including AMD).  In
> another message in this thread, you said...
> 
> > xv is not listed when I type `mplayer -vo help`.
> 
>   This is to be expected.  Since you have "-xv" in USE, xv support is
> blocked.  Did you have any problems with xv that caused you to block
> it? If not, change "-xv" to "xv" in USE in /etc/make.conf.  And while
> you're at it, add...
> 
> mmx sse sse2
> 
> to your USE parameters.  In /etc/portage/package.use, add the line...

> media-video/mplayer ssse3
> 
> > I guess I'll need to recompile everything if I want any changes to
> > come into effect?
> 
>   Hopefully, not everything.  *AFTER MAKING ALL THE ABOVE CHANGES*
> try...
> 
> emerge --ask --deep --newuse --update --world
> 
>   The --newuse forces a recompile of every item directly affected by
> any changes in CFLAGS or USE.  The --deep forces a recompile of
> indirectly affected items.  If there don't seem to be any problems,
> let it rebuild the listed items.
> 
Firstly this is an overkill. secondly it has again nothing to do with
the choppy mplayer issue. Think about it: an vo=gl2 means mplayer will
not use the CPU for video rendering but the GPU hence the Cpu
optimisations are withou purpose on this driver. Furthermore even is
you use something like xv there are archs on wich mplayer runs(arm, or
686 or k7) where such optimisations are out of the question but mplayer
runs well. Also most linux distros don't have these cflags enabled and
yet mplayer works fine.

Mike does glxinfo|grep render gives an yes? do glxgears work properly ?
Will and opengl game work?(tuxrace)
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Choppy video playback
  2008-01-28  0:39             ` Mike Mazur
@ 2008-01-28 10:33               ` Paul Sobey
  2008-01-28 13:29                 ` Mike Mazur
  0 siblings, 1 reply; 20+ messages in thread
From: Paul Sobey @ 2008-01-28 10:33 UTC (permalink / raw
  To: gentoo-user

On Monday 28 January 2008 00:39:51 Mike Mazur wrote:
> In my case, vo=gl2, vo=gl and vo=x11 all behave the same, with regular
> pauses. xv is not listed when I type `mplayer -vo help`.
>
> So doesn't this indicate that it's perhaps not mplayer itself causing
> trouble, but rather something system-wide instead? Especially since
> this regular pause also occurs while I type in text fields in Firefox.

Hello,

I had exactly the same kind of problem and recompiled mplayer with the xv use 
flag, then used vo=xv, in fact it defaults to it on my system. CPU usage then 
came right down. I have an older nvidia card than you so I hope you also see 
a benefit!

Yours,
Paul
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Choppy video playback
  2008-01-28 10:33               ` Paul Sobey
@ 2008-01-28 13:29                 ` Mike Mazur
  2008-01-29  1:57                   ` Walter Dnes
  0 siblings, 1 reply; 20+ messages in thread
From: Mike Mazur @ 2008-01-28 13:29 UTC (permalink / raw
  To: gentoo-user

Hi Walter, Paul,

On Jan 28, 2008 11:08 AM, Walter Dnes <waltdnes@waltdnes.org> wrote:
[ -- SNIP -- ]
>   This is to be expected.  Since you have "-xv" in USE, xv support is
> blocked.  Did you have any problems with xv that caused you to block it?
> If not, change "-xv" to "xv" in USE in /etc/make.conf.  And while you're
> at it, add...

*slaps forehead* of course that's why. I can't remember why I disabled
it, I don't remember any problems with it.

> mmx sse sse2
>
> to your USE parameters.  In /etc/portage/package.use, add the line...
>
> media-video/mplayer ssse3
>
> > I guess I'll need to recompile everything if I want any changes to
> > come into effect?
>
>   Hopefully, not everything.  *AFTER MAKING ALL THE ABOVE CHANGES* try...
>
> emerge --ask --deep --newuse --update --world
>

Thanks for the pointers. Only 19 packages are being recompiled, so it
should be done soon and I can test out the new settings.

But the list of packages being recompiled have mostly to do with
video, audio and transcoding. I understand it's the --newuse flag
that's causing those, not the additional parameters in CFLAGS. Will
the CFLAGS have benefits on other packages? Such as Firefox or maybe
netscape-flash? For those I might want to do an emerge --emptytree
world...

On Jan 28, 2008 7:33 PM, Paul Sobey <buddha@the-annexe.net> wrote:
> I had exactly the same kind of problem and recompiled mplayer with the xv use
> flag, then used vo=xv, in fact it defaults to it on my system. CPU usage then
> came right down. I have an older nvidia card than you so I hope you also see
> a benefit!

Sounds good, thanks for chiming in :)

I'll report back soon,
Mike
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Choppy video playback
  2008-01-28 13:29                 ` Mike Mazur
@ 2008-01-29  1:57                   ` Walter Dnes
  2008-01-29 20:26                     ` James Ausmus
  0 siblings, 1 reply; 20+ messages in thread
From: Walter Dnes @ 2008-01-29  1:57 UTC (permalink / raw
  To: gentoo-user

On Mon, Jan 28, 2008 at 10:29:47PM +0900, Mike Mazur wrote

> But the list of packages being recompiled have mostly to do with
> video, audio and transcoding. I understand it's the --newuse flag
> that's causing those, not the additional parameters in CFLAGS. Will
> the CFLAGS have benefits on other packages? Such as Firefox or maybe
> netscape-flash? For those I might want to do an emerge --emptytree
> world...

  If all the other stuff isn't being re-compiled, "-march=prescott"
probably includes them by default, so there's no point in re-building
your system.  The CFLAGS were probably included by default.

  If you need a speed boost in Firefox, there is some additional
tweaking that can be done.  The pango library allows Firefox to
simultaneously render US English text (if that's your system locale)
*AND* Chinese, and other similar text.  It slows down Firefox in the
process. If you're willing to give up on Asiatic text, you can cause
Firefox to not link against pango, by including the line...

www-client/mozilla-firefox moznopango

...in /etc/portage/package.use  It's your decision whether occasional
Asiatic scripts or a faster Firefox is worth more to you.

-- 
Walter Dnes <waltdnes@waltdnes.org>
I'm not repeating myself
I'm an X Window user...  I'm an ex-Windows-user
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Choppy video playback
  2008-01-29  1:57                   ` Walter Dnes
@ 2008-01-29 20:26                     ` James Ausmus
  2008-01-29 21:46                       ` Alan McKinnon
  2008-01-29 22:24                       ` Mike Mazur
  0 siblings, 2 replies; 20+ messages in thread
From: James Ausmus @ 2008-01-29 20:26 UTC (permalink / raw
  To: gentoo-user

On Jan 28, 2008 5:57 PM, Walter Dnes <waltdnes@waltdnes.org> wrote:
> On Mon, Jan 28, 2008 at 10:29:47PM +0900, Mike Mazur wrote
>
> > But the list of packages being recompiled have mostly to do with
> > video, audio and transcoding. I understand it's the --newuse flag
> > that's causing those, not the additional parameters in CFLAGS. Will
> > the CFLAGS have benefits on other packages? Such as Firefox or maybe
> > netscape-flash? For those I might want to do an emerge --emptytree
> > world...
>
>   If all the other stuff isn't being re-compiled, "-march=prescott"
> probably includes them by default, so there's no point in re-building
> your system.  The CFLAGS were probably included by default.

Portage *does not* look at CFLAGS in determining what to rebuild (even
with -uDN) - portage only looks at USE flags and dependency
upgrades/versions. Mike is correct in saying that, for packages to be
recompiled with the new CFLAGS, he would have to recompile that
package directly. emerge -e world is a good way to do this.\

-James


>
>   If you need a speed boost in Firefox, there is some additional
> tweaking that can be done.  The pango library allows Firefox to
> simultaneously render US English text (if that's your system locale)
> *AND* Chinese, and other similar text.  It slows down Firefox in the
> process. If you're willing to give up on Asiatic text, you can cause
> Firefox to not link against pango, by including the line...
>
> www-client/mozilla-firefox moznopango
>
> ...in /etc/portage/package.use  It's your decision whether occasional
> Asiatic scripts or a faster Firefox is worth more to you.

Removing Pango will almost definitely increase the render/scroll speed
of Firefox.

However, from the symptoms that Mike is describing (system-wide
momentary pauses, after which the system resumes normal
responsiveness) sounds much more like a kernel-level issue - either
I/O speed issues (check to make sure your hard drive is running at
full speed and you have native controller supported compiled in to
your kernel - also, what is your I/O scheduler set to by default?) or
the Scheduler (process scheduler). What version of which kernel are
you running? What does your .config look like?

I had similar issues with momentarily frozen responsiveness on my
laptop, until I upgraded to 2.6.23.x, which has the new CFS scheduler
in it - seems to help responsiveness quite a bit.

HTH

-James
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Choppy video playback
  2008-01-29 20:26                     ` James Ausmus
@ 2008-01-29 21:46                       ` Alan McKinnon
  2008-01-29 21:56                         ` Eric Martin
  2008-01-29 22:24                       ` Mike Mazur
  1 sibling, 1 reply; 20+ messages in thread
From: Alan McKinnon @ 2008-01-29 21:46 UTC (permalink / raw
  To: gentoo-user

On Tuesday 29 January 2008, James Ausmus wrote:

> Portage *does not* look at CFLAGS in determining what to rebuild
> (even with -uDN) - portage only looks at USE flags and dependency
> upgrades/versions. Mike is correct in saying that, for packages to be
> recompiled with the new CFLAGS, he would have to recompile that
> package directly. emerge -e world is a good way to do this.\

It's also an excellent way to waste several days of one's life that you 
will never get back :-)

If it's only a few packages affected, a much better idea would be to 
grep through /var/wherever-portage-puts-it to find the CFLAGS for each 
package installed, determine the ones that are not correct, and emerge 
just those with 'emerge -n'. How to do this marvellous grepa nd emerge 
is left as an exercise for the reader, as I'm much too lazy to figure 
it out at almost midnight :-)

If it's most of the system that's affected, then yeah, emerge -e world 
is probably easier.


-- 
Alan McKinnon
alan dot mckinnon at gmail dot com
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Choppy video playback
  2008-01-29 21:46                       ` Alan McKinnon
@ 2008-01-29 21:56                         ` Eric Martin
  0 siblings, 0 replies; 20+ messages in thread
From: Eric Martin @ 2008-01-29 21:56 UTC (permalink / raw
  To: gentoo-user

Alan McKinnon wrote:
> On Tuesday 29 January 2008, James Ausmus wrote:
>
>   
>> Portage *does not* look at CFLAGS in determining what to rebuild
>> (even with -uDN) - portage only looks at USE flags and dependency
>> upgrades/versions. Mike is correct in saying that, for packages to be
>> recompiled with the new CFLAGS, he would have to recompile that
>> package directly. emerge -e world is a good way to do this.\
>>     
>
> It's also an excellent way to waste several days of one's life that you 
> will never get back :-)
>
> If it's only a few packages affected, a much better idea would be to 
> grep through /var/wherever-portage-puts-it to find the CFLAGS for each 
> package installed, determine the ones that are not correct, and emerge 
> just those with 'emerge -n'. How to do this marvellous grepa nd emerge 
> is left as an exercise for the reader, as I'm much too lazy to figure 
> it out at almost midnight :-)
>
> If it's most of the system that's affected, then yeah, emerge -e world 
> is probably easier.
>
>   
The other (much more lazy way) you can do it is just let your system 
rebuild normally and it will get worked out now that stuff is in 
make.conf's CFLAGS.  It just depends on if you want it now (read: when 
you're done compiling) or you don't care.  Of course if the xv flag 
didn't fix your video problems then I'd recompile sooner.
my $0.02
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Choppy video playback
  2008-01-28  8:04           ` ionut cucu
@ 2008-01-29 22:09             ` Mike Mazur
  0 siblings, 0 replies; 20+ messages in thread
From: Mike Mazur @ 2008-01-29 22:09 UTC (permalink / raw
  To: gentoo-user

Hi Ionut,

On Jan 28, 2008 5:04 PM, ionut cucu <cuciferus@gmail.com> wrote:
[ -- SNIP -- ]
> Firstly this is an overkill. secondly it has again nothing to do with
> the choppy mplayer issue. Think about it: an vo=gl2 means mplayer will
> not use the CPU for video rendering but the GPU hence the Cpu
> optimisations are withou purpose on this driver. Furthermore even is
> you use something like xv there are archs on wich mplayer runs(arm, or
> 686 or k7) where such optimisations are out of the question but mplayer
> runs well. Also most linux distros don't have these cflags enabled and
> yet mplayer works fine.
>
> Mike does glxinfo|grep render gives an yes? do glxgears work properly ?
> Will and opengl game work?(tuxrace)

$ glxinfo | grep render
direct rendering: Yes
OpenGL renderer string: GeForce Go 7700/PCI/SSE2
    GL_NVX_conditional_render, GL_SGIS_generate_mip map, GL_SGIS_texture_lod,

Yep, glxinfo says I can render. glxgears seems to run fine. Although I
haven't looked into it much, it seems my framerates are low when I
compare with some random person who posts theirs on IRC or this
mailing list.

When I watch glxgears while not doing anything else on the computer,
it will get around 6200 FPS. If I switch to another workspace, that
will (naturally :) jump to around 10500 FPS. But if glxgears is
running on my current workspace and I'm doing other things, like
moving other windows around or switching tabs in Firefox, the
framerate can drop to below 5000 FPS.

I haven't really tried any games, not tuxrace, but I have launched
Frets on Fire [1] once and fount it sluggish. Haven't had time to play
that since.

Mike

[1] http://fretsonfire.sourceforge.net/
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Choppy video playback
  2008-01-29 20:26                     ` James Ausmus
  2008-01-29 21:46                       ` Alan McKinnon
@ 2008-01-29 22:24                       ` Mike Mazur
  2008-01-29 22:34                         ` Mike Mazur
  1 sibling, 1 reply; 20+ messages in thread
From: Mike Mazur @ 2008-01-29 22:24 UTC (permalink / raw
  To: gentoo-user

Hi James,

On Jan 30, 2008 5:26 AM, James Ausmus <james.ausmus@gmail.com> wrote:
[ -- SNIP -- ]
> Portage *does not* look at CFLAGS in determining what to rebuild (even
> with -uDN) - portage only looks at USE flags and dependency
> upgrades/versions. Mike is correct in saying that, for packages to be
> recompiled with the new CFLAGS, he would have to recompile that
> package directly. emerge -e world is a good way to do this.\
>
> -James

Yeah, that's what I thought. CFLAGS are only passed to gcc when it's
executed by portage. I would expect that for any change to CFLAGS, all
packages will need to be recompiled for those new CFLAGS to be
utilized. Whether they will have any effect on the compiled result is
another matter.

> Removing Pango will almost definitely increase the render/scroll speed
> of Firefox.
>
> However, from the symptoms that Mike is describing (system-wide
> momentary pauses, after which the system resumes normal
> responsiveness) sounds much more like a kernel-level issue - either
> I/O speed issues (check to make sure your hard drive is running at
> full speed and you have native controller supported compiled in to
> your kernel - also, what is your I/O scheduler set to by default?) or
> the Scheduler (process scheduler). What version of which kernel are
> you running? What does your .config look like?
>
> I had similar issues with momentarily frozen responsiveness on my
> laptop, until I upgraded to 2.6.23.x, which has the new CFS scheduler
> in it - seems to help responsiveness quite a bit.

Looking around `make menuconfig` I found a few settings which I'm not
sure about, so I'll post them here:
[*] Processor type and features -> Tickless System (Dynamic Ticks)
[ ] Processor type and features -> High Resolution Timer Support
[*] Processor type and features -> 64 bit Memory and IO resources (EXPERIMENTAL)
Processor type and features -> Timer frequency -- currently set to 250 Hz

For completeness, the .config for my 2.6.23-gentoo-r3 kernel is here:
http://pastebin.ca/881174

Thanks!
Mike
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Choppy video playback
  2008-01-29 22:24                       ` Mike Mazur
@ 2008-01-29 22:34                         ` Mike Mazur
  0 siblings, 0 replies; 20+ messages in thread
From: Mike Mazur @ 2008-01-29 22:34 UTC (permalink / raw
  To: gentoo-user

Hi,

On Jan 30, 2008 7:24 AM, Mike Mazur <mmazur@gmail.com> wrote:
[ -- SNIP -- ]
> For completeness, the .config for my 2.6.23-gentoo-r3 kernel is here:
> http://pastebin.ca/881174

Oh, I just found the IO scheduler setting. The scheduler in use is CFQ.

I can't find the CPU scheduler though. I guess that Processor type and
features -> Preemption Model (Preemptible Kernel) isn't it? That is
currently set to Low Latency Desktop.

Also, my notebook is an ASUS A8Js [1][2].

Mike

[1] http://www.rothlaender.net/a8js.html
[2] http://gentoo-wiki.com/HARDWARE_Asus_A8Js
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2008-01-29 22:34 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-25 10:26 [gentoo-user] Choppy video playback Mike Mazur
2008-01-25 11:55 ` Tomas Papan
2008-01-26 10:39   ` Mike Mazur
2008-01-27  6:55     ` Walter Dnes
2008-01-27 12:18       ` Mike Mazur
2008-01-28  2:08         ` Walter Dnes
2008-01-28  8:04           ` ionut cucu
2008-01-29 22:09             ` Mike Mazur
2008-01-27 12:55       ` ionut cucu
2008-01-27 22:28         ` Mike Mazur
2008-01-27 22:55           ` ionut cucu
2008-01-28  0:39             ` Mike Mazur
2008-01-28 10:33               ` Paul Sobey
2008-01-28 13:29                 ` Mike Mazur
2008-01-29  1:57                   ` Walter Dnes
2008-01-29 20:26                     ` James Ausmus
2008-01-29 21:46                       ` Alan McKinnon
2008-01-29 21:56                         ` Eric Martin
2008-01-29 22:24                       ` Mike Mazur
2008-01-29 22:34                         ` Mike Mazur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox