You are not logged in.

#1 2015-10-08 22:13:11

heitorpb
Member
Registered: 2012-01-21
Posts: 46

[SOLVED] No sound in Firefox

Greetings!

I have just installed ArchLinux on my new Laptop (Lenovo y50-70), I have installed ALSA, I can play music/video with mpv, video works, audio works.

speaker-test works:

$ speaker-test -c 2

speaker-test 1.0.29

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 1048576
Period size range from 32 to 524288
Using max buffer size 1048576
Periods = 4
was set period_size = 262144
was set buffer_size = 1048576
 0 - Front Left
 1 - Front Right
Time per period = 10.927637

But i cant hear anything on Firefox. I can see videos on YouTube, but i cant hear the audio. In about:config i have media.gstreamer.enabled=true

Some info:

$ pacman -Ss gst | grep installed
extra/gst-libav 1.6.0-1 [installed]
extra/gst-plugins-base-libs 1.6.0-1 [installed]
extra/gst-plugins-good 1.6.0-1 [installed]
extra/gstreamer 1.6.0-1 [installed]
$ lspci
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05)
00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05)
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d5)
00:1c.1 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #2 (rev d5)
00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d5)
00:1c.4 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 (rev d5)
00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation HM87 Express LPC Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05)
00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05)
01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 860M] (rev a2)
08:00.0 Network controller: Intel Corporation Wireless 3160 (rev 93)
09:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)
0a:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5249 PCI Express Card Reader (rev 01)
$ pacman -Ss vdpau | grep installed
extra/libva-vdpau-driver 0.7.4-2 [installed]
extra/libvdpau 1.1.1-1 [installed]
community/libvdpau-va-gl 0.3.4-1 [installed]
$ cat .xinitrc
#!/bin/bash

setxkbmap fi,br &

conky -c ~/.config/conky/conkyrc &
 
xrdb -merge ~/.config/term &

export LIBVA_DRIVER_NAME=vdpau

exec awesome

Last run of Firefox on terminal, using primusrun to see if it helps (removed duplicated messages):

 $ primusrun firefox

(process:7519): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed

(firefox:7519): Gtk-CRITICAL **: IA__gtk_clipboard_set_with_data: assertion 'targets != NULL' failed

** (firefox:7519): CRITICAL **: gst_app_src_set_size: assertion 'GST_IS_APP_SRC (appsrc)' failed

edit:

$ vainfo 
libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'vdpau'
libva info: Trying to open /usr/lib/dri/vdpau_drv_video.so
libva info: Found init function __vaDriverInit_0_35
[VS] Software VDPAU backend library initialized
libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'vdpau'
libva info: Trying to open /usr/lib/dri/vdpau_drv_video.so
libva info: Found init function __vaDriverInit_0_35
^C

vaainfo freezes after this, is it normal?

Any idea what is happening?

Thank you!

Last edited by heitorpb (2015-10-14 22:30:05)

Offline

#2 2015-10-08 22:59:03

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,420

Re: [SOLVED] No sound in Firefox

the vaainfo freeze is normal its very unstable when using the vdpau bridge, however this has nothing to do with audio so we'll leave it at that.

Can you post the output of

aplay -l
sudo fuser -v /dev/snd/*

while trying to play something in firefox on which you expect to have output? any eventual adjustments to .asoundrc /etc/asound.conf or similar that we should know about?

Offline

#3 2015-10-09 13:08:29

heitorpb
Member
Registered: 2012-01-21
Posts: 46

Re: [SOLVED] No sound in Firefox

 $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC3239 Analog [ALC3239 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 1: ALC3239 Digital [ALC3239 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

no output of fuser -v:

$ sudo fuser -v /dev/snd/*
$

I have no ~/.asound.conf but /etc/asound:

$ cat /etc/asound.conf 
pcm.!default {
	type hw
	card 1
}

ctl.!default {
	type hw           
	card 1
}

Sorry, i forgot to show my asound.conf before.

Any ideas?

Offline

#4 2015-10-09 19:29:54

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,420

Re: [SOLVED] No sound in Firefox

That's the fuser  output while you have a youtube video running? and nothing in the terminal about failing to connect to audio or similar? can you use gstreamer directly to play something?

 gst-play-1.0 somefile

Offline

#5 2015-10-10 11:18:36

heitorpb
Member
Registered: 2012-01-21
Posts: 46

Re: [SOLVED] No sound in Firefox

THat was the output of fuser with a Youtube video playing.

No sound with gst-play-1.0 (i checked the same file and mpv plays it).

fuser sayd nothing when playing something with gst-play.

Offline

#6 2015-10-10 19:37:32

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,420

Re: [SOLVED] No sound in Firefox

Yeah then gst is using the wrong backend, no output indicating anything like trying to connect to jack server or similar? And you did ran fuser as root in all cases?

Offline

#7 2015-10-10 19:42:13

heitorpb
Member
Registered: 2012-01-21
Posts: 46

Re: [SOLVED] No sound in Firefox

I did run fuser as root in all cases.

I just noticed I have extra/jack 0.124.1-3 [installed]

Offline

#8 2015-10-11 21:31:06

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,420

Re: [SOLVED] No sound in Firefox

yeah gstreamer likely uses the wrong default. There is some gconf setting iirc but don't really know any specifics there used to be the package gstreamer-properties which allowed to adjust those settings, however I don't think it applies to gstreamer 1.x anymore. But maybe you can get it to correctly switch by uninstalling jack (it is however a hard dependency of a few things, but

pacman -Rdd jack

should take care of that for a temporary test.

Offline

#9 2015-10-11 21:39:16

heitorpb
Member
Registered: 2012-01-21
Posts: 46

Re: [SOLVED] No sound in Firefox

After pacman  -Rdd jack, gst-play-1.0 produced no sound.  And mpv complained about it:

$ mpv sound.mp3
mpv: error while loading shared libraries: libjack.so.0: cannot open shared object file: No such file or directory

reinstaling jack I get sound using mpv.

Instaling jack2 makes no difference, with mpv i can get sound, but not with gst-play-1.0

I returned to jack.

Offline

#10 2015-10-11 21:53:41

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,420

Re: [SOLVED] No sound in Firefox

meh, yeah jack isn't actually used by anything but if gstreamer takes it as default it won't produce sound, another thing you could try is setting your default sound card correctly: https://wiki.archlinux.org/index.php/Ad … sound_card (the asound way is unstable/not guaranteed to persist on subsequent reboots) although this won't make a difference if gstreamer is actually trying to use jack instead of ALSA

Offline

#11 2015-10-12 18:23:23

heitorpb
Member
Registered: 2012-01-21
Posts: 46

Re: [SOLVED] No sound in Firefox

now I have this:

$ cat /etc/modprobe.d/alsa-base.conf 
options snd-hda-intel index=0,1

And it made no difference.

After installing  gst-plugins-base I can play music with gst-play1.0 and fuser says something:

$ sudo fuser -v /dev/snd/*
                     USER        PID ACCESS COMMAND
/dev/snd/pcmC1D0p:   h         11212 F...m gst-play-1.0

But firefox still cant play youtube videos with audio. fuser says nothing when an youtube video is running.

installed gst-plugins-ugly and nothing changed.

Offline

#12 2015-10-12 21:18:20

The Loko
Member
From: Spain
Registered: 2014-07-23
Posts: 100

Re: [SOLVED] No sound in Firefox

Are you using Pulse? Check pavucontrol, seems like Firefox is muted there.

Offline

#13 2015-10-12 21:24:11

heitorpb
Member
Registered: 2012-01-21
Posts: 46

Re: [SOLVED] No sound in Firefox

I have not installed Pulse, but I have libpulse as a dependency of something:

$ pacman -Ss pulse | grep installed
extra/libpulse 7.0-2 [installed]
$ pavucontrol
bash: pavucontrol: command not found

Just in case, I created a test-user, with a new /home/test-user and there was no sound in Firefox.

Offline

#14 2015-10-12 21:44:20

MoSal
Member
Registered: 2015-09-23
Posts: 32

Re: [SOLVED] No sound in Firefox

1- Can you check out the output of mpv on the terminal?
    If it's using ALSA, you should see something like:
   

AO: [alsa] 48000Hz stereo 2ch s16

2- Can you run two mpv instances concurrently and see if both output audio at the same time?

3- If step 2 fails. Your default pcm is probably not dmix.
    Your asound.conf points into that direction.
    Do you remember why it has that configuration?

Last edited by MoSal (2015-10-14 23:19:06)

Offline

#15 2015-10-12 23:23:53

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,420

Re: [SOLVED] No sound in Firefox

configuration as posted by him should retain dmix, however it shouldn't be necessary anymore now that he has correct indexes defined. still doesn't explain that absolutely nothing in firefox uses the soundcard... I can't  really make much out of the gst_is_appsource failure.

Is the index line you used correct? your card that used to be 1 should now be 0 and there shouldn't be a need for the asound.conf. Some ALSA applications throw a fit when they can't play to the 0 device, regardless of what's defined as default

Last edited by V1del (2015-10-12 23:25:42)

Offline

#16 2015-10-13 19:27:06

heitorpb
Member
Registered: 2012-01-21
Posts: 46

Re: [SOLVED] No sound in Firefox

first instance of mpv is using ALSA:

$ mpv 09\ -\ Boy\ And\ The\ Ghost.mp3 
Playing: 09 - Boy And The Ghost.mp3
[ffmpeg/demuxer] mp3: Estimating duration from bitrate, this may be inaccurate
 (+) Audio --aid=1 (mp3)
File tags:
 Artist: Tarja Turunen
 Album: My Winter Storm
 Album_Artist: Tarja Turunen
 Genre: Metal
 Title: Boy And The Ghost
 Track: 9
AO: [alsa] 44100Hz stereo 2ch s16
A: 00:01:25 / 00:04:36 (30%)

second instance failed:

 $ mpv 08\ -\ Gaia.mp3 
Playing: 08 - Gaia.mp3
 (+) Audio --aid=1 (mp3)
File tags:
 Artist: Faun
 Album: Totem
 Genre: Gothic
 Title: Gaia
 Track: 08
[ao/alsa] Playback open error: Device or resource busy
[ao/oss] Can't open audio device /dev/dsp: No such file or directory
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
[ao/jack] cannot open server
Could not open/initialize audio device -> no sound.
Audio: no audio


Exiting... (Errors when loading file)

When I tried the other index order in /etc/modprobe.d/alsa-base.conf i had no sound working.

I will remove asound.conf and see if it works.

edit:
after removing /etc/asound.conf mpv fails:

 $ mpv Music/Tarja\ Turunen/My\ Winter\ Storm\ \(2007\)/08\ -\ Die\ Alive.mp3 
Playing: Music/Tarja Turunen/My Winter Storm (2007)/08 - Die Alive.mp3
[ffmpeg/demuxer] mp3: Estimating duration from bitrate, this may be inaccurate
 (+) Audio --aid=1 (mp3)
File tags:
 Artist: Tarja Turunen
 Album: My Winter Storm
 Album_Artist: Tarja Turunen
 Genre: Metal
 Title: Die Alive
 Track: 8
ALSA lib pcm_dmix.c:1024:(snd_pcm_dmix_open) unable to open slave
[ao/alsa] Playback open error: No such file or directory
[ao/oss] Can't open audio device /dev/dsp: No such file or directory
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
[ao/jack] cannot open server
Could not open/initialize audio device -> no sound.
Audio: no audio


Exiting... (Errors when loading file)

Last edited by heitorpb (2015-10-13 19:30:18)

Offline

#17 2015-10-13 20:14:59

MoSal
Member
Registered: 2015-09-23
Posts: 32

Re: [SOLVED] No sound in Firefox

Great.

Can you try this asound.conf:

pcm.!default {
  type plug
  slave.pcm "DefDevice"
}

pcm.DefDevice {
  type plug
  slave.pcm "dmix:1,0"
}

BTW, you don't need to mess with modprobe. If you run:

ls -l /proc/asound/

You can see that your cards are linked to human names. So, if there is a link named Intel that points to card1. Then, you can change that dmix line to:

  slave.pcm "dmix:Intel,0"

Last edited by MoSal (2015-10-13 20:18:10)

Offline

#18 2015-10-13 20:38:33

heitorpb
Member
Registered: 2012-01-21
Posts: 46

Re: [SOLVED] No sound in Firefox

This asound fixed it! i can play videos/music in two different mpv instances, Youtube plays video with audio now!

But when I open alsamixer, the default option is not PCH, I have to press F6 to select the other one to change volume. Also, my keyboard hotkeys to change volume are not working anymore.

I use awesome window manager, this is what I use to change volume:

 $ cat .config/awesome/rc.lua | grep amixer
    awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn("amixer -q sset Master 2dB-") end),
    awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn("amixer -q sset Master 2dB+") end),

It is basically "amixer -q sset Master 2dB-".

just in case:

$ ls -l /proc/asound/
total 0
dr-xr-xr-x 5 root root 0 Oct 13 23:38 card0
dr-xr-xr-x 5 root root 0 Oct 13 23:38 card1
-r--r--r-- 1 root root 0 Oct 13 23:38 cards
-r--r--r-- 1 root root 0 Oct 13 23:38 devices
lrwxrwxrwx 1 root root 5 Oct 13 23:38 HDMI -> card0
-r--r--r-- 1 root root 0 Oct 13 23:38 hwdep
-r--r--r-- 1 root root 0 Oct 13 23:38 modules
dr-xr-xr-x 2 root root 0 Oct 13 23:38 oss
lrwxrwxrwx 1 root root 5 Oct 13 23:38 PCH -> card1
-r--r--r-- 1 root root 0 Oct 13 23:38 pcm
dr-xr-xr-x 2 root root 0 Oct 13 23:38 seq
-r--r--r-- 1 root root 0 Oct 13 23:38 timers
-r--r--r-- 1 root root 0 Oct 13 23:38 version

Offline

#19 2015-10-13 21:07:41

MoSal
Member
Registered: 2015-09-23
Posts: 32

Re: [SOLVED] No sound in Firefox

Add ctl.!default back to asound.conf:

ctl.!default {
  type hw
  card PCH
}

Offline

#20 2015-10-14 22:29:38

heitorpb
Member
Registered: 2012-01-21
Posts: 46

Re: [SOLVED] No sound in Firefox

MoSal wrote:

Add ctl.!default back to asound.conf:

ctl.!default {
  type hw
  card PCH
}

after appending this to /etc/asound.conf i halve alsamixer working again!

THank you, MoSal and V1del for the help!

Offline

#21 2019-01-01 13:43:44

rishi_devan
Member
Registered: 2019-01-01
Posts: 1

Re: [SOLVED] No sound in Firefox

This worked for me, too. Thank you so much, heitorpb, MoSal, and V1del.

Offline

#22 2019-01-01 17:09:21

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 4,645

Re: [SOLVED] No sound in Firefox

Closing this old topic.


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.

Offline

Board footer

Powered by FluxBB