Audio looping on pause / stop (10 seconds)

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
aglet
Newcomer
Posts: 6
Joined: Sun Feb 16, 2020 12:22 pm
Great Britain

Audio looping on pause / stop (10 seconds)

Post by aglet »

Hi,

I've recently re-installed my Ubuntu 19.10 server and transferred a MythTV 0.31 install & database on to it.
Audio works perfectly but when I pause or stop the playback, audio replays the last 0.5 seconds of sound in a loop for around 10 seconds and the UI is frozen. After that, audio stops and the UI becomes responsive again.

The hardware is the same (Nvidia GTX 1030 with HDMI audio output to Samsung TV) but now, there's a weird audio issue with recording playback.

I get the same thing when using the 'Audio' menu in the mythfrontend to test output. I've tried all available ALSA output options and they all do the same weird looping thing while playing the same test sound. I've also tried various playback drivers (vdpau, nvdec, openGL) but same behaviour in each.

Has anyone seen anything like this ? Or any pointers for troubleshooting ?

The ubuntu server is installed with Xubuntu & LightDM only - it wasn't a desktop installation so no Gnome / GDM etc.

Frontend logs :

Code: Select all

# Exit recording 
Apr 19 20:59:08 newton mythfrontend.real: mythfrontend[9872]: I CoreContext audio/audiooutputbase.cpp:860 (KillAudio) AOBase: Killing AudioOutputDSP
Apr 19 20:59:15 newton mythfrontend.real: mythfrontend[9872]: I AudioOutputBase audio/audiooutputalsa.cpp:576 (WriteAudio) ALSA: WriteAudio: short write 1512 bytes (ok)
Apr 19 20:59:15 newton mythfrontend.real: mythfrontend[9872]: I AudioOutputBase audio/audiooutputbase.cpp:1716 (OutputAudioLoop) AOBase: OutputAudioLoop: Stop Event
Apr 19 20:59:15 newton mythfrontend.real: mythfrontend[9872]: I AudioOutputBase audio/audiooutputbase.cpp:1836 (run) AOBase: kickoffOutputAudioLoop exiting

## Looping audio here, UI is frozen...

## Looping audio ends, UI responsive again 
Apr 19 20:59:25 newton mythfrontend.real: mythfrontend[9872]: I CoreContext mythplayer.cpp:2777 (StopPlaying) Player(0): StopPlaying - end
Apr 19 20:59:25 newton mythfrontend.real: mythfrontend[9872]: I CoreContext tv_play.cpp:2617 (StopStuff) TV::StopStuff(): Stopping ring buffer
Apr 19 20:59:25 newton mythfrontend.real: mythfrontend[9872]: I CoreContext tv_play.cpp:2628 (StopStuff) TV::StopStuff(): Stopping player
Apr 19 20:59:25 newton mythfrontend.real: mythfrontend[9872]: I CoreContext tv_play.cpp:2437 (HandleStateChange) TV::HandleStateChange(): Changing from WatchingPreRecorded to None
Apr 19 20:59:25 newton mythfrontend.real: mythfrontend[9872]: I CoreContext tv_play.cpp:393 (StartTV) TV::StartTV(): Exiting main playback loop.
Apr 19 20:59:25 newton mythfrontend.real: mythfrontend[9872]: I CoreContext tv_play.cpp:421 (StartTV) TV::StartTV(): -- process events 2 begin
Apr 19 20:59:25 newton mythfrontend.real: mythfrontend[9872]: I CoreContext tv_play.cpp:425 (StartTV) TV::StartTV(): -- process events 2 end
Apr 19 20:59:25 newton mythfrontend.real: mythfrontend[9872]: I CoreContext tv_play.cpp:1281 (~TV) TV::~TV(): -- lock
Apr 19 20:59:25 newton mythfrontend.real: mythfrontend[9872]: I CoreContext mythplayer.cpp:2766 (StopPlaying) Player(0): StopPlaying - begin
Apr 19 20:59:25 newton mythfrontend.real: mythfrontend[9872]: I CoreContext mythplayer.cpp:3192 (DecoderEnd) Player(0): Exited decoder loop.
Apr 19 20:59:25 newton mythfrontend.real: mythfrontend[9872]: I CoreContext mythplayer.cpp:2777 (StopPlaying) Player(0): StopPlaying - end
Apr 19 20:59:25 newton mythfrontend.real: mythfrontend[9872]: N CoreContext mythmainwindow.cpp:2859 (PauseIdleTimer) Resuming idle timer
Audio output device is : 'ALSA:hdmi:CARD=NVidia,DEV=0'
aglet
Newcomer
Posts: 6
Joined: Sun Feb 16, 2020 12:22 pm
Great Britain

