linux, pulseaudio (?): VoEHardware:GetRecordingDeviceName: Failed 1

RESOLVED DUPLICATE of bug 1332887

Status

()

Core
WebRTC: Audio/Video
RESOLVED DUPLICATE of bug 1332887
a year ago
9 months ago

People

(Reporter: kokoko3k, Unassigned)

Tracking

49 Branch
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [question 2016-11-24 to reporter])

(Reporter)

Description

a year ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0
Build ID: 20160923225245

Steps to reproduce:

I tried to test webrtc on  https://test.webrtc.org


Actual results:

It was unable to access microphone, and popup the message:
Failed to access your computer's camera and microphone (NotFoundError: The object can not be found here.).

I started firefox with: NSPR_LOG_MODULES=MediaManager:5,GetUserMedia:5
and in the terminal it prints a lot of:
[Unnamed thread 0x7f6170ebc040]: D/GetUserMedia  VoEHardware:GetRecordingDeviceName: Failed 1

Other webrtc sites fails as well; i also tried to manually grant the permissions to the webpage, but without success.

If relevant, i'm using Alsa + pulseaudio at the same time by telling pulseaudio to not grab the hardware alsa device, but to use dmix + dsnoop instead

The configuration do work because:
* mpv is aple to play via pulseaudio and alsa at the same time
* "parec|aplay  -f cd" does work echoing the micropohone output.
* chromium, via the same pulseaudio configuration does work on the same website



Expected results:

To have webrtc microphone input working...
(Reporter)

Updated

a year ago
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
(Reporter)

Comment 1

a year ago
As side notes, i also tried to use a blank profile and the nightly build (52 branch).
The same happens.

Updated

a year ago
Component: Untriaged → WebRTC: Audio/Video
Product: Firefox → Core
Does the same happen if you go to about:config and set the pref "media.navigator.audio.full_duplex" to false? Restart might be required.
Flags: needinfo?(kokoko3k)
(Reporter)

Comment 3

a year ago
media.navigator.audio.full_duplex set to false make it work.
What are the downsides?
Thanks.

Full duplex is our new way that does audio input and output in the same audio callback from the OS. It also means we had to implement our own capturing backends for all platforms.

Without it you have separate callbacks and the latency from input to output is not guaranteed constant and probably a bit higher than with full duplex enabled.
Blocks: 1243857
Flags: needinfo?(kokoko3k)
I tested on a Fedora 24 with out of the box configuration of PulseAudio in latest Nightly and works. The webrtc test page is green for microphone capture. I am not sure about the given log line because in normal circumstances is not the VoEHardware object that provides the device info for that scenario.

First I would suggest to test using latest Nightly. There are no big changes in that area for a long time but latest is always preferable.

If the problem persists take some logs with MOZ_LOG=MediaManager:5,GetUserMedia:5,MediaStreamGraph:5
It's better to test in https://mozilla.github.io/webrtc-landing/gum_test.html use Audio button. If system cannot read your device a Source Not Found Error will appear. Otherwise you will able to hear your voice.

I cannot be sure without logs but I would suspect some kind of configuration issue. Your configuration might not be wrong but may confuse Firefox.

PS. All the above with the pref set to true
(Reporter)

Comment 6

a year ago
I'm testing nightly from 2016-10-03 (52), and the profile is new.
Here is the console log with MOZ_LOG=MediaManager:5,GetUserMedia:5,MediaStreamGraph:5 on https://mozilla.github.io/webrtc-landing/gum_test.html

[Main Thread]: D/MediaManager MediaManager: default prefs: 0x0 @30fps (min 10), 1000Hz test tones, aec: on,agc: off, noise: on, aec level: 1, agc level: 1, noise level: 1,playout delay: 50, full_duplex, extended aec on, delay_agnostic on
[Main Thread]: D/MediaManager New Media thread for gum
[Unnamed thread 0x7fb5871611a0]: D/GetUserMedia Cubeb device 0: type 0x1, state 0x0, name Monitor of Built-in Audio, id 7fb57963b1a0
[Unnamed thread 0x7fb5871611a0]: D/GetUserMedia Cubeb device 1: type 0x1, state 0x0, name Built-in Audio, id 7fb57a32b880
[Unnamed thread 0x7fb5871611a0]: D/GetUserMedia Cubeb default input device -1
[Unnamed thread 0x7fb5871611a0]: D/GetUserMedia  VoEHardware:GetRecordingDeviceName: Failed 1
The log is deceiving (we have to update it). It's cubeb backend here and not the webrtc.

The problem is that the two input devices found by the backend are considered to be in disable state. Can you please check your configuration. The backend uses PulseAudio API to get the info. If they are reported as disable in PulseAudio the same will be for Firefox. If you manage to have them enable for PulseAudio it will work.
Whiteboard: [question 2016-10-10 to reporter]
(Reporter)

Comment 8

a year ago
I never used pulseaudio and i'm using it via dmix/dsnoop backend just because of firefox, because i'm fine with libalsa.
So i don't know if this is what you asked, but here is the output of:

# pacmd list-sources|grep state
        state: RUNNING
        state: RUNNING
        state: RUNNING


Full output:
#pacmd list-sources

3 source(s) available.
    index: 0
        name: <combined.monitor>
        driver: <module-combine-sink.c>
        flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
        state: RUNNING
        suspend cause: 
        priority: 1000
        volume: front-left: 65536 / 100% / 0,00 dB,   front-right: 65536 / 100% / 0,00 dB
                balance 0,00
        base volume: 65536 / 100% / 0,00 dB
        volume steps: 65537
        muted: no
        current latency: 0,00 ms
        max rewind: 0 KiB
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 1
        linked by: 1
        configured latency: 40,00 ms; range is 0,50 .. 92,88 ms
        monitor_of: 0
        module: 9
        properties:
                device.description = "Monitor Source of Simultaneous output to Built-in Audio"
                device.class = "monitor"
                device.icon_name = "audio-input-microphone"
    index: 1
        name: <alsa_output.Real.monitor>
        driver: <module-alsa-sink.c>
        flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
        state: RUNNING
        suspend cause: 
        priority: 1000
        volume: front-left: 65536 / 100% / 0,00 dB,   front-right: 65536 / 100% / 0,00 dB
                balance 0,00
        base volume: 65536 / 100% / 0,00 dB
        volume steps: 65537
        muted: no
        current latency: 0,00 ms
        max rewind: 16 KiB
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 2
        linked by: 2
        configured latency: 40,00 ms; range is 0,50 .. 92,88 ms
        monitor_of: 1
        module: 21
        properties:
                device.description = "Monitor of Built-in Audio"
                device.class = "monitor"
                device.icon_name = "audio-input-microphone"
  * index: 2
        name: <alsa_input.dsnoop>
        driver: <module-alsa-source.c>
        flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
        state: RUNNING
        suspend cause: 
        priority: 9950
        volume: front-left: 65536 / 100% / 0,00 dB,   front-right: 65536 / 100% / 0,00 dB
                balance 0,00
        base volume: 65536 / 100% / 0,00 dB
        volume steps: 65537
        muted: no
        current latency: 353,56 ms
        max rewind: 0 KiB
        sample spec: s32le 2ch 48000Hz
        channel map: front-left,front-right
                     Stereo
        used by: 1
        linked by: 1
        configured latency: 40,00 ms; range is 0,50 .. 341,33 ms
        module: 22
        properties:
                alsa.resolution_bits = "32"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "ALC887-VD Analog"
                alsa.id = "ALC887-VD Analog"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0xf7300000 irq 28"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:1b.0"
                sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "8ca0"
                device.product.name = "9 Series Chipset Family HD Audio Controller"
                device.form_factor = "internal"
                device.string = "dsnoop"
                device.buffering.buffer_size = "131072"
                device.buffering.fragment_size = "8192"
                device.access_mode = "mmap+timer"
                device.description = "Built-in Audio"
                device.icon_name = "audio-input-microphone-pci"
(Reporter)

Comment 9

a year ago
Ops,
I just killed pulseaudio and tried with the non-nightly version of firefox (so it is stable 49.0.1) using plain libalsa and i discovered that i've the same issue (duplex does NOT work, half-duplex does work).

logs:
[Main Thread]: D/MediaManager MediaManager: default prefs: 0x0 @30fps (min 10), 1000Hz test tones, aec: on,agc: off, noise: on, aec level: 1, agc level: 1, noise level: 1,playout delay: 50, full_duplex, extended aec on, delay_agnostic on
[Main Thread]: D/MediaManager New Media thread for gum
[Unnamed thread 0x7ffaf9da50c0]: D/GetUserMedia  VoEHardware:GetRecordingDeviceName: Failed 1
[Main Thread]: D/MediaManager Sent recording-window-ended for window 4294967303 (outer 4294967301)
[Unnamed thread 0x7ffaf9da50c0]: D/GetUserMedia  VoEHardware:GetRecordingDeviceName: Failed 1
[..]
[Unnamed thread 0x7ffaf9da50c0]: D/GetUserMedia  VoEHardware:GetRecordingDeviceName: Failed 1

...i don't know if the issue is the same; i can assure that the profile is brand new.
(Reporter)

Updated

a year ago
Summary: linux, pulseaudio: VoEHardware:GetRecordingDeviceName: Failed 1 → linux, pulseaudio (?): VoEHardware:GetRecordingDeviceName: Failed 1
One of your input devices should be reported as "active port". The following command should return at least one input device: pacmd list-sources | grep "active port"

I am not an expert on PulseAudio but pavucontrol should allow you set a port as active. Another _guess_ is that your PulseAudio version is old. You could also collaborate with PulseAudio developers in IRC channel or mailing list about it.
(Reporter)

Comment 11

a year ago
Using Arch, so my pulseaudio is not old: version is 9.0

Also, i'm afraid there is no "port" concept in my pulseaudio configuration.
Indeed, it is driving dmix libalsa device for output and dsnoop libalsa device for input.
That said, the apps i tried are able to use pulse for playback and recording (see first post) and chromium is able to do webrtc (see first post).

Does firefox requires an active "port" even if there is no "port" to choose? I would be happy to submit an issue to PulseAudio devs, the question is what should i say them? All of the tools i tried seems to work apart Firefox...
Firefox requires PulseAudio for Linux. The tools that you mention probably support alsa but that's not the case here. The half duplex supports alsa and that's why it works there. If you do not mind to have full duplex false you can go with it. Otherwise you have to add PulseAudio in your configuration chain. But I am not the right person to advice you how.
(Reporter)

