No sound from Browsers

Hello,

iI have a strange issue.
My sound work if iI use VLC, but can't make it work from YouTube, using Firefox or Chrome.
(I build my ports with Pulseaudio as option). I use HTML5 on YouTube, and the video is clear and work well, is only muted.
I did a research on the forum, but no luck.
 
Here I'm discussing the same thing in my thread. What helped me was deleting the ~/.pulse directory. But it is also necessary to disable flash plugin in firefox for html5 to work, try this one first. Then there are some other recommended modifications in about:config, read more about it on the web.
 
Thanks for the answer.
I using a fresh install of 10.2, and never get flash plugin.
Not even have a .pulse directory in my home folder.

The only plugin installed on Firefox is OpenH264.
I tried to install the port multimedia/openh264 but still no sound.
 
I using a fresh install of 10.2, and never get flash plugin.
There is no flash package. You have to compile it. The handbook has a short and sweet description of how to do it, so I won't repeat it here.
 
There is no flash package. You have to compile it. The handbook has a short and sweet description of how to do it, so I won't repeat it here.
Yes, I knew I need to compile it if I want to use flash.
But I don't care about flash, I just want to use the HTML5 on Youtube, and get the audio from it. (I can see the video clear and fine on Youtube)
 
Yes, I knew I need to compile it if I want to use flash.
But I don't care about flash, I just want to use the HTML5 on Youtube, and get the audio from it. (I can see the video clear and fine on Youtube)
One small check can be done: do you have sound if you start firefox from command line as root (sudo)?
 
Do you have sound in any of your other browsers? I find Firefox has been on and off in the last year and recent versions don't even keep settings reliably. Currently I'm having extremely good luck with 40.0.3
 
One small check can be done: do you have sound if you start firefox from command line as root (sudo)?

I'll try. Thanks

In the past, if I had sound problems with Firefox, I'd install all of the libcanberra and common gstreamer packages.

I have both already installed.

Do you have sound in any of your other browsers? I find Firefox has been on and off in the last year and recent versions don't even keep settings reliably. Currently I'm having extremely good luck with 40.0.3

No sound from Chrome too. VLC work. But iI can choose the device on VLC.

Anyway in my sysctl.conf iI have:
Code:
# Sound
dev.hdac.1.polling=1
hw.snd.default_unit=1
# Don't automatically use new sound device
shw.snd.default_auto=0
 
Ok.
I have sound if iI start firefox as root ( sudo firefox)

I used sudo portmaster www/firefox for install it.
Which is the best method for fix this? I'm very new here...
 
Ok.
I have sound if i start firefox as root ( sudo firefox)

I used sudo portmaster www/firefox for install it.
Which is the best method for fix this? I'm very new here...
Good sign that you have it when starting as root. What's in your /etc/devfs.conf?
Mine has
Code:
link cd0 cdrom
link cd0 dvd
link cd0 dvdr
link cd0 dvdrw
link cd0 cd
link cd0 cdr
link cd0 cdrw

perm cd0 0666
perm xpt0 0666
perm pass0 0666
perm pass1 066
perm pass2 0666
perm pass3 0666
perm pass4 0666
perm pass5 0666
perm da0 0666
perm da1 0666
perm da2 0666
perm da3 0666
perm da4 0666
perm dsp0.0 0666
perm dsp1.0 0666
perm dsp2.0 0666
perm dsp3.0 0666
perm dsp4.0 0666
perm dsp4.1 0666
Which groups does your user have membership in? Mine is added to both wheel and operator groups, maybe this has to do with it.

And generally, there MUST be some method in its working/not working.
I hear from a lot of people on this forum how for them in works well with alsa (just works, they say), while I exhausted all possible resources to make it work that way, all to no avail.
On the other hand, those same folks tell me it WON'T work with pulseaudio support, yet here it works all right in all the 3 of my installations! Oh, and you'll be the 4th, because for you it works as well...
 
And BTW, do you have a DE? Which one, if any? That may be important, too.
I'm using FVWM2 along with random applications I need, though it amounts, together with build-only deps, to >500 packages. But the idea is there is no "sound system" that does along with my desktop. For you it may be different.
 
I'm using Openbox.
My user is in the wheel group.


My /etc/devfs.conf is untouched.

Code:
p, li { white-space: pre-wrap; }

# Copyright (c) 2003 The FreeBSD Project

