From: James Broadhead <jamesbroadhead@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] I want to play movies without hangs
Date: Sat, 18 Feb 2012 13:25:13 +0000 [thread overview]
Message-ID: <CA+hid6H8E1b8VekMSThKG41idNSVVVQMSiwkaPN0HYR53eXXDw@mail.gmail.com> (raw)
In-Reply-To: <20120218064552.1ff2d025@weird.wonkology.org>
On 18 February 2012 05:45, Alex Schuster <wonko@wonkology.org> wrote:
> Walter Dnes writes:
>
>> On Thu, Feb 16, 2012 at 04:29:48PM +0100, Alex Schuster wrote
>>
>> > Then my hardware broke, and I got new one...
>>
>> I had ***EXACTLY THE SAME PROBLEM ON A FRESH INSTALL***. In My case
>> it was a 4+ year old Dell with onboard Intel GPU that was having
>> problems playing NHL Gamecenter Live streams at the slowest speed. I
>> solved the problem and sped up everything by doing...
>> 1) emerge system
>> 2) emerge world
>> 3) rebuild the kernel and reboot
>
> Good idea, Walter! But not in my case. The system had been set up long
> ago, and I did an emerge -e @world in the past already.
>
>> A fresh install will have the stage 3 binaries built with
>> lowest-common-denominator x86 or amd64 code (depending if you chose 32
>> or 64 bit install). This is necessary in order to allow the install
>> code to run on all CPUs with the target platform. The downside is that
>> you lose all the optimisations that make Gentoo scream. Rebuilding the
>> install as described above builds optimized (i.e. faster) binaries. My
>> CFLAGS line in /etc/make.conf is...
>>
>> CFLAGS="-O2 -march=native -mfpmath=sse -fomit-frame-pointer -pipe"
>> CXXFLAGS="${CFLAGS}"
>
> I had those, when I upgraded the hardware:
> CFLAGS="-march=k8-sse3 -mfpmath=sse -O2 -pipe"
> Or something very silimar.
>
> But I also just did an emerge -e @world on the new system, using more
> sophisticated CFLAGS. I got them by doing like suggested on [*], using
> what -march=natve would do. And adding support for this graphite
> stuff. They are:
> CFLAGS="-pipe -march=amdfam10 -O2 \
> -floop-interchange -floop-strip-mine -floop-block \
> -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2 -m3dnow \
> -mcx16 -msahf -maes -mpclmul -mpopcnt -mabm -mlwp -mavx \
> --param l1-cache-size=16 --param l1-cache-line-size=64 \
> --param l2-cache-size=2048"
>
>> Before rebuilding your system, go over your USE flags to make sure
>> you've got the maximum optimization. To find out what your CPU
>> supports, execute the command
>>
>> grep flags /proc/cpuinfo | head -1
>>
>> This will define the limits what your system can support. For
>> instance, mplayer can use the following flags...
>>
>> waltdnes@d530 ~ $ emerge -pv mplayer
>>
>> These are the packages that would be merged, in order:
>>
>> Calculating dependencies... done!
>> [ebuild R ] media-video/mplayer-1.0_rc4_p20110322-r1 USE="X a52
>> alsa ass dga encode gif jpeg mmx mmxext mng mp3 opengl png quicktime
>> real rtmp sse sse2 ssse3 theora truetype win32codecs x264 xv xvid xvmc
>> -3dnow -3dnowext -aalib (-altivec) -amr (-aqua) -bidi -bindist -bl
>> -bluray -bs2b -cddb -cdio -cdparanoia -cpudetection -custom-cpuopts
>> -debug -dirac -directfb -doc -dts -dv -dvb -dvd -dvdnav (-dxr3) -enca
>> (-esd) -faac -faad -fbcon -ftp -ggi -gsm -iconv -ipv6 -jack -joystick
>> -jpeg2k -ladspa -libcaca -libmpeg2 -lirc -live -lzo -mad -md5sum
>> -mpg123 -nas -network -nut -openal -osdmenu -oss -pnm -pulseaudio -pvr
>> -radio -rar -rtc -samba -schroedinger -sdl -shm -speex -tga -toolame
>> -tremor -twolame -unicode -v4l -vdpau -vidix -vorbis -vpx -xanim
>> -xinerama -xscreensaver -zoran" VIDEO_CARDS="-mga -s3virge -tdfx -vesa"
>> 0 kB
>>
>> Your CPU will obviously support a different set of USE flags than
>> mine. Check the files /usr/portage/profiles/use.desc for a list of
>> global flags and /usr/portage/profiles/use.local.desc for
>> package-specific flags.
>
> These are my USE flags for mplayer, they should be fine:
> [ebuild R ] media-video/mplayer-1.0_rc4_p20120213 USE="3dnow
> 3dnowext X a52 aalib alsa ass cdio dga directfb dts dv dvb dvd dvdnav
> enca encode faad fbcon ftp ggi gif iconv ipv6 jack jpeg jpeg2k live mad
> mmx mmxext mng mp3 nas network openal opengl osdmenu oss png pnm
> quicktime rar real rtc samba sdl shm speex sse sse2 ssse3 theora toolame
> tremor truetype twolame unicode vorbis x264 xinerama xscreensaver xv xvid
> (-altivec) (-aqua) -bidi -bindist -bl -bluray -bs2b -cddb -cdparanoia
> -cpudetection -debug -doc (-dxr3) (-esd) -faac -gsm -joystick -ladspa
> -libcaca -libmpeg2 -lirc -lzo -md5sum -nut -pulseaudio -pvr -radio -rtmp
> -tga -v4l -vdpau (-vidix) (-win32codecs) -xanim -xvmc -zoran"
> VIDEO_CARDS="-mga -s3virge -tdfx" 0 kB
>
> Now I'm bulding a new kernel, using genkernel, and without providing a
> custom made .config. Just in case I have some weird setting somewhere
> (debug output for SCSI stuff or something like that).
>
> [later...]
>
> So I did. Argh. I thought genkernel was smart enough to generate a
> working kernel from scratch, if no existing .config would be given. But
> the initramfs could not open my encrypted root partition, until I compiled
> XTS and AES directly into the kernel, not only as modules. Genkernel did
> not include modules for my NIC, somewhat annoying because I had to wait
> several minutes for mysql to start, until I could open a root shell. KDM
> was already running at that time, but I only saw a blank screen, because
> the radeon stuff was not compiled with KMS. There's also something
> wrong with my hardware clock. And iotop does not work, the kernel is
> missing CONFIG_TASKSTATS, CONFIG_TASK_DELAY_ACCT
> and CONFIG_TASK_IO_ACCOUNTING.
>
> But now I have KDE running again. As soon as I do my dd command, mplayer
> stutters, sometimes hanging for seconds. So it's probably not a flaw in
> my kernel .config. Too bad, I hoped that was the problem.
>
> I'm out of ideas now. This is really annoying, my system is fast, mplayer
> is using around 20% only, the system is mostly idle, but when there is
> I/O, videos do not run smoothly. And I do not want to copy every movie I
> want to watch to another drive first.
>
> BTW, when I do the dd if=/dev/zero of=/home/argh bs=10M count=1000
> command, and interrupt with Ctrl-C, it takes some seconds until it stops.
> Shouldn't this happen immediately, unless I specify a very large block
> size? Writing speed is okay, 100 MB/s.
>
> Time to go to sleep now.
>
> [*] http://en.gentoo-wiki.com/wiki/Safe_Cflags#-march.3Dnative
>
> Wonko
>
Please try:
~/.mplayer/config
lavdopts=threads=2
# Use 128MiB input cache by default.
cache = 131072
# Prefill 20% of the cache before starting playback.
cache-min = 20.0
Which should eliminate disk IO somewhat
next prev parent reply other threads:[~2012-02-18 13:27 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-16 15:29 [gentoo-user] I want to play movies without hangs Alex Schuster
2012-02-16 16:04 ` Mark Knecht
2012-02-16 17:34 ` Alex Schuster
2012-02-16 17:45 ` Mark Knecht
2012-02-16 16:23 ` Paul Hartman
2012-02-16 16:49 ` Alex Schuster
2012-02-16 17:21 ` Paul Hartman
2012-02-18 3:13 ` Alex Schuster
2012-02-18 2:13 ` Walter Dnes
2012-02-18 5:45 ` Alex Schuster
2012-02-18 13:25 ` James Broadhead [this message]
2012-02-18 17:04 ` Alex Schuster
2012-02-19 0:05 ` Urs Schutz
2012-02-19 0:35 ` Alex Schuster
2012-05-07 12:41 ` Alex Schuster
2012-05-07 16:26 ` Volker Armin Hemmann
2012-05-07 16:44 ` Michael Hampicke
2012-05-07 17:14 ` Volker Armin Hemmann
2012-05-07 17:25 ` Michael Hampicke
2012-05-07 17:39 ` Volker Armin Hemmann
2012-05-07 22:56 ` [gentoo-user] " walt
2012-05-07 23:13 ` Volker Armin Hemmann
2012-05-07 23:56 ` walt
2012-05-08 15:05 ` Volker Armin Hemmann
2012-05-07 18:52 ` [gentoo-user] " Alex Schuster
2012-05-07 17:39 ` Mark Knecht
2012-05-07 21:11 ` Alex Schuster
2012-05-09 19:44 ` Alex Schuster
2012-05-09 20:38 ` Neil Bothwick
2012-05-10 1:00 ` Alex Schuster
2012-05-10 2:09 ` Dale
2012-05-10 2:40 ` Adam Carter
2012-05-10 7:53 ` Dale
2012-05-13 0:34 ` Alex Schuster
2012-05-13 0:47 ` Michael Mol
2012-05-13 0:58 ` Alex Schuster
2012-05-13 1:04 ` Michael Mol
2012-05-17 13:21 ` Alex Schuster
2012-05-17 13:51 ` Mark Knecht
2012-05-17 14:13 ` Michael Mol
2012-05-17 16:05 ` Mark Knecht
2012-05-20 9:35 ` Alex Schuster
2012-05-10 3:59 ` Adam Carter
2012-05-10 8:02 ` Michael Hampicke
2012-05-10 22:45 ` Paul Hartman
2012-05-10 23:23 ` Alex Schuster
2012-05-12 1:40 ` [gentoo-user] I want to play movies without hangs [SOLVED, sort of] Alex Schuster
2012-05-12 13:36 ` Norman Invasion
2012-05-12 15:05 ` Alex Schuster
2012-05-12 15:41 ` Norman Invasion
2012-05-13 8:56 ` Alan McKinnon
2012-05-13 18:12 ` Michael Mol
2012-05-13 20:53 ` Alan McKinnon
2012-05-13 21:01 ` Michael Mol
2012-05-13 21:33 ` Alan McKinnon
2012-05-13 22:03 ` Michael Mol
2012-05-13 23:27 ` Alan McKinnon
2012-05-13 23:54 ` Michael Mol
2012-05-14 22:28 ` Paul Hartman
2012-05-15 10:24 ` Alex Schuster
2012-05-07 20:43 ` [gentoo-user] I want to play movies without hangs Dale
2012-05-07 21:09 ` Alex Schuster
2012-05-07 21:16 ` Stroller
2012-05-08 20:43 ` Simon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+hid6H8E1b8VekMSThKG41idNSVVVQMSiwkaPN0HYR53eXXDw@mail.gmail.com \
--to=jamesbroadhead@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox