0

RV on CentOS7: RV is blocking other applications from playing, and other applications are blocking RV

We have 24 people affected by this issue, I was wondering if you guys know about this issue and have a fix. We are using standard CentOS 7 ALSA and Pulseaudio librairies to drive onboard audio on our workstations:

rtheriault@mandarin 133% rpm -qa|grep alsa
alsa-tools-firmware-1.0.27-4.el7.x86_64
alsa-firmware-1.0.27-2.el7.noarch
alsa-lib-1.0.27.2-3.el7.x86_64
rtheriault@mandarin 134% rpm -qa | grep pulse
pulseaudio-gdm-hooks-3.0-22.el7.x86_64
pulseaudio-libs-glib2-3.0-22.el7.x86_64
pulseaudio-module-bluetooth-3.0-22.el7.x86_64
pulseaudio-libs-3.0-22.el7.x86_64
pulseaudio-3.0-22.el7.x86_64

Thanks!

 

28 comments

  • 0
    Avatar
    Jon Morley

    Hi Robin,

    1) Can you please tell me what version of RV you are using?

    2) Can you please tell me all of your Audio settings from RV's preferences dialog? A screen capture would be great.

    3) What setting have you tried in your testing?

    We have long had reports of issues with pulseaudio in linux. It is a fragile library that often causes issues including crashes. In the past we recommended against its use for many years. I am not sure if the library has matured recently, but if you can test on a machine without it I would check that option out as well.

    Thanks,
    Jon

  • 0
    Avatar
    robintheriault

    Hi Johan,

    1) 

    <!--StartFragment-->RV 6.2.1 RELEASE

    Release Version

    RV Copyright (c) 2015 Autodesk, Inc. All Rights Reserved.

    Compiled using GCC44, on Linux IA32_64 with optimization flags "-g -O3 -fno-schedule-insns -fno-schedule-insns2 -msse -msse2 -mmmx -mfpmath=sse -DNDEBUG" in build root rv-gcc-release-python2.7 (RELEASE).

    Build identifier: /packages/vendor/TweakSoftware/rv-Linux-x86-64-6.2.1/bin/rv.bin Version 6.2.1, built on Apr 28 2015 at 21:32:17 (HEAD=c13d3c5). (L) , HEAD=c13d3c5

    Qt version: 4.8.5 <!--EndFragment-->

    2)

    See RV-audio-prefs attached below. Note that we have tried different selections in there. The default card is an onboard Intel soundchip (ALC262), works fine with whatever app that seems to get a hold of it first.

    3)

    I have tried about every combination that would provide me with sound, that's why I was hoping you guys had heard of the issue before, and/or could recommend/advise if the standard CentOS ALSA/Pulseaudio packages we are using need to replaced and/or updated, but you are the RV expert so I am really glad for the opportunity to pick your brain.

    As for testing with a different setup (without Pulseaudio), I tried to remove it on mine last week and totally hosed my box (missing dependencies with X thashed my UI), I would need to find a safe way to remove it or build one especially for that purpose. I can go that route if we REALLY need it, as banning Pulseaudio as the culprit would imply quite a bit of work on our side.

  • 0
    Avatar
    robintheriault

    Oh, and I meant to write "Hi Jon" at the top of my previous reply...

  • 0
    Avatar
    robintheriault

    Hi there, any news about Cinesite support ticket #13524? Here are the latest updates:

    Updated by Taran Matharu 13 minutes ago

    Comment

    From the terminal:

    WARNING: ALSA: Playback open error (-16): Device or resource busy
    WARNING: ALSA: Playback open error (-16): Device or resource busy
    WARNING: ALSA: Playback open error (-16): Device or resource busy
    WARNING: ALSA: Playback open error (-16): Device or resource busy
    WARNING: ALSA: Playback open error (-16): Device or resource busy
    WARNING: ALSA: Playback open error (-16): Device or resource busy
    WARNING: ALSA: Playback open error (-16): Device or resource busy
    WARNING: ALSA: Playback open error (-16): Device or resource busy

    T

    On 12/06/15 01:56 PM, Robin Theriault (Help) wrote:

    Updated by Robin Theriault less than a minute ago

    Comment

    Adding a second sound card (USB headphones) is a workaround for this situation (validated with Taran), but is far from being an ideal solution. We poked Michele for information about our support contract with RV, we need to push it further with them.

  • 0
    Avatar
    robintheriault

    Updated by Taran Matharu 3 days ago

    Comment

    From the terminal:

    WARNING: ALSA: Playback open error (-16): Device or resource busy
    WARNING: ALSA: Playback open error (-16): Device or resource busy
    WARNING: ALSA: Playback open error (-16): Device or resource busy
    WARNING: ALSA: Playback open error (-16): Device or resource busy
    WARNING: ALSA: Playback open error (-16): Device or resource busy
    WARNING: ALSA: Playback open error (-16): Device or resource busy
    WARNING: ALSA: Playback open error (-16): Device or resource busy
    WARNING: ALSA: Playback open error (-16): Device or resource busy

    T

    On 12/06/15 01:56 PM, Robin Theriault (Help) wrote:

    Updated by Robin Theriault 3 days ago

    Comment

    Adding a second sound card (USB headphones) is a workaround for this situation (validated with Taran), but is far from being an ideal solution. We poked Michele for information about our support contract with RV, we need to push it further with them.

  • 0
    Avatar
    robintheriault

    The last 2 comments I posted on this request are not appearing on your forum, I only get a message in red at the top of the screen that my input will be "reviewed". I have tested with an additional external sound card (USB headphones) on one workstation and it is a valid workaround, albeit it is not one that we are inclined to use (buying 50 pairs of additional headphones seems a quite poor fix from my point of view). I am also awaiting on information about our support contract with you guys from our London office. Any development on your side? For your reference, our ticket number for this issue is 13524. Thanks.

  • 0
    Avatar
    Jon Morley

    Hi Robin,

    Sorry about the spam warning. We changed our settings for the forum a while back and it looks like it snagged some of your posts. Sorry! Do you see them now?

    Thanks,
    Jon

  • 0
    Avatar
    robintheriault

    Hi Jon, yes, I did not see it today and my comments are there. Cool!

  • 0
    Avatar
    Jon Morley

    Hi Robin,

    Can you tell me which USB headphones you are using? I would like to read about them for clues.

    Were you able to try on a machine with Pulseaudio removed?

    Thanks,
    Jon

  • 0
    Avatar
    Jon Morley

    Hi Robin,

    Not this specific issue, but over the years with various incarnations of RV and many many distros we have had all manner of audio issue reports. Usually we are able to find a solution between code and configuration and we move forward. The last time we really dug in we added another Audio Module (Platform Audio) that leveraged the Qt audio tools hoping by doing so we could leverage whatever gains they had made in untangling the mine field of linux audio. Sadly while that improved some parts it introduced issues in others. And fundamentally it did not make dealing with Pulse inadequacies any better.

    Pulse is extremely frail and even asking it for its state frequently crashes RV and/or parts of the linux audio system. That is why we have attempted to steer users away from it first and foremost. Since it appears that it is a core part of your workflow we will see what we can do it find other workarounds. Obviously we don't have the exact same setup as you and the setups we do have have not been exhibiting these issues even with Pulse installed.

    We are shorthanded at the moment and always have the development and support pipelines packed. If you could send us a list of the packages you have installed on your distro I will see if I can set one up that does match exactly (or at least look for related package overlap).

    RV's preference files are user readable/writable. Is that what you were asking? Are you looking for this?
    ~/.config/TweakSoftware/RV.conf

    Thanks,
    Jon

  • 0
    Avatar
    robintheriault

    Headphones are Microsoft Lifechat (a few years old) that I brought from home, but they have nothing special except being automatically detected by our CentOS workstations (all that was needed in fact for that test was a second soundcard,  then ALSA/PulseAudio and RV stopped arguing over the control of the sound card. As for trying without Pulse Audio, as you read in my previous comment, it totally hoses our machines (thrashes gnome). I did a bit a reading to know more about the Linux sound architecture: http://tuxradar.com/content/how-it-works-linux-audio-explained, I recommend it to get the big picture. Seems almost every distro out there uses Pulse Audio in combination with other things. Is there a non-graphical way to tweak RV (editable config files maybe?). Do you have any customers who experienced similar issues on Linux?

  • 0
    Avatar
    robintheriault

    Allrighty, thanks for the pointer to rv.conf, will see if I can experiment with this on my test setup. Will follow-up with a list of packages (sound-facing) that we use so we can benefit from your input (might be tomorrow, as I want to have our senior Linux admins to validate it to make sure it will be useful to you.

    Cheers, Robin.

  • 0
    Avatar
    robintheriault

    That looks relevant, but it might only correspond to GUI options we already tried, any thoughts?

    #!/bin/tcsh -f
    #
    # This script sets the RV_HOME environment (if not already set),
    # makes sure the plugins are the path and launches the actual binary.
    #
    # NOTE: doesn't properly set RV_HOME if invoked from a link to the script
    # and RV_HOME is not already set
    #

    set noglob

    #
    # Workaround for pulseaudio/libsndfile package mismatch on FC/Cent that causes
    # crash when accessing preferences.
    #
    if ((-e /usr/bin/padsp) && ! $?RV_DISABLE_PULSEAUDIO_WORKAROUND) then
    setenv OPTIONAL_PADSP /usr/bin/padsp
    else
    setenv OPTIONAL_PADSP ""
    endif

    if ($?QT_PLUGIN_PATH) then
    echo "INFO: warning: QT_PLUGIN_PATH is set, which can cause RV to load the wrong Qt libraries/plugins. Unsetting..."
    unsetenv QT_PLUGIN_PATH
    endif

    #
    # Uncomment this if you're on an older linux distro and RV is hanging in
    # the Audio preferences or on startup with audio sources
    #
    #setenv PA_ALSA_EXCLUDE_DMIX_DEFAULT 1

    #
    # Uncomment this if you want to use the old version of the audio library
    # which may work better on older linuxes.
    #
    #setenv RV_USE_OLD_PORTAUDIO

  • 0
    Avatar
    Jon Morley

    Hi Robin,

    Are you asking if the path I sent you to the preferences contains the same settings as are available in the GUI preferences? The answer to that is yes. They should be the same (and match).

    These other options you quoted are from the RV wrapper. You can see the history of various workarounds for linux audio like rings in the cross section of a tree. I suppose you could try disabling the Pulse Audio workaround by setting RV_DISABLE_PULSEAUDIO_WORKAROUND to 1, but that is usually an advantageous setting.

    I think we are just going to have to get an even closer setup to the one you have. If you can send along that package list that will help.

    Thanks,
    Jon

  • 0
    Avatar
    robintheriault

    Hi Jon, sorry for the delay (busy over here), here is the list:

    pulseaudio-module-bluetooth-3.0-22.el7.x86_64
    webrtc-audio-processing-0.1-5.el7.x86_64
    pulseaudio-libs-3.0-22.el7.x86_64
    audiofile-0.3.6-4.el7.x86_64
    pulseaudio-3.0-22.el7.x86_64
    audiofile-devel-0.3.6-4.el7.x86_64
    jack-audio-connection-kit-dbus-1.9.9.5-4.el7.x86_64
    pulseaudio-gdm-hooks-3.0-22.el7.x86_64
    jack-audio-connection-kit-1.9.9.5-4.el7.x86_64
    pulseaudio-libs-glib2-3.0-22.el7.x86_64

     

    Thanks!

  • 0
    Avatar
    robintheriault

    Hi Jon, any news on this fabulous issue?

    Cheers, Robin.

  • 0
    Avatar
    Jon Morley

    Hi Robin,

    I am super sorry for the slow response here. My primary (and only for the moment) computer is in the process of being replaced and I have not been able to boot reliably into the operating system it presently has let alone a new one. There is new hardware on the way. This would not be such a big problem except that we are are down from two primary support engineers to one (me) at the moment. I will return to this as soon as I get my new hardware in place.

    Thanks,
    Jon

  • 0
    Avatar
    robintheriault

    Hi Jon, no problem, hopefully you'll be back up and running soon!

    Robin

     

  • 0
    Avatar
    Jon Morley

    Hi Robin,

    Thank you for that. The new hardware should be in my hands soon btw.

    It sounds like RV is fundamentally designed to avoid sharing the audio device to make sure we can play sound when we need to. However if you are not attempting to hold open the device ten RV should allow other applications to play sound so long as RV is not actively playing itself. Can you please confirm for me that you have tried switching "Keep Audio Device Open When Not Playing" off from the Audio tab of RV's preferences? On some systems it takes a while for the device to free up when RV it is stopped.

    Secondly can you please send me a list of all your output modules and output devices which are available to you?

    We were able to test on an existing Centos7 system (with the same packages you have) which allowed both RV and other apps to use the audio simultaneously. This was done with the ALSA output module. We are investigating if this can be done with the more strict Platform Audio.

    Thanks,
    Jon

  • 0
    Avatar
    Jon Morley

    Hi Robin,

    Can you please send us a screen capture of the list of options for output device when you have ALSA-Pre selected as the module? We have found that in order to share audio on linux you have to select a software device. Which on our centos7 machine is the "default". This is pretty confusing since there is no information about what the device actually is underneath when "default" is all you see. We were able to check from inside the code that it was picking a software device on our machine. With any hardware device we were not able to share audio. Platform audio only provides hardware device options so none of its options allow sharing, except for when you are not trying to hold the device open. With any module or device selection when you are not trying to hold the device open you should be able to play sound in other apps if RV is stopped (not actively playing). This is all far from ideal, but I am hoping it is starting to make more sense.

    Thanks,
    Jon

  • 0
    Avatar
    robintheriault

    Hi Jon, will be back on this soon (been flooded over here). I am thinking of starting over with a test install of our CentOS image and a fresh Lenovo box so I can troubleshoot with you guys.

    Cheers,

    Robin

  • 0
    Avatar
    Jon Morley

    Hi Robin,

    Sounds good. Please keep us posted.

    Thanks,
    Jon

  • 0
    Avatar
    robintheriault

    Hi Jon,

    Hope you're doing well. Getting back to this issue (was a bit flooded over here, but my people are asking about a solution for this since it affects a lot of animators), will involve more people on my side and might need to get back to ticket format to be able to manage this for the group. Ticket 14106 still open on your side? Maybe we can paste our interaction here in there...

  • 0
    Avatar
    Jon Morley

    Hi Robin,

    Thank you for the update. We are currently looking on our side to find out why Qt isn't seeing the pulse option in "Platform Audio". We still believe that you should be able to share if you choose "ALSA Safe" and "default". Please let me know if that choice selection works. I will see what is going on with "Platform Audio".

    Thanks,
    Jon

  • 0
    Avatar
    Alan Trombla

    Hi Robin,

    FYI this turns out to be a bug in Qt.  We've patched it and the fix should show up (the "pulse" device should appear) in RV 6.2.5.

    Cheers,

    Alan

  • 0
    Avatar
    robintheriault

    Thanks Alan,

     Sorry for the late reply.  We were working on a workaround for awhile on our side and modified the pulse-alsa package libraries to achieve a fix. We then integrated the fix to our standard workstation image for those artists. But thank you for the update, we'll update RV! (I believe I might still have a ticket opened with you guys that I will track down and close).

    Cheers,

    Robin

  • 0
    Avatar
    Mark Carlson
    This is another major problem with el7 that I want to mention.  I'll submit it as a separate issue if that is preferable.
    RV audio playback on el7 is fragile with more than 4 RV's running.  We see the issue sometimes with the 4th RV but usually around 7 or 8.  Our artists often have 12 or so RV's running at the same time.  Not all are playing but a sequence of images is loaded.
    Symptoms: sound is corrupted, and RV's playback will be erratic and fast.  Must kill all RV's and relaunch RV to clear problem. Having to kill all the RV's to recover is REALLY bad.
    On el6 running ALSA Safe, if you had too many RV's playing you'd get bad performance but
    stopping some of the RV's would fix the issue.  No corrupt audio or frame rate issues occurred.
    On el7 we've tried all the various audio settings, and here are some findings:
    o Best RV preferences are ALSA Safe module, default output device, and don't keep audio port open while not playing.
    o With one RV's playing, can load a dozen or more RV's not playing, without issue.
    o with two RV's playing, can load 6 or so RV's not playing before problem occurs.
    o Platform Audio with default or pulse output is even more fragile.
    o Keeping the audio port open while stopped also increases the likely hood you will see the problem.
    o Problem can also be caused by having another app like a web browser playing audio.
    o We see the issue on systems with sound cards and without.
    ~mark
  • 0
    Avatar
    Jon Morley

    (For posterity work on this has been ongoing. If you are bit by similar issues please make sure to reach out to us either here or in a private ticket. Thanks!)

Please sign in to leave a comment.