Comment 13

a year ago
No, the tools i used does NOT support libalsa (firefox-nightly 52 and parec), or at least doesn't used libalsa during my tests.
Indeed, they use pulseaudio which, in turns, uses libalsa through libalsa dmix/dsnoop devices.

Probably there is a misunderstanding here (?)

"I AM" using pulseaudio; it is just that the backend my pulseaudio is using is not an hardware card, but a dmix device for playing and a dsnoop device for recording.
And I am sure about that, because pavucontrol correctly monitors input and output levels when chromium or firefox 52 nighty in half-duplex mode, or parec.

Pulseaudio supports multiple backends like network audio, hardware cards and libalsa devices.

The final question is, does firefox require pulseaudio to use an hardware backend for input and/or output?
If the answer is "YES" i'm ok with that, and i'll use half-duplex or chromium, but i'd like to be sure we're understanding each other first.

Thanks.
I believe it will work with your configuration as soon as PulseAudio supports it (as you say it does with other tools). The problem here is that Firefox tries to verify that the hardware device is enabled before open the stream. I can override that check and create a build. If you can try that version of Firefox we will verify the case.
I pushed the build: https://treeherder.mozilla.org/#/jobs?repo=try&revision=a6d67c257147

When is ready you can download it and try it.
Build is ready, you can download it from here: 
https://archive.mozilla.org/pub/firefox/try-builds/achronop@gmail.com-a6d67c257147f54549679c0b58f3b0710b900516/try-linux64/firefox-52.0a1.en-US.linux-x86_64.tar.bz2
(Reporter)

Comment 17

a year ago
Thank you for the test build.
I just tried, but unfortunately it is not working as well.
This time i think i have better logs.
from:
https://mozilla.github.io/webrtc-landing/gum_test.html
i've:
# NSPR_LOG_MODULES=MediaManager:5,GetUserMedia:5 ./firefox
[Main Thread]: D/MediaManager MediaManager: default prefs: 0x0 @30fps (min 10), 1000Hz test tones, aec: on,agc: off, noise: on, aec level: 1, agc level: 1, noise level: 1,playout delay: 50, full_duplex, extended aec on, delay_agnostic on
[Main Thread]: D/MediaManager New Media thread for gum
[Unnamed thread 0x7f084466eee0]: D/GetUserMedia Cubeb device 0: type 0x1, state 0x0, name Monitor Source of Simultaneous output to Built-in Audio, id 7f0832d9cda0
[Unnamed thread 0x7f084466eee0]: D/GetUserMedia Cubeb device 1: type 0x1, state 0x0, name Monitor of Built-in Audio, id 7f0832d9cde0
[Unnamed thread 0x7f084466eee0]: D/GetUserMedia Cubeb device 2: type 0x1, state 0x0, name Built-in Audio, id 7f0833e22360
[Unnamed thread 0x7f084466eee0]: D/GetUserMedia Cubeb default input device -1
[Unnamed thread 0x7f084466eee0]: D/GetUserMedia  VoEHardware:GetRecordingDeviceName: Failed 1

Switching to half-duplex:
# NSPR_LOG_MODULES=MediaManager:5,GetUserMedia:5 ./firefox -P roro -p roro
[Main Thread]: D/MediaManager MediaManager: default prefs: 0x0 @30fps (min 10), 1000Hz test tones, aec: on,agc: off, noise: on, aec level: 1, agc level: 1, noise level: 1,playout delay: 50, not full_duplex, extended aec on, delay_agnostic on
[Main Thread]: D/MediaManager New Media thread for gum
[Unnamed thread 0x7fcfe2f1bb60]: D/GetUserMedia  VoEHardware:GetRecordingDeviceName: Failed -1
[Main Thread]: D/MediaManager Sent recording-window-ended for window 2147483652 (outer 2147483649)
[Unnamed thread 0x7fcfe2f1bb60]: D/GetUserMedia  VoEHardware:GetRecordingDeviceName: Failed -1

<- here firefox asked for microphone sharing permission ->

[Unnamed thread 0x7fcfe2f1bb60]: D/MediaManager Audio config: aec: 1, agc: -1, noise: 1, delay: 50
[Unnamed thread 0x7fcfe2f1bb60]: D/MediaManager AllocChannel: sampling rate 32000
[Unnamed thread 0x7fcfe2f1bb60]: D/MediaManager Audio device 0 allocated
[Unnamed thread 0x7fcfe2f1bb60]: D/MediaManager Start audio for stream 7fcfe1f5e700
[Unnamed thread 0x7fcfe2f1bb60]: D/MediaManager started all sources
[Unnamed thread 0x7fcfe2f1dc00]: V/MediaManager NotifyPull, desired = 256
[Main Thread]: D/MediaManager Returning success for getUserMedia()
[Unnamed thread 0x7fcfe2f1bb60]: D/MediaManager Audio device 0 deallocated
[Unnamed thread 0x7fcfe2f1dc00]: V/MediaManager NotifyPull, desired = 640
[Main Thread]: D/MediaManager Listener removed on purpose, mFinished = 1
[Unnamed thread 0x7fcfe2f1bb60]: D/GetUserMedia  VoEHardware:GetRecordingDeviceName: Failed -1
[Main Thread]: D/MediaManager Sent recording-window-ended for window 2147483652 (outer 2147483649)
[Main Thread]: D/MediaManager Listener removed by DOM Destroy(), mFinished = 1


