LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 02-12-2018, 01:07 AM   #1
drgibbon
Member
 
Registered: Nov 2014
Distribution: Slackware64 14.2
Posts: 412

Rep: Reputation: 235Reputation: 235Reputation: 235
No sound with Firejail + PulseAudio 9


I'm wondering if anyone has working audio on Slackware 14.2 using Firejail and PulseAudio 9? I always get a connection refused error, for example:

Code:
could not open audio device (Connection refused)
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
The PulseAudio issues with Firejail are known problems, but it's supposed to be fixed in PulseAudio 9. Also, I've tried the recommended fix of putting "enable-shm = no" in ~/.config/pulse/client.conf but it doesn't seem to make any difference.
 
Old 02-12-2018, 03:10 PM   #2
v3g4n
LQ Newbie
 
Registered: Mar 2017
Distribution: Slackware
Posts: 17

Rep: Reputation: 2
Hi drgibbon, I currently have working audio on Slackware 14.2 while using firejail and pulseaudio 9. I recently did a fresh install though, but I remember also running into that problem before the reinstall. I also tried the fix you mentioned and it did not work for me either. My old install was LUKs with LVM, but my current install is just a standard install. Can't imagine that would have anything to do with it though.
 
Old 02-13-2018, 06:34 PM   #3
v3g4n
LQ Newbie
 
Registered: Mar 2017
Distribution: Slackware
Posts: 17

Rep: Reputation: 2
For the heck of it I did a fresh install with full disk LUKS & LVM and I still am getting sound in Firefox through firejail with Pulseaudio 9 so it's definitely not that.
 
1 members found this post helpful.
Old 02-14-2018, 06:54 AM   #4
drgibbon
Member
 
Registered: Nov 2014
Distribution: Slackware64 14.2
Posts: 412

Original Poster
Rep: Reputation: 235Reputation: 235Reputation: 235
Quote:
Originally Posted by v3g4n View Post
For the heck of it I did a fresh install with full disk LUKS & LVM and I still am getting sound in Firefox through firejail with Pulseaudio 9 so it's definitely not that.
Thanks for testing that, I'm actually running LUKS/LVM on both my Slackware systems, so it's nice to know that LUKS isn't the problem. Since I have this problem on more than one machine, I don't suppose that the issue is hardware related, but I can't think of what else might be causing it.
 
Old 03-13-2018, 09:10 AM   #5
bateleur
Member
 
Registered: Feb 2016
Distribution: Slackware
Posts: 31

Rep: Reputation: Disabled
I am no expert, but some sound problems seem to be related with the firejail profile you use. If your firejail profile doesn't have access to ~/.config/pulse/client.conf then whatever you put in there, will likely have no effect. So maybe you should test with putting the options in /etc/pulse/client.conf, since all firejail profiles are supposed to have read access to /etc. If you are a bit paranoid with that and use the --private-etc option, then use it with --private-etc=pulse, but make sure that pulse is configured in /etc/pulse

From my own experience, I only get sound out of Firefox 52 with firejail 0.9.52 on Slackware 14.2 if I use it with the icecat profile:

firejail --profile=/etc/firejail/icecat.profile firefox gives me sound.

firejail firefox gives me no sound.

That problem started with a recent upgrade of firejail (apparently for firefox, firejail expects pulse to be running, maybe related to this? [0]), so you could try downgrading firejail to a previous version, e.g. firejail LTS (0.9.38).

[0] https://www.linuxquestions.org/quest...116/page2.html
 
1 members found this post helpful.
Old 03-14-2018, 08:51 AM   #6
drgibbon
Member
 
Registered: Nov 2014
Distribution: Slackware64 14.2
Posts: 412

Original Poster
Rep: Reputation: 235Reputation: 235Reputation: 235
Thanks bateleur, I've tried setting the recommended fixes in /etc/pulse/ (both "enable-shm = no" in client.conf and "enable-memfd = yes" in daemon.conf). I've also tried a bunch of different firejail config permutations (going one by one and commenting out sections), but I'm never able to get audio in any programs. Had a go with the Icecat profile and Firefox too, but still no sound. It's got me stumped.
 
Old 03-14-2018, 08:38 PM   #7
bateleur
Member
 
Registered: Feb 2016
Distribution: Slackware
Posts: 31

Rep: Reputation: Disabled
Strange... I hate to ask this, but you do have sound without firejail, right? Because I have more or less disabled pulse on my machine, but as a result sound is muted when I login and I tend to forget that and then I start wondering why I don't have sound with firejail. On the other hand, v3g4n has donde a clean install and has sound with firejail, so maybe you could try reinstalling pulse and retry using firejail with pulse's settings from a default Slackware install?

Anyway, I am a bit of a pulse-"hater", so I have disabled it as much as possible (as I have already mentioned), but I do get sound with firejail:

client.conf:

Code:
autospawn = no
daemon-binary = /bin/false
daemon.conf:

Code:
exit-idle-time = 0
flat-volumes = yes
default.pa

