Pulse audio not working unless root

Questions about codecs, DVD playback, web plugins...
Forum rules
Before you post please read how to get help
BigAngry
Level 1
Level 1
Posts: 14
Joined: Thu May 11, 2017 6:10 pm

Pulse audio not working unless root

Postby BigAngry » Sun Sep 03, 2017 10:28 pm

I recently started having problems with my audio. I tracked down the issue after some work to a permissions problem.
If I try to open pulse audio using pavucontrol it opens but never establishes a connection with the following issue shm_open() failed: No such file or directory
This works fine if I do sudo pavucontrol.

As a consequence whenever I use a media player it has no sound. Strangely enough sound works fine through my browsers.
I tried adding my user to groups 'audio, pulse, and pulse-access' but that didnt help. After some searching online I tried modifying /etc/fstab and /etc/pulse/client.conf to no avail. I also looked at my /run/user folder and my user owns the pulse files there. I'm at a loss as to how to solve this.
Last edited by BigAngry on Thu Sep 07, 2017 5:51 pm, edited 2 times in total.

greerd
Level 5
Level 5
Posts: 732
Joined: Sat Jul 31, 2010 10:58 am
Location: Nova Scotia, Canada

Re: Pulse audio not working unless root

Postby greerd » Mon Sep 04, 2017 7:07 am

Are you perhaps using firejail?
Image

User avatar
Flemur
Level 13
Level 13
Posts: 4635
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Pulse audio not working unless root

Postby Flemur » Mon Sep 04, 2017 9:28 am

BigAngry wrote:This works fine if I do sudo pavucontrol.

That's probably how you broke it - now root own your pulse files.

If this command returns files, take ownership of them:

Code: Select all

find $HOME ! -user $USER
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?

BigAngry
Level 1
Level 1
Posts: 14
Joined: Thu May 11, 2017 6:10 pm

Re: Pulse audio not working unless root

Postby BigAngry » Mon Sep 04, 2017 5:09 pm

Flemur wrote:
BigAngry wrote:This works fine if I do sudo pavucontrol.

That's probably how you broke it - now root own your pulse files.

If this command returns files, take ownership of them:

Code: Select all

find $HOME ! -user $USER


There were quite a few files returned by that command, among them was the pulse ini. I didnt realize running sudo would cause ownership to change, thats seems a bit odd. I took ownership and after a restart it started working again. Thanks!

User avatar
Flemur
Level 13
Level 13
Posts: 4635
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Pulse audio not working unless root

Postby Flemur » Tue Sep 05, 2017 5:17 pm

BigAngry wrote: I didnt realize running sudo would cause ownership to change, thats seems a bit odd.

I think it's sort-of a bug...because the problems it causes show up here!

When you run GUI programs use "gksudo" (or "ksudo"[?] in KDE), like

Code: Select all

gksudo pavucontrol
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?

BigAngry
Level 1
Level 1
Posts: 14
Joined: Thu May 11, 2017 6:10 pm

Re: Pulse audio not working unless root

Postby BigAngry » Thu Sep 07, 2017 5:52 pm

Ok for some reason it stopped working again, and this time nothing shows up from 'find $HOME ! -user $USER'
This is a bit perplexing.

BigAngry
Level 1
Level 1
Posts: 14
Joined: Thu May 11, 2017 6:10 pm

Re: Pulse audio not working unless root

Postby BigAngry » Thu Sep 21, 2017 3:51 am

I've messed around with it some more but cant seem to figure it out. Any suggestions?

User avatar
Flemur
Level 13
Level 13
Posts: 4635
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Pulse audio not working unless root

Postby Flemur » Thu Sep 21, 2017 10:03 am

BigAngry wrote:I've messed around with it some more but cant seem to figure it out. Any suggestions?

Well, I removed pulseaudio! (Although that can cause problems depending on your HW and what you do with it, so it's not officially recommended...and isn't possible with Cinnamon. The only thing I used pulseaudio for was to record "what you hear", which I can do without it with a different sound card. Though now firefox requires it...sigh...so use old FF version.)

Anyway, another typical pulseaudio fix/hack is to remove its files under your $HOME.

Code: Select all

find ~ -iname "*pulse*

then delete them. IIRC, it'll probably be one file ~/.pulse(something). Then restart pulseaudio and/or logout/backin.
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?

Hoser Rob
Level 9
Level 9
Posts: 2888
Joined: Sat Dec 15, 2012 8:57 am

Re: Pulse audio not working unless root

Postby Hoser Rob » Thu Sep 21, 2017 3:19 pm

Removing pulseaudio is not only not recommended, for good reason, it's unnecessary. Try a read of this by a Canonical dev ...

http://voices.canonical.com/david.henni ... our-audio/

BigAngry
Level 1
Level 1
Posts: 14
Joined: Thu May 11, 2017 6:10 pm

Re: Pulse audio not working unless root

Postby BigAngry » Thu Sep 21, 2017 6:20 pm

Alright after digging around some more I figured out the root cause of the issue. Seems to be that whenever I launch firefox with firejail, it prevents pulse from creating new files in /dev/shm and deletes whatever files were present on boot.
I believe its this exact issue referenced here https://bugs.freedesktop.org/show_bug.cgi?id=92141. Towards the bottom they specify that in pulse 9 and 10 that the issue was fixed. I see that the newest version of pulse is 11. However, mine is 8. I looked into updating it to 11, but that seems to be a daunting task.

Could someone point me in the right direction as for a proper guide on how to do the upgrade, or how to configure firejail not to mess my stuff up?

greerd
Level 5
Level 5
Posts: 732
Joined: Sat Jul 31, 2010 10:58 am
Location: Nova Scotia, Canada

Re: Pulse audio not working unless root

Postby greerd » Thu Sep 21, 2017 9:13 pm

Try this workaround.
Image


Return to “Sound, Multimedia, & Codecs”