# All rights reserved.

#

# Redistribution and use in source and binary forms, with or without

# modification, are permitted provided that the following conditions

# are met:

# 1. Redistributions of source code must retain the above copyright

# notice, this list of conditions and the following disclaimer.

# 2. Redistributions in binary form must reproduce the above copyright

# notice, this list of conditions and the following disclaimer in the

# documentation and/or other materials provided with the distribution.

#

# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND

# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE

# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS

# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)

# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT

# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY

# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF

# SUCH DAMAGE.

#

# $FreeBSD: releng/10.2/etc/devfs.conf 226862 2011-10-27 20:39:20Z gavin $



# These are examples of how to configure devices using /etc/rc.d/devfs.

# The first parameter is always the action to take, the second is always the

# existing device created by devfs, and the last is what you want to change.

# The name of the action is only significant to the first unique character.

#

# Examples:



# Commonly used by many ports

#link cd0 cdrom

#link cd0 dvd



# Allow a user in the wheel group to query the smb0 device

#perm smb0 0660



# Allow members of group operator to cat things to the speaker

#own speaker root:operator

#perm speaker 0660
 
I'm using Openbox.
My user is in the wheel group.


My /etc/devfs.conf is untouched.

Code:
p, li { white-space: pre-wrap; }

# Copyright (c) 2003 The FreeBSD Project

# All rights reserved.

#

# Redistribution and use in source and binary forms, with or without

# modification, are permitted provided that the following conditions

# are met:

# 1. Redistributions of source code must retain the above copyright

# notice, this list of conditions and the following disclaimer.

# 2. Redistributions in binary form must reproduce the above copyright

# notice, this list of conditions and the following disclaimer in the

# documentation and/or other materials provided with the distribution.

#

# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND

# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE

# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS

# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)

# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT

# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY

# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF

# SUCH DAMAGE.

#

# $FreeBSD: releng/10.2/etc/devfs.conf 226862 2011-10-27 20:39:20Z gavin $



# These are examples of how to configure devices using /etc/rc.d/devfs.

# The first parameter is always the action to take, the second is always the

# existing device created by devfs, and the last is what you want to change.

# The name of the action is only significant to the first unique character.

#

# Examples:



# Commonly used by many ports

#link cd0 cdrom

#link cd0 dvd



# Allow a user in the wheel group to query the smb0 device

#perm smb0 0660



# Allow members of group operator to cat things to the speaker

#own speaker root:operator

#perm speaker 0660
Right, you don't seem to have the needed links -- see, they are all commented out in your file, aren't they.
So try this first, copy the contents of my /etc/devfs.conf as listed above and restart your /etc/rc.d/devfs.
Like sudo service devfs restart

Then see if firefox gives sound as normal user. Oh, and add him to operator group, just in case. But don't do it by editing /etc/group.
 
There's a whole story about configuring devd and devfs in FreeBSD. BTW, did you build all the stuff, or install ready packages?

Thanks for your help!

I'm new on FreeBSD, so iI not read about devd and devfs yet.
I did installed all my system with portmaster.
I already added my user to operator group with sudo pw groupmod operator -m myuser.
 
Right, I didn't think it would matter anyway... At least my dsp devices are owned by root and not operator. But how about adding the devices to /etc/devfs.conf? Did it work?
In any case, the most important thing is that you do have sound when starting firefox as root. The rest is a more or less technical question... in which I can hardly advise. In my opinion firefox is rather messy... but Chrome is mu-u-uch worse, so I'll stick to firefox.
 
I tried.
For now still not working.

I added the lines:
Code:
perm dsp0 0666
perm dsp1 0666

I tried to replace with:
Code:
dsp0.0
and:
Code:
pcm0

Where can iI find the name list of devices to use in devfs?
 
I tried.
For now still not working.

I added the lines:
Code:
perm dsp0 0666
perm dsp1 0666

I tried to replace with:
Code:
dsp0.0
and:
Code:
pcm0

Where can iI find the name list of devices to use in devfs?
Well, it hits me that you didn't copy the exact lines I posted? Why not? These have to do with permissions, as the syntax suggests, and not with device creation. Also, you won't find /dev/pcm* on your FreeBSD system.

