Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chromium/brave error in trisquel etiona/ubuntu 18.0 #110

Open
susobaco opened this issue Apr 9, 2020 · 9 comments
Open

chromium/brave error in trisquel etiona/ubuntu 18.0 #110

susobaco opened this issue Apr 9, 2020 · 9 comments

Comments

@susobaco
Copy link

susobaco commented Apr 9, 2020

Hi, I can't get this browser to work with WEBRTC videoconferencing.
apulse with firefox, it recognizes capture and playback devices without problem. Firefox is not optimized for WEBRTC video conferencing and gives quite a few problems. But, with chromium or brave, it gives this error and does not recognize the microphone. The audio of the videoconferences is not heard, but youtube videos are.
It is a problem of de apulse or de chromium?

[apulse] [error] do_connect_pcm: can't open playback device "default". Error code -16 (Dispositivo o recurso ocupado)
[apulse] [error] do_connect_pcm: failed to open ALSA device. Apulse does no resampling or format conversion, leaving that task to ALSA plugins. Ensure that selected device is capable of playing a particular sample format at a particular rate. They have to be supported by either hardware directly, or by "plug" and "dmix" ALSA plugins which will perform required conversions on CPU.
[11341:11362:0409/202349.061588:ERROR:pulse_util.cc(320)] pa_stream went bad while waiting: 0
[apulse] [error] do_connect_pcm: can't open playback device "default". Error code -16 (Dispositivo o recurso ocupado)
[apulse] [error] do_connect_pcm: failed to open ALSA device. Apulse does no resampling or format conversion, leaving that task to ALSA plugins. Ensure that selected device is capable of playing a particular sample format at a particular rate. They have to be supported by either hardware directly, or by "plug" and "dmix" ALSA plugins which will perform required conversions on CPU.
[apulse] [error] do_connect_pcm: can't open playback device "default". Error code -16 (Dispositivo o recurso ocupado)
[apulse] [error] do_connect_pcm: failed to open ALSA device. Apulse does no resampling or format conversion, leaving that task to ALSA plugins. Ensure that selected device is capable of playing a particular sample format at a particular rate. They have to be supported by either hardware directly, or by "plug" and "dmix" ALSA plugins which will perform required conversions on CPU.
[apulse] [error] do_connect_pcm: can't open playback device "default". Error code -16 (Dispositivo o recurso ocupado)
[apulse] [error] do_connect_pcm: failed to open ALSA device. Apulse does no resampling or format conversion, leaving that task to ALSA plugins. Ensure that selected device is capable of playing a particular sample format at a particular rate. They have to be supported by either hardware directly, or by "plug" and "dmix" ALSA plugins which will perform required conversions on CPU.

Salud!

@susobaco
Copy link
Author

susobaco commented Apr 9, 2020

attach my .asoundrc

pcm.!default {
  type asym
  capture.pcm "mic"
  playback.pcm "speaker"
}
pcm.mic {
  type plug
  slave {
    pcm "hw:2,0"
  }
}
pcm.speaker {
  type plug
  slave {
    pcm "iec958:CARD=M1010LT,DEV=0"
    rate 44100
    #rate 48000
    format S16_LE
    #format S24_LE
    #format S32_LE
    #format FLOAT_LE
  }
}
ctl.speaker {
    type hw
    card 1
}

The rest of the programs work perfectly, so I'm afraid it's a chromiun problem, right?

@i-rinat
Copy link
Owner

i-rinat commented Apr 10, 2020

I don't think you need apulse for Chromium. As far as I know, it still supports ALSA. If you are installing apulse system-wide, it's also not a good idea, since apulse is not a complete implementation. There are a lot of missing pieces.

Next, your .asoundrc configuration has plug but not dmix. Unless your audio card has a hardware mixer, you'll be able to output one audio stream only. Apulse does no multiplexing. Instead it opens as many connections to the ALSA, as many PulseAudio streams an application requested. So, a first one will probably work OK, but a next one and ones after that will fail.

So, to solve the issue, I'd recommend either avoid using apulse with Chromium, or to change configuration to support software mixing (dmix). Default ALSA configuration should also work fine.

@susobaco
Copy link
Author

Hi, in principle chromium supports alsa, but I noticed that it produces some noises in the audio playback, so I tried to use apulse. With apulse, there are no such noises, the problem is that it doesn't recognize the microphone, not with hw nor with plughw and I don't know where the bug might be, since firefox does recognize it. I also don't know how to get a more detailed log.

@i-rinat
Copy link
Owner

i-rinat commented Apr 18, 2020

not with hw nor with plughw

Your configuration file has no dmix and no dsnoop. That means, only one playback stream is possible and only one capture stream is possible. While original PulseAudio would mix and multiplex streams for you, apulse relies on ALSA to make that possible.

Since you are overriding default ALSA configuration that had mixing and multiplexing enabled, it's your responsibility to re-implement mixing and multiplexing.

Unfortunately, I'm not an expert in ALSA configuration. Defaults always worked for me, so I had no need to learn details of the ALSA configuration language.

@susobaco
Copy link
Author

Thanks. I'll try dsnoop and see if he recognizes the microphone

@susobaco
Copy link
Author

I've done the test with the Brave Browser.
export APULSE_CAPTURE_DEVICE=plug:dsnoop export APULSE_PLAYBACK_DEVICE=plug:dmix && apulse brave-browser

I still don't recognize the microphone, the audio output works perfectly and the errors I get are these:

[26252:26252:0420/130558.271852:ERROR:edid_parser.cc(102)] Too short EDID data: manufacturer id
[26276:26276:0420/130558.417370:ERROR:vaapi_wrapper.cc(501)] The system version 1.1 should be greater than or equal to 1.5
[26276:26276:0420/130558.513715:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
[26252:26260:0420/130559.170678:ERROR:rewards_service_impl.cc(194)] Failed to read file: /home/familiact/.config/BraveSoftware/Brave-Browser/Default/ledger_state
[26289:26289:0420/130559.173981:ERROR:ledger_impl.cc(113)] Failed to initialize wallet
[26252:26252:0420/130559.634674:ERROR:CONSOLE(1)] "[Shields]: Can't request shields panel data. Error: No tab url specified", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1)
[26307:17:0420/130615.183821:ERROR:webrtc_video_engine.cc(3060)] Absent receive stream; ignoring clearing encoded frame sink for ssrc 0
[26252:26521:0420/130617.121282:ERROR:webrtc_event_log_manager_remote.cc(411)] Session ID already set.
[26307:17:0420/130617.143709:ERROR:webrtc_video_engine.cc(3060)] Absent receive stream; ignoring clearing encoded frame sink for ssrc 0
[26307:17:0420/130617.401986:ERROR:turn_port.cc(1847)] Received TURN CreatePermission error response, code=403; pruned connection.
[26307:17:0420/130617.402530:ERROR:turn_port.cc(1847)] Received TURN CreatePermission error response, code=403; pruned connection.
[26252:26521:0420/130617.426392:ERROR:webrtc_event_log_manager_remote.cc(411)] Session ID already set.
[26307:17:0420/130617.627600:ERROR:webrtc_video_engine.cc(3060)] Absent receive stream; ignoring clearing encoded frame sink for ssrc 0
[26252:26521:0420/130617.633684:ERROR:webrtc_event_log_manager_remote.cc(411)] Session ID already set.
[26252:26521:0420/130636.974843:ERROR:webrtc_event_log_manager_remote.cc(411)] Session ID already set.
[26252:26521:0420/130637.024773:ERROR:webrtc_event_log_manager_remote.cc(411)] Session ID already set.
[26252:26252:0420/130656.070114:ERROR:CONSOLE(1)] "[Shields]: Can't request shields panel data. Error: No tab url specified", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1)
[26252:26252:0420/130656.074890:ERROR:CONSOLE(1)] "[Shields]: Can't request shields panel data. Error: No tab url specified", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1)
[26252:26252:0420/130656.155169:ERROR:CONSOLE(0)] "Unchecked runtime.lastError: Cannot access contents of url "chrome://newtab/". Extension manifest must request permission to access this host.", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/_generated_background_page.html (0)
[26252:26252:0420/130658.416064:ERROR:gcm_channel_status_request.cc(145)] GCM channel request failed.
[26252:26252:0420/130718.880974:ERROR:gcm_channel_status_request.cc(145)] GCM channel request failed.
[26252:26252:0420/130816.441039:ERROR:gcm_channel_status_request.cc(145)] GCM channel request failed.
[26252:26252:0420/131011.870829:ERROR:gcm_channel_status_request.cc(145)] GCM channel request failed.
[26252:26252:0420/131211.031158:ERROR:CONSOLE(1)] "[Shields]: Can't request shields panel data. Error: No tab url specified", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1)
[26252:26252:0420/131211.032669:ERROR:CONSOLE(1)] "[Shields]: Can't request shields panel data. Error: No tab url specified", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1)
[27006:1:0420/131212.016234:ERROR:child_process_sandbox_support_impl_linux.cc(79)] FontService unique font name matching request did not receive a response.
[27006:18:0420/131222.168224:ERROR:webrtc_video_engine.cc(3060)] Absent receive stream; ignoring clearing encoded frame sink for ssrc 0
[27006:18:0420/131230.246990:ERROR:webrtc_video_engine.cc(3060)] Absent receive stream; ignoring clearing encoded frame sink for ssrc 0
[27006:17:0420/131238.703152:ERROR:audio_rtp_receiver.cc(89)] AudioRtpReceiver::OnSetVolume: No audio channel exists.
[26252:26252:0420/131344.049066:ERROR:gcm_channel_status_request.cc(145)] GCM channel request failed.
[26252:26252:0420/131928.740788:ERROR:gcm_channel_status_request.cc(145)] GCM channel request failed.

@i-rinat
Copy link
Owner

i-rinat commented Apr 20, 2020

APULSE_CAPTURE_DEVICE=plug:dsnoop export APULSE_PLAYBACK_DEVICE=plug:dmix

My knowledge of ALSA configuration is quite limited. And it's not enough to be sure whenever plug:dsnoop and plug:dmix are valid ALSA device names. Are you sure capture works in other applications if you use plug:dsnoop device?

@susobaco
Copy link
Author

No problem, with abrowser (firefox-based, recognizes the microphone and audio output without problems, works correctly. But neither in brave, nor chromium nor jitsi-meet-electron recognizes the microphone, with dmix output, no problem

@i-rinat
Copy link
Owner

i-rinat commented Apr 21, 2020

I finally tried to run Chromium with apulse. And indeed, audio capture doesn't work. At first I thought it was something to do with sandboxing, but even with disabled sandboxing capture doesn't work. Tracing shows that apulse is used, but at some point any interaction just stops. Perhaps, Chromium expects some callback to fire up, but apulse has no clue about it.

Looks like a bug in apulse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants