15

I use Clementine and it started yesterday to refuse to play anything and display an "access denied" alert box. Same with Rhythmbox. After a while, I realized that my sound indication is also greyed and there is no sound card visible in the sound settings.

I think that Pulseaudio is the culprit but no certitude there (see the output below). I am on 13.04 and something went wrong but I don't see how to restart it with a clean config or if I need to change anything.

lionel@prime:~$ pulseaudio -vvvv
I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us.
D: [pulseaudio] core-util.c: RealtimeKit worked.
I: [pulseaudio] core-util.c: Successfully gained nice level -11.
I: [pulseaudio] main.c: This is PulseAudio 3.0
D: [pulseaudio] main.c: Compilation host: x86_64-pc-linux-gnu
D: [pulseaudio] main.c: Compilation CFLAGS: -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -W -Wextra -pipe -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option
D: [pulseaudio] main.c: Running on host: Linux x86_64 3.8.0-29-generic #42-Ubuntu SMP Tue Aug 13 19:40:39 UTC 2013
D: [pulseaudio] main.c: Found 8 CPUs.
I: [pulseaudio] main.c: Page size is 4096 bytes
D: [pulseaudio] main.c: Compiled with Valgrind support: no
D: [pulseaudio] main.c: Running in valgrind mode: no
D: [pulseaudio] main.c: Running in VM: no
D: [pulseaudio] main.c: Optimized build: yes
D: [pulseaudio] main.c: FASTPATH defined, only fast path asserts disabled.
I: [pulseaudio] main.c: Machine ID is 77bf4823eb9fbd64b69d605100000002.
I: [pulseaudio] main.c: Using runtime directory /run/user/lionel/pulse.
E: [pulseaudio] core-util.c: Home directory not accessible: Permission denied

The ouput of ls -l /run/user/lionel/ and pulseaudio --dump-conf

lionel@prime:~$ ls -l /run/user/lionel/
total 0
drwx------ 2 lionel lionel  60 août  28 15:15 dconf
dr-x------ 2 lionel lionel   0 août  28 12:30 gvfs
drwx------ 2 lionel lionel  40 août  28 12:30 gvfs-burn
drwx------ 2 lionel lionel 120 août  28 12:30 keyring-iiUWPh
drwx------ 2 lionel lionel  40 août  28 15:11 pulse
lionel@prime:~$ pulseaudio --dump-conf
### Read from configuration file: /etc/pulse/daemon.conf ###
daemonize = no
fail = yes
high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 5
allow-module-loading = yes
allow-exit = yes
use-pid-file = yes
system-instance = no
local-server-type = user
cpu-limit = no
enable-shm = yes
flat-volumes = no
lock-memory = no
exit-idle-time = 20
scache-idle-time = 20
dl-search-path = /usr/lib/pulse-3.0/modules
default-script-file = /etc/pulse/default.pa
load-default-script-file = yes
log-target = auto
log-level = notice
resample-method = speex-float-1
enable-remixing = yes
enable-lfe-remixing = no
default-sample-format = s16le
default-sample-rate = 44100
alternate-sample-rate = 48000
default-sample-channels = 2
default-channel-map = front-left,front-right
default-fragments = 8
default-fragment-size-msec = 10
enable-deferred-volume = yes
deferred-volume-safety-margin-usec = 1
deferred-volume-extra-delay-usec = 0
shm-size-bytes = 0
log-meta = no
log-time = no
log-backtrace = 0
rlimit-fsize = -1
rlimit-data = -1
rlimit-stack = -1
rlimit-core = -1
rlimit-rss = -1
rlimit-as = -1
rlimit-nproc = -1
rlimit-nofile = 256
rlimit-memlock = -1
rlimit-locks = -1
rlimit-sigpending = -1
rlimit-msgqueue = -1
rlimit-nice = 31
rlimit-rtprio = 9
rlimit-rttime = 1000000
  • 1
    Edit your question and add the output of ls -l /run/user/lionel/ and pulseaudio --dump-conf. – Braiam Aug 28 '13 at 14:17
  • I just added the output. – Lionel Barret Aug 28 '13 at 16:26