Re: Audio looping on pause / stop (10 seconds)

Post by aglet »

FWIW, I found the cause of this after much faffing.

It was due to using the latest NVidia drivers (440.8x?) in the graphics-drivers ppa. I reverted back to the NVidia-driver-430 package from the eoan restricted-drivers repository and the problem disappeared.

The same driver also caused my mouse cursor to be *very* slow to respond - like moving it through treacle.

All very odd, but repeatable through several clean installs of Ubuntu 19.10 and 20.04 (beta).

Just unlucky I guess ;)
aglet
Newcomer
Posts: 6
Joined: Sun Feb 16, 2020 12:22 pm
Great Britain

Re: Audio looping on pause / stop (10 seconds)

Post by aglet »

...Still unlucky. Turns out the problem has come back with every version of nvidia driver I've tried using.

To recap, the audio is fine during playback but frontend hangs for about 10 seconds when pausing or stopping playback and during that time, the audio replays the last fragment of sound on a loop. At the same time, my mouse in xfce is *extremely* slow to respond and key presses are also slow and occasionally repeating. Input to the server via SSH is normal throughout.

When the problem went away, mouse and keyboard responded normally and audio was fine.

Any pointers you can think of would be greatly appreciated. This is driving me mad and the WAF is dropping very quickly - have been using MythTV for years without anything like this happening before.
jksj
Senior
Posts: 148
Joined: Thu Feb 13, 2014 7:53 pm
Great Britain

Re: Audio looping on pause / stop (10 seconds)

Post by jksj »

Standard Ubuntu with GDM etc works fine on 19.10

Code: Select all

Apr  9 10:01:03 tv /usr/lib/gdm3/gdm-x-session[1355]: (II) NVIDIA GLX Module  430.50  Thu Sep  5 22:41:46 CDT 2019
Apr  9 10:01:03 tv dbus-daemon[1361]: [session uid=1000 pid=1361] AppArmor D-Bus mediation is enabled
Apr  9 10:01:03 tv kernel: [   19.566754] resource sanity check: requesting [mem 0x000c0000-0x000fffff], which spans more than PCI Bus 0000:00 [mem 0x000d0000-0x000d3fff window]
Apr  9 10:01:03 tv kernel: [   19.566947] caller os_map_kernel_space.part.0+0x73/0x80 [nvidia] mapping multiple BARs
Apr  9 10:01:03 tv /usr/lib/gdm3/gdm-x-session[1355]: (--) NVIDIA(0): Valid display device(s) on GPU-0 at PCI:1:0:0
Apr  9 10:01:03 tv /usr/lib/gdm3/gdm-x-session[1355]: (--) NVIDIA(0):     DFP-0
Apr  9 10:01:03 tv /usr/lib/gdm3/gdm-x-session[1355]: (--) NVIDIA(0):     DFP-1 (boot)
Apr  9 10:01:03 tv /usr/lib/gdm3/gdm-x-session[1355]: (**) NVIDIA(0): Using ConnectedMonitor string "DFP-1".
Apr  9 10:01:03 tv /usr/lib/gdm3/gdm-x-session[1355]: (II) NVIDIA(0): NVIDIA GPU GeForce GT 1030 (GP108-A) at PCI:1:0:0 (GPU-0)
User avatar
heyted
Senior
Posts: 301
Joined: Sun Jun 08, 2014 2:14 am
Location: South Florida
Contact:
United States of America

Re: Audio looping on pause / stop (10 seconds)

Post by heyted »

Has anyone seen anything like this ?

Yes. I have seen those exact symptoms, but it was random and infrequent. I had a NUC with a low power (15 watts TDP and 9.5 watts TDP-down) Core i5 (i5-6260U) processor and Intel graphics. I don't know if it was the hardware causing the problem, but I have not had the problem since replacing the NUC.
Ted | My blog
Post Reply