[mythtv-users] Realtime - Kernel Scheduler - Preemption

Tony Lill ajlill at ajlc.waterloo.on.ca
Sat Apr 8 21:16:02 UTC 2006


"Steve Skarda" <steveskarda at gmail.com> writes:

> I have been trying to fix problems with a 100-200mS delay in audio and that
> has created a lot of questions around how the Linux Schedule works and
> whether or not MythTV is getting the CPU it needs or not.  Here are
> questions that I am hoping someone can help shed light on.
>
> 1).   I have realtime enabled in Ubuntu.   When I launch a recording, "using
> realtime prioirty" shows up in the log.   When I look at TOP, under the PR
> column, I see that Mythfrontend priority is similar to other programs,
> around the 30's.  However, there are a few tasks, with 'RT" as priority,
> presumably reatltime.   Should I expect to see RT for mythfrontend task as
> well?

That depends. Does ps show one "process" or many for mythfrontend? The
frontend runs multiple threads, but only puts one of them in realtime
mode for playback. The latest ps on Debian hides the threads. Try
intalling htop, that will show them.

> 2).  Any idea how to up the task priority on mythfrontend for the Linux
> scheduler?

If you run it as root, you can use "nice --5 mythfrontend", or you can
add a call to setpriority() in main (but you'll still have to run it
as root to raise the priority).

> 3).  I have gotten no where near solving my audio sync issues.  I have been
> considering compiling a kernel with Ingo's realtime patch.  There have been
> two posts on that subject.  One saying that MythTv works and another asking
> if it is possible.   Does anyone have further information on this?  So far,
> I have had trouble getting it to compile and I am expecting to have
> difficulty getting NVidia to work.

I have a suspicion that all the changes that have been put into the
2.6 kernels to make it work really well for enterprise servers or
desktop have boned it for multimedia. Have you tried running a 2.4
kernel? All my recording problems started when I went from 2.4 to
2.6. If I wasn't so damned stubborn....

Also are you sure the audio sync problems are in the playback,
and not the recording?

--
Tony Lill,                         Tony.Lill at AJLC.Waterloo.ON.CA
President, A. J. Lill Consultants        fax/data (519) 650 3571
539 Grand Valley Dr., Cambridge, Ont. N3H 2S2     (519) 241 2461
--------------- http://www.ajlc.waterloo.on.ca/ ----------------
"Welcome to All Things UNIX, where if it's not UNIX, it's CRAP!"


More information about the mythtv-users mailing list