16

Ok, I got it in the end.

It was a permission problem with my home folder and pulseaudio.

Run the following command to fix the $HOME directory permissions for the current $USER:

sudo chown -R $USER:$USER $HOME/

I used http://www.linuxquestions.org/questions/linux-software-2/problem-with-pulse-audio-834041/ and http://ubuntuforums.org/showthread.php?p=6208727 as sources.

The solution for me was to fix the permissions using the following command: sudo chown -R lionel:lionel /home/lionel and then using pavucontrol to unmute the output.

The gnome indicator is still greyed but music is back, and that's a good thing.

3

(I'm only trying to improve the marked answer slightly, but with a little bit more than I think works in a simple comment. I thought it useful at least to post for the next guy. If a moderator disagrees this answer could be demoted to a comment on the selected answer if more appropriate.)

The reference to pavucontrol was rather cryptic and this response somewhat less usable to me, but it did put me onto a solution.

I had none of the permission and ownership problems that seem to be the main focus here. pavucontrol, which I had to install for just this purpose, did allow me, on the playback tab, to change from "High Definition Audio Controller Digital Stereo (HDMI)" to "Built-in Audio Analog Stereo" and my audio began working again as it had before.

I still don't know I got my ThinkPad (running Mint 13 which is basically Ubuntu 12.04 LTS) into this unworking state, but this is how I was able to get audio (in particular, Audacious Player using Pulse) working. I hope this helps.

  • Using i3wm on Ubuntu and installing pavucontrol fixed the issue for me. Marked answer was not needed. – Philip Kirkbride Oct 12 '16 at 17:07
0

I don't have enough rep to comment and thank @Wanderer, but his hack works perfectly for me. Don't ever let the negativity stop you!

HOME=/tmp/$USER pulseaudio --start

Yes, it would be better to understand where the permission error lies, but I redid all my permissions for the last hour to no avail. I have my User directory on another partition symbolic linked, I've changed perms for the link, for the physical location, for the Home directory to no avail. I just want to listen to Pandora while I finish setting up my Window 10 VDI! So I can get finish getting GCP to work on Kubuntu. If nothing else knowing this hack works is informative to troubleshooting!

Even when logged in I still can't run this without the same error:

systemctl --user start pulseaudio.service

Feb 14 18:56:40 pc pulseaudio[5435]: E: [pulseaudio] core-util.c: Home directory not accessible: Permission denied

But I can move to the home directory no problem as the basic User. I have seen other system processes resolving the link to /media/username/partition/home/username, so it may be the pulseaudio service can't follow through that maze.

  • Where do you add the HOME=/tmp/$USER pulseaudio --start? – Dawoodjee May 27 '19 at 15:17
  • 1
    It is a command to be entered on the command line in a terminal (emulator). I believe it is setting a temporary environmental variable using the capitol letters and =, and then running a the pulseaudio command. 'printenv' will show you other variables. – alchemy May 28 '19 at 20:36
0

In my case this was caused by me creating a file ~/.config/pulse/default.pa. The bulletproof solution to fix my sound settings issue was removing the directory with my pulseaudio preferences:

rm -rf ~/.config/pulse/
-1

having the same problem as the OP, but not being able to change permissions on $HOME I found a different way to start pulseaudio: explicitly start pulseaudion with a different $HOME, like

> HOME=/tmp/$USER pulseaudio --start

which now runs the program for me. Make sure /tmp/$USER exists.

hth

  • This is an incredibly ugly hack. You should really figure out how to get a writable home directory back. You're welcome to open a new question about it if you can't do it yourself. It shouldn't be too hard since the range of possible causes is rather limited. -1 – David Foerster Sep 5 '18 at 18:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.