If i can test something deeply, please let me know.
Ping on full-duplex issue.  If this is only for a usecase we don't officially support, we can confirm with a low priority.
Flags: needinfo?(padenot)
Flags: needinfo?(achronop)
Whiteboard: [question 2016-10-10 to reporter]
Whiteboard: [needinfo to padenot/achronop 11/23]
Setup is strange but I do not want to give up without being sure that there is nothing we can do. The situation is better now because we have better log mechanism so we can capture proper cubeb logs. I will work with reporter to verify or drop it.

@reporter: Can you please test your scenario with latest Nightly and capture some logs. I ask you to do it again because now we can capture more logs that we need for this case. Please do not forget to set the media.navigator.audio.full_duplex to true and use for log flags: MOZ_LOG=timestamp,GetUserMedia:5,cubeb:5
Flags: needinfo?(padenot)
Flags: needinfo?(kokoko3k)
Flags: needinfo?(achronop)
Whiteboard: [needinfo to padenot/achronop 11/23] → [question 2016-11-24 to reporter]
(Reporter)

Comment 20

a year ago
I did all of my tests using firefox stable 50.0 and firefox-nightly 53.0a1.20161123
Exported:
NSPR_LOG_MODULES=MediaManager:5,GetUserMedia:5
MOZ_LOG=timestamp,GetUserMedia:5,cubeb:5

As a side note, on nightly half-duplex has stopped working too.

Results here:
http://pastebin.com/i09Ee78r
Flags: needinfo?(kokoko3k)
You do not need to set the old NSPR_LOG_MODULES variable. Give only MOZ_LOG=timestamp,GetUserMedia:5,cubeb:4 (note is changed from previous time). Optional you can set the MOZ_LOG_FILE=/path/to/file/filename if you want to get the logs in a file.

I built a new version which includes some more logs and removes any check for the input device. It's something like, "do not check if a device exist just try to use any". I am not sure for the behavior but I believe that if any device is registered in the backend will open it. Here is the link:

https://archive.mozilla.org/pub/firefox/try-builds/achronop@gmail.com-8058479d346cfa9a0c90ef408a923a4d19017fc9/try-linux64/firefox-53.0a1.en-US.linux-x86_64.tar.bz2

Please retest with this version and post back the logs.
Flags: needinfo?(kokoko3k)
(Reporter)

Comment 22

a year ago
I don't know why, but using MOZ_LOG=timestamp,GetUserMedia:5,cubeb:4 produces no related log at all.
The only thing i get in the console are the following messages:
# export MOZ_LOG=timestamp,GetUserMedia:5,cubeb:4 ; ./firefox https://test.webrtc.org/

(/tmp/firefox/plugin-container:30949): dconf-CRITICAL **: unable to create file '/run/user/0/dconf/user': Permission denied.  dconf will not work properly.

(/tmp/firefox/plugin-container:30949): dconf-CRITICAL **: unable to create file '/run/user/0/dconf/user': Permission denied.  dconf will not work properly.

(/tmp/firefox/plugin-container:30949): dconf-CRITICAL **: unable to create file '/run/user/0/dconf/user': Permission denied.  dconf will not work properly.
Failed to create secure directory (/run/user/0/pulse): Permission denied
Failed to create secure directory (/run/user/0/pulse): Permission denied
Failed to create secure directory (/run/user/0/pulse): Permission denied
Failed to create secure directory (/run/user/0/pulse): Permission denied

Yes, i'm testing as root and yes, /run/user/0/pulse is already in place, created 3 days ago by the system pulseaudio, while /run/user/0/dconf/user seems to be created just fine by firefox.

 date ; ls -la /run/user/0/dconf/user /run/user/0/pulse/
ven 25 nov 2016, 13.20.02, CET
-rw------- 1 root root  2 nov 25 13:15 /run/user/0/dconf/user

/run/user/0/pulse/:
total 4
drwx------ 2 root root  80 nov 22 10:24 .
drwx------ 6 root root 220 nov 25 12:57 ..
srw-rw-rw- 1 root root   0 nov 22 10:22 native
-rw------- 1 root root   5 nov 22 10:24 pid


So, no log at all and no more webrtc at all, even in half duplex.
(Reporter)

Comment 23

a year ago
Just tried as a standard user, more or less the same thing happens:
[p2p@Gozer firefox]$ export MOZ_LOG=timestamp,GetUserMedia:5,cubeb:4 ; ./firefox https://test.webrtc.org/
IcedTea-Web plugin is using out-dated configuration
IcedTea-Web plugin is using out-dated configuration
IcedTea-Web plugin is using out-dated configuration
IcedTea-Web plugin is using out-dated configuration
IcedTea-Web plugin is using out-dated configuration
IcedTea-Web plugin is using out-dated configuration
IcedTea-Web plugin is using out-dated configuration
IcedTea-Web plugin is using out-dated configuration
IcedTea-Web plugin is using out-dated configuration
IcedTea-Web plugin is using out-dated configuration
IcedTea-Web plugin is using out-dated configuration
IcedTea-Web plugin is using out-dated configuration
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied

(/tmp/firefox/plugin-container:2620): dconf-CRITICAL **: unable to create file '/home/p2p/.cache/dconf/user': Permission denied.  dconf will not work properly.

(/tmp/firefox/plugin-container:2620): dconf-CRITICAL **: unable to create file '/home/p2p/.cache/dconf/user': Permission denied.  dconf will not work properly.

(/tmp/firefox/plugin-container:2620): dconf-CRITICAL **: unable to create file '/home/p2p/.cache/dconf/user': Permission denied.  dconf will not work properly.
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied
Failed to create secure directory (/home/p2p/.pulse): Permission denied



[p2p@Gozer firefox]$ ls -la /home/p2p/.pulse /home/p2p/.cache/dconf/user
-rw------- 1 p2p users    2 nov 25 13:28 /home/p2p/.cache/dconf/user

/home/p2p/.pulse:
total 100
drwx------  2 p2p users  4096 nov 22 15:30 .
drwxr-xr-x 80 p2p users  4096 nov 25 13:23 ..
-rw-r--r--  1 p2p users 32768 nov 25  2013 a761fac3a0a97b32a4a0646949abf276-card-database.tdb
-rw-r--r--  1 p2p users    17 nov 25 13:27 a761fac3a0a97b32a4a0646949abf276-default-sink
-rw-r--r--  1 p2p users    18 nov 25 13:27 a761fac3a0a97b32a4a0646949abf276-default-source
-rw-r--r--  1 p2p users 24576 gen 13  2016 a761fac3a0a97b32a4a0646949abf276-device-manager.tdb
-rw-r--r--  1 p2p users 12288 nov 25 13:27 a761fac3a0a97b32a4a0646949abf276-device-volumes.tdb
lrwxrwxrwx  1 p2p users    23 nov 22 15:30 a761fac3a0a97b32a4a0646949abf276-runtime -> /tmp/pulse-PKdhtXMmr18n
-rw-r--r--  1 p2p users 16384 nov 25 13:27 a761fac3a0a97b32a4a0646949abf276-stream-volumes.tdb

[p2p@Gozer firefox]$ LC_ALL=C date
Fri Nov 25 13:30:35 CET 2016
I have a new custom build that might solve your case. Can you please test with it:

https://queue.taskcluster.net/v1/task/SADvo69GQeWkE5EBeYeHyQ/runs/0/artifacts/public/build/target.tar.bz2
(Reporter)

Comment 25

10 months ago
Thanks for your efforts, however i'm afraid it does not change much.

