LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-21-2018, 03:10 PM   #1
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018
Firefox in Current: ALSA sound?


When I try playing the http://bbc.co.uk/html5 video player example in firefox I only get sound if I've started pulseaudio first. Without pulseaudio running, the video plays but there is no sound, and the following is written to stderr:
Code:
test@ws1:~$ firefox 
Sandbox: seccomp sandbox violation: pid 27864, tid 27972, syscall 16, args 54 2147767296 139688108567532 0 0 0.
Sandbox: seccomp sandbox violation: pid 27864, tid 27972, syscall 16, args 54 2147767296 139688108567532 0 0 0.
[Child 27864, MediaPlayback #1] WARNING: 7f0bae860940 OpenCubeb() failed to init cubeb: file /tmp/firefox-58.0/dom/media/AudioStream.cpp, line 387
[Child 27864, MediaPlayback #1] WARNING: Decoder=7f0ba56ae200 [OnMediaSinkAudioError]: file /tmp/firefox-58.0/dom/media/MediaDecoderStateMachine.cpp, line 3642
When pulseaudio is running, no messages are shown and sound can be heard.

I'm aware that the official mozilla builds of firefox have dropped support for ALSA, but I was under the impression that Pat was still building it with ALSA support compiled in. Has this changed with the new build script mentioned in today's changelog, or is this something that's happened upstream which now breaks use of ALSA?

BTW, No issues with google-chrome, which works both with and without the pulseaudio daemon running.
 
Old 01-21-2018, 03:19 PM   #2
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
"--enable-alsa" is still present between the build options, only the build system (that now uses the shipped mach) has changed

http://cgit.notk.org/adrien/slackwar...6647145db7a20d

it's just a guess but, if I have to choose, I would opt for the second possibility (upstream dropping alsa completely).

Last edited by ponce; 01-21-2018 at 03:25 PM.
 
1 members found this post helpful.
Old 01-21-2018, 03:39 PM   #3
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Original Poster
Rep: Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018
Thanks Matteo. When I first read about mozilla disabling ALSA support by default I guessed it would only be a matter of time before it was gone all together, so it wouldn't surprise me to hear this is what has happened.
 
Old 01-21-2018, 03:59 PM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
FWIW I came across conflicts between apps using pulse that then communicate with alsa and apps that rely on alsa directly (but that start pulseaudio anyway if asound.conf is as shipped) as that caused issue between speech and other audio apps in Slint.

To make a long story short, I have found a setting that helps in this case and could hopefully help as well in yours:
  • keep /etc/rc.d/{rc.pulseaudio,rc.alsa,rc.alsa-oss} 644 (which is the default in Slackware)
  • comment all lines in /etc/asound.conf or just (re)move this file.
  • apply this patch to /etc/pulse/default.pa:
    Code:
    --- default.pa    2018-01-11 23:50:47.883839113 +0100
    +++ default.pa    2018-01-12 00:05:59.717064815 +0100
    @@ -41,6 +41,11 @@
     #load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
     #load-module module-null-sink
     #load-module module-pipe-sink
    +# In Slint, we want to share audio resources between speech apps that
    +# rely on alsa and other apps that rely on pulseaudio.  
    +load-module module-alsa-sink device=dmix
    +load-module module-alsa-source device=dsnoop
    +
     
     ### Automatically load driver modules depending on the hardware available
     .ifexists module-udev-detect.so
This is on Slint64-14.2.1 based on Slackware64-4.2, but I took this occasion to upgrade the sound apps:
alsa-* 1.15
pulseaudio 11.1

Additional benefit, with this setting both alsamixer and pavucontrol are usable.

Last edited by Didier Spaier; 01-21-2018 at 04:01 PM.
 
1 members found this post helpful.
Old 01-21-2018, 04:18 PM   #5
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Original Poster
Rep: Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018
Yes, thanks Didier. I've already configured pulseaudio to use an ALSA dmix device as a sink, and IMO it's definitely the way to go if one must use pulseaudio. Generally though I prefer to keep it simple and just have things output to alsa directly, only starting the pulseaudio server when absolutely necessary.
 
Old 01-21-2018, 07:51 PM   #6
RadicalDreamer
Senior Member
 
Registered: Jul 2016
Location: USA
Distribution: Slackware64-Current
Posts: 1,816

Rep: Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981
Its Firefox's sandbox:
https://github.com/i-rinat/apulse
https://www.mail-archive.com/blfs-de.../msg06517.html

I'm playing with the settings. I got sound back with:

Code:
security.sandbox.content.level 0
security.sandbox.content.syscall_whitelist 16
security.sandbox.content.write_path_whitelist /dev/snd/
Edit: I put level back to 3. It seems like sound is being muted by Firefox. I tried to play something in QMPlay2 after trying to play something in Firefox. No sound. I then played a file in mplayer and sound came back. Strange experience.
It looks like only this is needed for sound in firefox 64 bit
Code:
security.sandbox.content.syscall_whitelist 16

Last edited by RadicalDreamer; 01-21-2018 at 08:16 PM.
 
2 members found this post helpful.
Old 01-22-2018, 03:11 AM   #7
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Original Poster
Rep: Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018
Quote:
Originally Posted by RadicalDreamer View Post
Its Firefox's sandbox:

It looks like only this is needed for sound in firefox 64 bit
Code:
security.sandbox.content.syscall_whitelist 16
Yes, that does the trick. Thanks for the pointers.
 
Old 01-22-2018, 03:27 AM   #8
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,784

Rep: Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434
Since Mozilla's Firefox team chose to keep the alsa code but disable it unless compiled with the "--enable-alsa" and "--disable-pulseaudio" options, that is what I am now forced to do if I want the more "official" firefox. There does exist an alternative whose total integrity I have yet to check but I tried it on a test box and so far it seems "on the up and up". It is available through this git-hub

--- Monsterovich Firefox-FuckPA ---

It does rewrite the "about:config" to call itself NightFly but so far I don't see any important changes and that one, of course, can be changed to whatever you like.

FWIW I tried really hard to get along with pulseaudio but I have come to despise it, even more than systemd, though for the somewhat similar reason of co-opting. In the case of pulse, AFAIK, it depends on ALSA and can't operate without it or something like it so why is ALSA being shuffled off to some distant corner where we are all to pretend it doesn't exist? I can't help but marvel at the Firefox team's painting themselves into a different and exclusive area. Just how hard is it to leave ALSA enabled in the Official Releases? I'd honestly like to know.
 
2 members found this post helpful.
Old 01-22-2018, 03:02 PM   #9
RadicalDreamer
Senior Member
 
Registered: Jul 2016
Location: USA
Distribution: Slackware64-Current
Posts: 1,816

Rep: Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981
Quote:
Originally Posted by enorbet View Post
Since Mozilla's Firefox team chose to keep the alsa code but disable it unless compiled with the "--enable-alsa" and "--disable-pulseaudio" options, that is what I am now forced to do if I want the more "official" firefox. There does exist an alternative whose total integrity I have yet to check but I tried it on a test box and so far it seems "on the up and up". It is available through this git-hub

--- Monsterovich Firefox-FuckPA ---

It does rewrite the "about:config" to call itself NightFly but so far I don't see any important changes and that one, of course, can be changed to whatever you like.

FWIW I tried really hard to get along with pulseaudio but I have come to despise it, even more than systemd, though for the somewhat similar reason of co-opting. In the case of pulse, AFAIK, it depends on ALSA and can't operate without it or something like it so why is ALSA being shuffled off to some distant corner where we are all to pretend it doesn't exist? I can't help but marvel at the Firefox team's painting themselves into a different and exclusive area. Just how hard is it to leave ALSA enabled in the Official Releases? I'd honestly like to know.
I like the github url. Pulseaudio does have some nice features but it takes over like it owns the place. I stopped using it because it was producing static in Tales of Berseria. ALSA doesn't.

I've been meaning to ask. Where do you play Quake 3 at?
 
Old 01-22-2018, 06:09 PM   #10
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,784

Rep: Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434
Quote:
Originally Posted by RadicalDreamer View Post
I like the github url. Pulseaudio does have some nice features but it takes over like it owns the place. I stopped using it because it was producing static in Tales of Berseria. ALSA doesn't.
Pulseaudio is more predatory than even systemd, and I just don't get it. Systemd replaces other init systems but pulseaudion relies on ALSA, or something like it, yet software devs are constantly castrating ALSA. Why the Firefox team leaves ALSA code in place but disables it is just beyond me. Unless I am unaware of some problem in having both, as an either/or or just as a team, how does it make any sense to basically write off "the musicians" in favor of "the conductor"?
Quote:
Originally Posted by RadicalDreamer View Post
I've been meaning to ask. Where do you play Quake 3 at?
Sadly I haven't played Q3Arena in years. First PunkBuster started outlawing some important config options and then QuakeLive started sucking away players and servers. QuakeLive plays pretty much like Q3Arena but it has fewer assignment options for mouse buttons, and one of those was a deal breaker for me. Since I had played Q3 for some 20 years with that motion control I was not about to learn all over again the snap judgment muscle memory and suck for many months. Besides right about that time I bought Valve's Orange Box and got totally addicted. At first I had to reboot to Windows for decent framerates, but within a few (several) months Valve released a native linux version for Steam and I "fell off the wagon" yet again. Gabe Newell is a hero to me. There are so many Linux games out now and just last year the latest Deus Ex episode was released in December and before January was gone, Feral put out an excellent Linux port available on Steam.

I've been toying with the idea of trying out the new Doom and Quake releases but it just isn't the same in important ways that allow for deep tweaking like Q3Arena. I really miss those days of hundreds of servers with great players who'd played for a decade or better on many of those servers. One fellow I met was involved in a specialized mod release called "Decades" (... or was it "Generations"?) that allowed you to choose, pretty much on-the-fly, to choose between Quake, Quake2, or Quake3 models, physics and weapons and with some monster custom maps. Unfortunately it was too little, too late and afaik it never really caught on. Too many players had already moved on.
 
2 members found this post helpful.
Old 01-22-2018, 11:35 PM   #11
Pixxt
Member
 
Registered: May 2008
Distribution: Slackware, Debian,
Posts: 283

Rep: Reputation: 185Reputation: 185
Quote:
Originally Posted by enorbet View Post

FWIW I tried really hard to get along with pulseaudio but I have come to despise it, even more than systemd, though for the somewhat similar reason of co-opting. In the case of pulse, AFAIK, it depends on ALSA and can't operate without it or something like it so why is ALSA being shuffled off to some distant corner where we are all to pretend it doesn't exist? I can't help but marvel at the Firefox team's painting themselves into a different and exclusive area. Just how hard is it to leave ALSA enabled in the Official Releases? I'd honestly like to know.
Because ALSAs APIs are a bit of a mess and no one wants to support it, so more than a few projects have dropped ALSA support in recent years and work with pulse because pulse has a better interface/APIs for apps to work with it. Also for a few years Firefox has been saying they would drop ALSA support because its a mess to interface with and they do not have the manpower to cover it and they asked for people to step up and a maintain the ALSA stack in the codebase but no one wants to put their money were their mouth is.
 
4 members found this post helpful.
Old 01-23-2018, 12:36 AM   #12
RadicalDreamer
Senior Member
 
Registered: Jul 2016
Location: USA
Distribution: Slackware64-Current
Posts: 1,816

Rep: Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981Reputation: 981
I still play Quake 3 occasionally at cromctf using: https://ioquake3.org/get-it/test-builds/

I remember punkbuster. Yeah servers could control configs with it. QuakeLive has no linux build and mouse under Wine feels funny.

Valve did good releasing their games on Linux. I usually get the free games from Humble Bundle and GoG. Some of them have Linux support. A while back they released Shadow Warrior 2013 for free. It was fun. I have the Quake Champions beta. Its not Quake 1-3 but it has potential. They have a Virginia server! I get like 20 ping or so it says. There is no console and plenty of bloom. It has VQ3 and CPM physics characters with different hit boxes. Doom 2016 single player is fun. Movement is pretty simple. The double jump is fun. The combat areas are fun. You basically go from one combat area to another where you are basically trapped while waves after waves of demons spawn.

Generations mod was fun. It had Doom and Wolfenstein weapons too I think. Punkbuster and the multiple point releases killed Quake 3.
 
Old 01-23-2018, 06:32 AM   #13
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,784

Rep: Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434
Quote:
Originally Posted by Pixxt View Post
Because ALSAs APIs are a bit of a mess and no one wants to support it, so more than a few projects have dropped ALSA support in recent years and work with pulse because pulse has a better interface/APIs for apps to work with it. Also for a few years Firefox has been saying they would drop ALSA support because its a mess to interface with and they do not have the manpower to cover it and they asked for people to step up and a maintain the ALSA stack in the codebase but no one wants to put their money were their mouth is.
Thank you for responding but though I've fairly often read that "ALSA's APIs are a bit of a mess" I have yet to read exactly what is a mess and how hard might it be to clean up? While it is still possible to switch to OSS, and a few say they like it better, the obvious point is that ALSA and OSS are the only driver-level sound servers currently in the linux kernel. Without one of them, or something like them, Pulseaudio would be "all dressed up with no place to go".

Now I realize people exist who rarely if ever depend on sound beyond that little BIOS beep at startup, and having come not from Windows but OS/2 where IBM considered sound (and pictures) potentially distracting in an Enterprise environment, I know it is very often viewed, or at least has been viewed in the past, as approaching superfluous. However as Netflix, Amazon, and YouTube increase their competition with cable and on-air TV, as well as others replacing theaters and magazines sound is becoming ever more a necessary component of E-Business as well as entertainment and fun. Add to that whether film scores or pop music where almost nobody records on tape anymore as it is all done on DAWs and what I see is a huge vacuum if ALSA is so messy and in danger of being relegated out of existence as it is, where either it must become maintained and cleaned up or replaced. In fact, given Linus' concern made obvious by his tirade about nVidia a few years ago, I would think sound would only be an order of magnitude lesser concern for the kernel team.

Do you have any expanding input on this subject? I'm watching developments rather carefully.
 
2 members found this post helpful.
Old 02-10-2018, 03:45 PM   #14
number22
Member
 
Registered: Sep 2006
Location: Earth
Distribution: Slackware 14.1 Slackware64-current multilib
Posts: 278
Blog Entries: 7

Rep: Reputation: Disabled
Code:
browser.tabs.remote.autostart       false
browser.tabs.remote.autostart.2     false
 
Old 02-11-2018, 10:26 PM   #15
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,784

Rep: Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434
This may be an ignorant question to ask but I just have to get an answer from someone. Pulseaudio only communicates with hardware through a sound server. Basically by itself it is a conductor with zero musicians just waving it's hands around. How can anyone in their right mind disregard "where the rubber meets the road" ?
 
3 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] [JACK/ALSA] Timidity++ not producing any sound under Jack using its ALSA output since a "current" upgrade. Geist Slackware 2 09-10-2017 02:02 AM
Linux and ALSA default sound card, two methods fail to set firefox/chrome sound. jon_k Linux - Hardware 2 10-03-2013 07:09 AM
ALSA. 2 cards. Firefox no sound. Arla Linux - Software 8 10-05-2009 04:34 PM
how can i get sound out of firefox on redhat EL3 with ALSA java Linux - Newbie 4 06-06-2008 08:24 AM
ALSA Sound delay with Flash in Firefox Rikra Debian 2 05-11-2005 09:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration