pulseaudio not working : "Home directory not accessible: Permission denied"
Solution 1
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.
Solution 2
(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.
Solution 3
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/
Solution 4
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
Related videos on Youtube
Lionel Barret
Updated on September 18, 2022Comments
-
Lionel Barret over 1 year
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/
andpulseaudio --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
-
Braiam over 10 yearsEdit your question and add the output of
ls -l /run/user/lionel/
andpulseaudio --dump-conf
. -
Lionel Barret over 10 yearsI just added the output.
-
-
Edgar Magallon over 7 yearsUsing i3wm on Ubuntu and installing pavucontrol fixed the issue for me. Marked answer was not needed.
-
David Foerster over 5 yearsThis 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
-
Dawoodjee almost 5 yearsWhere do you add the HOME=/tmp/$USER pulseaudio --start?
-
alchemy almost 5 yearsIt 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.
-
Cerin almost 4 yearsThis is a horrible solution. Timidity/Pulseaudio does not need to access every single file in your home directory. If there's a specific folder or directory it needs access to, then state that. Don't recommend running a command that will take hours to complete, since it needs to scan every single file in your home directory.
-
Karl almost 4 yearshi, Nmath, thanks for your advice. The reason why i put the complete process of how i solve this problem here is that i think some of my previous steps may help. E.g. fix the missing libraries and so on. I think the problem was probably solved by more than just having blueman installed. I didn't want to confuse the readers and I edited my answer as you said. thanks.
-
WinEunuuchs2Unix almost 4 years@Cerin Doesn't take hours, just a few moments on a SSD over ssh login. Anyway this answer solved my problem after both an update and running scp to move root files around between machines at the same time tonight. Not sure what the exact cause was.
-
Jeremy Hajek almost 4 years@WinEunuuchs2Unix It does solve the issue, but why?
-
WinEunuuchs2Unix almost 4 years@JeremyHajek Are you asking me what the answer does and how it does it?
-
Jeremy Hajek almost 4 years@WinEunuuchs2Unix How it does it
-
WinEunuuchs2Unix almost 4 years@JeremyHajek So basically you are asking me what the command
sudo chown -R $USER:$USER $HOME/
in Lionel Barret's answer does overall? Or is there a specific word likesudo
orchown
or-R
you need clarified? -
CoderGuy123 about 3 yearsWorked for me on Mint 20. I had migrated the home dir from a prior computer, and apparently some permission was set wrongly. Before this, I had deleted .config/pulse as well, as mentioned here. bbs.archlinux.org/viewtopic.php?id=159605