Did you build your ports with or without HAL support (wherever the ports have that option)?
I myself have it disabled everywhere, so my configuration is free from it. How about yours?
You can also double-test your settings by creating a new user and trying to start firefox by that user (having logged in as that user). Cause generally your situation suggests that your firefox lacking sound is due to some permission problems at one point or another.
 
Now I copied and past your previous post into devfs.conf

Code:
# Commonly used by many ports
link  cd0  cdrom
link  cd0  dvd
link  cd0  dvdr
link  cd0  dvdrw
link  cd0  cd
link  cd0  cdr
link  cd0  cdrw


# Allow a user in the wheel group to query the smb0 device
#perm  smb0  0660


# Allow members of group operator to cat things to the speaker
own  speaker root:operator

perm  cd0  0666
perm  xpt0  0666
perm  pass0  0666
perm  pass1  0666
perm  pass2  0666
perm  pass3  0666
perm  pass4  0666
perm  pass5  0666
perm  da0  0666
perm  da1  0666
perm  da2  0666
perm  da3  0666
perm  da4  0666
perm  dsp0.0  0666
perm  dsp1.0  0666
perm  dsp2.0  0666
perm  dsp3.0  0666
perm  dsp4.0  0666
perm  dsp4.1  0666

And unfortunately still not sound coming out....
I not used HAL for build ports.
 
Hi Luca79,

Please, can you show the following output:
ls -l /dev/dsp*

Also shows this one:
grep your_user /etc/group
 
Depending on the compiling options, Flash plugin and Firefox don't always use the same sound architecture. Due to some limitations related to the "linux" origin of Flash plugin, it is unable to use the sound server pulseaudio as it passes audio only through the ALSA sound architecture and you can't reroute dynamically the audio flux.

In any case you can change the default rendering sound device through terminal, and just restart Firefox after.

To list the sound devices available on your system

cat /dev/sndstat

To show the current settings :

sysctl hw.snd.default_unit

So set to another sound device, for example 1

sysctl hw.snd.default_unit=1


When you use HTML5 Firefox can use the pulseaudio sound server BUT you must use a custom compiling configuration by activating the pulseaudio option.

Recompile Firefox accordingly. As a consequence this will install the dependency audio/pulseaudio if not already installed and adding audio/pavucontrol will provide you with a GUI to dynamically reroute the sound flux.

(I think gstreamer, libcanberra are also mandatory dependencies)

Run a YouTube video.
Run Pavucontrol and you will see a "cubeutils virtual sound stream" attached to Firefox moving, just clic on the "DSPx" box to switch dynamically to another "DSP" rendering device.
 
Depending on the compiling options, Flash plugin and Firefox don't always use the same sound architecture. Due to some limitations related to the "linux" origin of flash plugin, flash plugin is unable to use the sound server pulseaudio as it passes audio only through the ALSA sound architecture and you can't reroute dynamically the audio flux.

In any case you can change the default rendering sound device through terminal, and just restart Firefox after.

To list the sound devices available on your system

cat /dev/sndstat

To show the current settings :

sysctl hw.snd.defaut_unit

So set to another sound device, for example 1

sysctl hw.snd.default_unit=1


When you use HTML5 firefox can use the pulseaudio sound server BUT you must use a custom compiling configuration by activating the pulseaudio option.

Recompile firefox accordingly. As a consequence this will install the dependency audio/pulseaudio if not already installed and adding audio/pavucontrol will provide you with a GUI to dynamically reroute the sound flux.

(I think gstreamer, libcanberra are also mandatory dependencies)

Run a youtube video.
Run Pavucontrol and you will see a "cubeutils virtual sound stream" attached to Firefox moving, just clic on the "DSPx" box to switch dynamically to another "DSP" rendering device.

cat /dev/sndstat:

Code:
Installed devices:
pcm0: <Intel Haswell (HDMI/DP 8ch)> (play)
pcm1: <Realtek ALC662 (Rear Analog)> (play/rec) default

In my /etc/sysctl.conf:

Code:
hw.snd.default_unit=1
dev.hdac.1.polling=1

Anyway my sound works with VLC player.
I'll try audio/pavucontrol, thanks for the suggestion.
 
I SOLVED it with audio/pavucontrol

Thanks so much!


Honestly I'm not sure what fixed the problem. I updated my ports, then installed audio/pavucontrol.
When I opened it, and used youtube, the audio was already fixed without touch anything.
 
Last edited by a moderator:
Back
Top