The log is the same, it just prepends to it the following:
# export MOZ_LOG=timestamp,GetUserMedia:5,cubeb:4 ; ./firefox -P vuoto https://test.webrtc.org/
2017-02-02 13:18:11.744322 UTC - [CubebOperation #1]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb_pulse.c:828: Requested buffer attributes maxlength 4294967295, tlength 8816, prebuf 4294967295, minreq 2204, fragsize 2204
2017-02-02 13:18:11.745871 UTC - [CubebOperation #1]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb_pulse.c:934: Output buffer attributes maxlength 4194304, tlength 6608, prebuf 4416, minreq 2200, fragsize 2204

Again, thanks.
If the log is similar with the one in Comment 23 the error is different than the original one (original error is the same with Bug 1332887). There is a second bug about it, Bug 1335329. Unfortunately with this error the failure is before we reach the other error so you are not benefited at all from the patch. However, as soon as this second problem is fixed, I'm pretty sure the original error is solved by the patch in the custom build. 

So, I need to figure out what is going on in the second one ...
See Also: → bug 1335329, bug 1332887
(Reporter)

Comment 27

10 months ago
Yes, apart from the first lines i posted in Comment 25, there are a couple of:

(/mnt/disco2/downloads/firefox/firefox:29196): dconf-CRITICAL **: unable to create file '/home/p2p/.cache/dconf/user': Permission denied.  dconf will not work properly.
and:

Failed to create secure directory (/home/p2p/.pulse): Permission denied
For the second problem can you please change the value of pref security.sandbox.content.level in about:config to 0 and retry.
A second work around, expected to work, is to open a new Non-e10s window and retry (without the pref change above). Can you please test both and tell me if they work for you?

PS. Use the custom build for both
I'm reasonably sure this is the same problem as bug 1335229 (and half of bug 1321134).  If the workaround in comment #29 doesn't work, then reopen this bug.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 10 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1335329
…sorry; that should've been bug 1335329 in that last comment.
(Reporter)

Comment 32

10 months ago
Well, using non e10 window will solve the something but not all of them.
i disabled e10s:
# export MOZ_LOG=timestamp,GetUserMedia:5,cubeb:4 ; ./firefox -p vuoto
2017-02-03 12:33:38.934697 UTC - [CubebOperation #1]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb_pulse.c:828: Requested buffer attributes maxlength 4294967295, tlength 8816, prebuf 4294967295, minreq 2204, fragsize 2204
2017-02-03 12:33:38.935298 UTC - [CubebOperation #1]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb_pulse.c:934: Output buffer attributes maxlength 4194304, tlength 13576, prebuf 11384, minreq 2200, fragsize 2204
2017-02-03 12:33:39.160880 UTC - [Unnamed thread 0x7f00318ecca0]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb.c:482: DeviceID: "combined.monitor"
        Name:   "Monitor Source of Simultaneous output to Built-in Audio"
        Group:  "(null)"
        Vendor: "(null)"
        Type:   input
        State:  enabled
        Maximum channels:       2
        Format: S1
2017-02-03 12:33:39.160897 UTC - [Unnamed thread 0x7f00318ecca0]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb.c:482: DeviceID: "alsa_output.Real.monitor"
        Name:   "Monitor of Built-in Audio"
        Group:  "(null)"
        Vendor: "(null)"
        Type:   input
        State:  enabled
        Maximum channels:       2
        Format: S16LE S16BE F32LE F32BE 
2017-02-03 12:33:39.160911 UTC - [Unnamed thread 0x7f00318ecca0]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb.c:482: DeviceID: "alsa_input.dsnoop" (PREFERRED)
        Name:   "Built-in Audio"
        Group:  "/devices/pci0000:00/0000:00:1b.0/sound/card0"
        Vendor: "Intel Corporation"
        Type:   input
        State:  enabled
        Maximum ch
2017-02-03 12:33:39.160922 UTC - [Unnamed thread 0x7f00318ecca0]: D/GetUserMedia Cubeb device 0: type 0x1, state 0x2, name Monitor Source of Simultaneous output to Built-in Audio, id 7f0058be1180
2017-02-03 12:33:39.160926 UTC - [Unnamed thread 0x7f00318ecca0]: D/GetUserMedia Cubeb device 1: type 0x1, state 0x2, name Monitor of Built-in Audio, id 7f0058be11c0
2017-02-03 12:33:39.160930 UTC - [Unnamed thread 0x7f00318ecca0]: D/GetUserMedia Cubeb device 2: type 0x1, state 0x2, name Built-in Audio, id 7f0058be1700
2017-02-03 12:33:39.160933 UTC - [Unnamed thread 0x7f00318ecca0]: D/GetUserMedia Cubeb default input device -1
2017-02-03 12:33:39.162294 UTC - [Unnamed thread 0x7f00318ecca0]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb.c:482: DeviceID: "combined.monitor"
        Name:   "Monitor Source of Simultaneous output to Built-in Audio"
        Group:  "(null)"
        Vendor: "(null)"
        Type:   input
        State:  enabled
        Maximum channels:       2
        Format: S1
2017-02-03 12:33:39.162305 UTC - [Unnamed thread 0x7f00318ecca0]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb.c:482: DeviceID: "alsa_output.Real.monitor"
        Name:   "Monitor of Built-in Audio"
        Group:  "(null)"
        Vendor: "(null)"
        Type:   input
        State:  enabled
        Maximum channels:       2
        Format: S16LE S16BE F32LE F32BE 
2017-02-03 12:33:39.162317 UTC - [Unnamed thread 0x7f00318ecca0]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb.c:482: DeviceID: "alsa_input.dsnoop" (PREFERRED)
        Name:   "Built-in Audio"
        Group:  "/devices/pci0000:00/0000:00:1b.0/sound/card0"
        Vendor: "Intel Corporation"
        Type:   input
        State:  enabled
        Maximum ch
2017-02-03 12:33:39.162326 UTC - [Unnamed thread 0x7f00318ecca0]: D/GetUserMedia Cubeb device 0: type 0x1, state 0x2, name Monitor Source of Simultaneous output to Built-in Audio, id 7f0058be18e0
2017-02-03 12:33:39.162329 UTC - [Unnamed thread 0x7f00318ecca0]: D/GetUserMedia Cubeb device 1: type 0x1, state 0x2, name Monitor of Built-in Audio, id 7f0058be1920
2017-02-03 12:33:39.162332 UTC - [Unnamed thread 0x7f00318ecca0]: D/GetUserMedia Cubeb device 2: type 0x1, state 0x2, name Built-in Audio, id 7f0058be1e60
2017-02-03 12:33:39.162335 UTC - [Unnamed thread 0x7f00318ecca0]: D/GetUserMedia Cubeb default input device -1

test.webrtc.org asks for permissions and firefox want me to choose what device to open as source, but it fails to understand the default one, it shows me de following in the combobox:

First Problem:
default: "Monitor Source of Simultaneous output to Built-in Audio"
"Monitor Source of Simultaneous output to Built-in Audio"
"Monitor of Built-in Audio"
"Built-in Audio"

But my preferred input source is the follwing:
# pacmd list-sources|grep 'index\|device.description'
    index: 0
                device.description = "Monitor Source of Simultaneous output to Built-in Audio"
    index: 1
                device.description = "Monitor of Built-in Audio"
  * index: 2
                device.description = "Built-in Audio"

See the "*" near index 2.

Problem 2:
I select "Built-in Audio" and choose "remember"
First time it works, but if i reload the page, it tries to open "Monitor Source of Simultaneous output to Built-in Audio" again, and fails to record anything (that input source does not work)

In the console, i read:
2017-02-03 13:06:06.253875 UTC - [CubebOperation #1]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb_pulse.c:828: Requested buffer attributes maxlength 4294967295, tlength 8816, prebuf 4294967295, minreq 2204, fragsize 2204
2017-02-03 13:06:06.254682 UTC - [CubebOperation #1]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb_pulse.c:934: Output buffer attributes maxlength 4194304, tlength 10048, prebuf 7856, minreq 2200, fragsize 2204
2017-02-03 13:06:06.475163 UTC - [Unnamed thread 0x7f4c83282460]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb.c:482: DeviceID: "combined.monitor"
        Name:   "Monitor Source of Simultaneous output to Built-in Audio"
        Group:  "(null)"
        Vendor: "(null)"
        Type:   input
        State:  enabled
        Maximum channels:       2
        Format: S1
2017-02-03 13:06:06.475181 UTC - [Unnamed thread 0x7f4c83282460]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb.c:482: DeviceID: "alsa_output.Real.monitor"
        Name:   "Monitor of Built-in Audio"
        Group:  "(null)"
        Vendor: "(null)"
        Type:   input
        State:  enabled
        Maximum channels:       2
        Format: S16LE S16BE F32LE F32BE 
2017-02-03 13:06:06.475189 UTC - [Unnamed thread 0x7f4c83282460]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb.c:482: DeviceID: "alsa_input.dsnoop" (PREFERRED)
        Name:   "Built-in Audio"
        Group:  "/devices/pci0000:00/0000:00:1b.0/sound/card0"
        Vendor: "Intel Corporation"
        Type:   input
        State:  enabled
        Maximum ch
2017-02-03 13:06:06.475197 UTC - [Unnamed thread 0x7f4c83282460]: D/GetUserMedia Cubeb device 0: type 0x1, state 0x2, name Monitor Source of Simultaneous output to Built-in Audio, id 7f4c719a03c0
2017-02-03 13:06:06.475202 UTC - [Unnamed thread 0x7f4c83282460]: D/GetUserMedia Cubeb device 1: type 0x1, state 0x2, name Monitor of Built-in Audio, id 7f4c719a0420
2017-02-03 13:06:06.475206 UTC - [Unnamed thread 0x7f4c83282460]: D/GetUserMedia Cubeb device 2: type 0x1, state 0x2, name Built-in Audio, id 7f4c719a0960
2017-02-03 13:06:06.475209 UTC - [Unnamed thread 0x7f4c83282460]: D/GetUserMedia Cubeb default input device -1
2017-02-03 13:06:06.477111 UTC - [Unnamed thread 0x7f4c83282460]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb.c:482: DeviceID: "combined.monitor"
        Name:   "Monitor Source of Simultaneous output to Built-in Audio"
        Group:  "(null)"
        Vendor: "(null)"
        Type:   input
        State:  enabled
        Maximum channels:       2
        Format: S1
2017-02-03 13:06:06.477126 UTC - [Unnamed thread 0x7f4c83282460]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb.c:482: DeviceID: "alsa_output.Real.monitor"
        Name:   "Monitor of Built-in Audio"
        Group:  "(null)"
        Vendor: "(null)"
        Type:   input
        State:  enabled
        Maximum channels:       2
        Format: S16LE S16BE F32LE F32BE 
2017-02-03 13:06:06.477138 UTC - [Unnamed thread 0x7f4c83282460]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb.c:482: DeviceID: "alsa_input.dsnoop" (PREFERRED)
        Name:   "Built-in Audio"
        Group:  "/devices/pci0000:00/0000:00:1b.0/sound/card0"
        Vendor: "Intel Corporation"
        Type:   input
        State:  enabled
        Maximum ch
2017-02-03 13:06:06.477147 UTC - [Unnamed thread 0x7f4c83282460]: D/GetUserMedia Cubeb device 0: type 0x1, state 0x2, name Monitor Source of Simultaneous output to Built-in Audio, id 7f4c719a0d60
2017-02-03 13:06:06.477150 UTC - [Unnamed thread 0x7f4c83282460]: D/GetUserMedia Cubeb device 1: type 0x1, state 0x2, name Monitor of Built-in Audio, id 7f4c719a0da0
2017-02-03 13:06:06.477153 UTC - [Unnamed thread 0x7f4c83282460]: D/GetUserMedia Cubeb device 2: type 0x1, state 0x2, name Built-in Audio, id 7f4c720a7e60
2017-02-03 13:06:06.477156 UTC - [Unnamed thread 0x7f4c83282460]: D/GetUserMedia Cubeb default input device -1
2017-02-03 13:06:06.525210 UTC - [Unnamed thread 0x7f4c83282460]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb.c:482: DeviceID: "combined.monitor"
        Name:   "Monitor Source of Simultaneous output to Built-in Audio"
        Group:  "(null)"
        Vendor: "(null)"
        Type:   input
        State:  enabled
        Maximum channels:       2
        Format: S1
2017-02-03 13:06:06.525248 UTC - [Unnamed thread 0x7f4c83282460]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb.c:482: DeviceID: "alsa_output.Real.monitor"
        Name:   "Monitor of Built-in Audio"
        Group:  "(null)"
        Vendor: "(null)"
        Type:   input
        State:  enabled
        Maximum channels:       2
        Format: S16LE S16BE F32LE F32BE 
2017-02-03 13:06:06.525257 UTC - [Unnamed thread 0x7f4c83282460]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb.c:482: DeviceID: "alsa_input.dsnoop" (PREFERRED)
        Name:   "Built-in Audio"
        Group:  "/devices/pci0000:00/0000:00:1b.0/sound/card0"
        Vendor: "Intel Corporation"
        Type:   input
        State:  enabled
        Maximum ch
2017-02-03 13:06:06.525265 UTC - [Unnamed thread 0x7f4c83282460]: D/GetUserMedia Cubeb device 0: type 0x1, state 0x2, name Monitor Source of Simultaneous output to Built-in Audio, id 7f4c72c297a0
2017-02-03 13:06:06.525270 UTC - [Unnamed thread 0x7f4c83282460]: D/GetUserMedia Cubeb device 1: type 0x1, state 0x2, name Monitor of Built-in Audio, id 7f4c72c297e0
2017-02-03 13:06:06.525275 UTC - [Unnamed thread 0x7f4c83282460]: D/GetUserMedia Cubeb device 2: type 0x1, state 0x2, name Built-in Audio, id 7f4c72c29d20
2017-02-03 13:06:06.525280 UTC - [Unnamed thread 0x7f4c83282460]: D/GetUserMedia Cubeb default input device -1
2017-02-03 13:06:06.599598 UTC - [CubebOperation #1]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb_pulse.c:828: Requested buffer attributes maxlength 4294967295, tlength 8816, prebuf 4294967295, minreq 2204, fragsize 2204
2017-02-03 13:06:06.599627 UTC - [CubebOperation #1]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb_pulse.c:828: Requested buffer attributes maxlength 4294967295, tlength 4408, prebuf 4294967295, minreq 1102, fragsize 1102
2017-02-03 13:06:06.600881 UTC - [CubebOperation #1]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb_pulse.c:934: Output buffer attributes maxlength 4194304, tlength 10048, prebuf 7856, minreq 2200, fragsize 2204
2017-02-03 13:06:06.600899 UTC - [CubebOperation #1]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb_pulse.c:941: Input buffer attributes maxlength 4194304, tlength 4408, prebuf 4294967295, minreq 1102, fragsize 2820
2017-02-03 13:06:08.825134 UTC - [Unnamed thread 0x7f4c83282460]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb.c:482: DeviceID: "combined.monitor"
        Name:   "Monitor Source of Simultaneous output to Built-in Audio"
        Group:  "(null)"
        Vendor: "(null)"
        Type:   input
        State:  enabled
        Maximum channels:       2
        Format: S1
2017-02-03 13:06:08.825159 UTC - [Unnamed thread 0x7f4c83282460]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb.c:482: DeviceID: "alsa_output.Real.monitor"
        Name:   "Monitor of Built-in Audio"
        Group:  "(null)"
        Vendor: "(null)"
        Type:   input
        State:  enabled
        Maximum channels:       2
        Format: S16LE S16BE F32LE F32BE 
2017-02-03 13:06:08.825166 UTC - [Unnamed thread 0x7f4c83282460]: E/cubeb /home/worker/workspace/build/src/media/libcubeb/src/cubeb.c:482: DeviceID: "alsa_input.dsnoop" (PREFERRED)
        Name:   "Built-in Audio"
        Group:  "/devices/pci0000:00/0000:00:1b.0/sound/card0"
        Vendor: "Intel Corporation"
        Type:   input
        State:  enabled
        Maximum ch
2017-02-03 13:06:08.825172 UTC - [Unnamed thread 0x7f4c83282460]: D/GetUserMedia Cubeb device 0: type 0x1, state 0x2, name Monitor Source of Simultaneous output to Built-in Audio, id 7f4c831e8a00
2017-02-03 13:06:08.825187 UTC - [Unnamed thread 0x7f4c83282460]: D/GetUserMedia Cubeb device 1: type 0x1, state 0x2, name Monitor of Built-in Audio, id 7f4c831e8a40
2017-02-03 13:06:08.825189 UTC - [Unnamed thread 0x7f4c83282460]: D/GetUserMedia Cubeb device 2: type 0x1, state 0x2, name Built-in Audio, id 7f4c831e8f80
2017-02-03 13:06:08.825204 UTC - [Unnamed thread 0x7f4c83282460]: D/GetUserMedia Cubeb default input device -1


I reopened the bug report, tho i understand that the problem is changed now.
Status: RESOLVED → UNCONFIRMED
Flags: needinfo?(kokoko3k)
Resolution: DUPLICATE → ---
Thanks for reopening. I could investigate your 1st problem but the 2nd in unrelated to audiobackend. Can you please open a separate bug for 2nd problem. 

Question: I guess now the sound works and you can use it, right?

PS. If you do the workaround described in comment 28 you can enable e10s, in case you prefer it.
(Reporter)

Comment 34

10 months ago
I tried to "disable" the sandbox leaving e10s on, and it works,
> Question: I guess now the sound works and you can use it, right?
Yes it seems i can :)
Status: UNCONFIRMED → RESOLVED
Last Resolved: 10 months ago10 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1332887
The second problem you described is similar to Bug 1142123. Nevertheless, your case, is possible to be a side effect of wrong default device selection. The fix will be on tomorrow Nightly, you can check and tell us.
You need to log in before you can comment on or make changes to this bug.