[mythtv-users] Jerky HD playback, only after resume from S3

Leighton Brough brough at baremetalsoft.com
Mon Oct 16 16:33:18 UTC 2006


Leighton Brough wrote:
> Leighton Brough wrote:
>   
>> I'm running 0.20-fixes as a combined BE/FE with a  2.6.18 kernel on a 
>> 3.0GHz P4. If I start the system with a boot/reboot, then HD playback is 
>> perfect. However when I suspend to RAM (S3) and then resume, playback of 
>> some HD recordings (but not all) is jerky. I get messages like this in 
>> the log:
>>
>> 2006-10-10 12:21:32.194 WriteAudio: buffer underrun
>> 2006-10-10 12:21:32.272 NVP: prebuffering pause
>> 2006-10-10 12:21:32.272 WriteAudio: buffer underrun
>> 2006-10-10 12:21:34.350 WriteAudio: buffer underrun
>> 2006-10-10 12:21:34.510 WriteAudio: buffer underrun
>> 2006-10-10 12:21:34.694 WriteAudio: buffer underrun
>> 2006-10-10 12:21:36.676 WriteAudio: buffer underrun
>> 2006-10-10 12:21:36.778 WriteAudio: buffer underrun
>>
>> The jerky playback occurs even when there is no other significant 
>> activity on the box - no recording, commercial flagging, cronjobs etc. 
>> After a reboot, I would normally expect to be able to record 3 HD shows, 
>> run 3 commercial flagging jobs and watch a recording simultaneously 
>> without a hiccup, so there is plenty of CPU and disk performance 
>> available. Running top suggests that CPU usage for playback of the 
>> affected recordings is similar after a reboot and resume from S3. hdparm 
>> -t suggests that the disk performance is the same in both scenarios too.
>>
>> I am at a loss as to what is different about the system before and after 
>> the suspend to RAM. Given the log messages above, where should I be 
>> looking to find the difference? I suspect some kernel module needs to be 
>> restarted, or some hardware state restored, but what?
>>
>> I have real-time threads enabled, and am using ALSA for sound and the 
>> RTC for video timing, if that matters.
>>     
> Some more information:
>
> I've just tried OSS sound instead, and what I get in this case is a 
> "NVP: prebuffering pause" message in the frontend log whenever the 
> video/audio stutters, which is every few seconds.
>   
For the archive:

It looks like I've found a solution to this problem. Turning off the 
XVideo sync to VBlank option in nvidia-settings seems to fix the 
stuttering playback. I got a clue when I noticed the audio was fine when 
I switched to another console (i.e. when the video wasn't being 
displayed). The only mythtv TV playback setting I have enabled is to use 
real-time kernel threads.

I've also found that OSS rather than ALSA sounds seems to be more robust 
for my configuration, in the sense that ALSA sound will tend to stutter 
when the box is otherwise loaded (e.g. doing a compile), whereas OSS 
doesn't hiccup.

Leighton


More information about the mythtv-users mailing list