Code:
.fail
    # Set tsched=0 here if you experience glitchy playback. This will
    # revert back to interrupt-based scheduling and should fix it.
    #
    # Replace the device= part if you want pulse to use a specific device
    # such as "dmix" and "dsnoop" so it doesn't lock an hw: device.
    
    # INPUT/RECORD
    load-module module-alsa-source device=dsnoop
    
    # OUTPUT/PLAYBACK
    load-module module-alsa-sink device=dmix
    
    # Accept clients -- very important
    load-module module-native-protocol-unix

.nofail
.ifexists module-x11-publish.so
    # Publish to X11 so the clients know how to connect to Pulse. Will
    # clear itself on unload.
    load-module module-x11-publish
.endif
Also check with alsamixer if any channel is muted (unmute it by pressing m) and/or if the correct sound device is selected.

Edit: Forgot to add: empty asound.conf, custom ~/.asoundrc and rc.alsa / rc.pulseaudio non-executable (for my settings)

See: https://docs.slackware.com/howtos:mu...io_non-default

Last edited by bateleur; 03-14-2018 at 08:52 PM. Reason: See Edit
 
Old 03-14-2018, 11:34 PM   #8
drgibbon
Member
 
Registered: Nov 2014
Distribution: Slackware64 14.2
Posts: 412

Original Poster
Rep: Reputation: 235Reputation: 235Reputation: 235
I do have working sound outside of firejail, so the problem is definitely localised there. Running alsamixer is fine from the normal command line, but I can't even open it with firejail running:
Code:
bash-4.3$ firejail bash
Reading profile /etc/firejail/default.profile
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-passwdmgr.inc
Reading profile /etc/firejail/disable-programs.inc

** Note: you can use --noprofile to disable default.profile **

Parent pid 27403, child pid 27404
Child process initialized in 35.45 ms

bash-4.3$ alsamixer
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

cannot open mixer: Connection refused
It even fails when running without a profile, so it's something more fundamental than the firejail profile options:
Code:
bash-4.3$ firejail --noprofile bash 
Parent pid 27604, child pid 27605
Child process initialized in 5061167022080.00 ms
bash-4.3$ alsamixer
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

cannot open mixer: Connection refused

bash-4.3$ groups
users lp wheel floppy audio video cdrom plugdev power netdev scanner vboxusers
I will have a go at making pulse the non-default audio manager.

Last edited by drgibbon; 03-15-2018 at 05:10 AM.
 
Old 06-04-2018, 10:10 PM   #9
drgibbon
Member
 
Registered: Nov 2014
Distribution: Slackware64 14.2
Posts: 412

Original Poster
Rep: Reputation: 235Reputation: 235Reputation: 235
To update this, I found out that the Firejail/Pulseaudio problem is only present when I'm running awesomewm. If I log in to Xfce or KDE then I can use audio under firejail no problem. Obviously those desktops are doing something with regards to sound, I just don't know what it is!
 
Old 06-05-2018, 01:42 AM   #10
drgibbon
Member
 
Registered: Nov 2014
Distribution: Slackware64 14.2
Posts: 412

Original Poster
Rep: Reputation: 235Reputation: 235Reputation: 235
For what it's worth, the same problem exists in Fluxbox (from runlevel 3 and startx), so it doesn't appear to be caused by awesomewm itself.
 
Old 07-24-2018, 09:17 PM   #11
drgibbon
Member
 
Registered: Nov 2014
Distribution: Slackware64 14.2
Posts: 412

Original Poster
Rep: Reputation: 235Reputation: 235Reputation: 235
Someone on IRC suggested that this might have something to do with D-Bus?
 
Old 07-24-2018, 10:15 PM   #12
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,391

Rep: Reputation: Disabled
I don't have pulseaudio or firejail, but if its related to dbus adding this to your ~/.xinitrc might help.

Code:
eval `dbus-launch --sh-syntax --exit-with-session`
 
Old 07-24-2018, 11:35 PM   #13
drgibbon
Member
 
Registered: Nov 2014
Distribution: Slackware64 14.2
Posts: 412

Original Poster
Rep: Reputation: 235Reputation: 235Reputation: 235
Thanks, unfortunately it doesn't seem to help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Firejail interferes with pulseaudio actinide Linux - Software 1 12-23-2017 12:46 PM
Can't Get Sound from Pulseaudio -- PulseAudio Will Not Start JasonC10203 Linux - Software 4 11-28-2016 11:18 PM
Debian Jessie - Have Pulseaudio and ALSA installed. Everything is unmuted and settings show sound outputting but no sound actually playing. jjd3592 Linux - Software 12 03-07-2016 07:10 AM
Winecfg crashes on sound tab with Pulseaudio and no 'sounddrivers' without pulseaudio William (Dthdealer) Linux - Software 5 06-13-2010 07:30 AM
no sound after pulseaudio update russianwizard Linux - Software 7 03-19-2009 01:00 PM

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

All times are GMT -5. The time now is 10:21 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration