Pulseaudio not working, daemon already running and no permission for home folder
I'm using Ubuntu 16.04.4 LTS, and the sound "suddenly" stopped working. I have been playing around with the issue for some time, so it's possible that I added another layer of problems on top of the original one. The situation at the moment is the following:
pulseaudio
produces
E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() failed.
Running it as sudo pulseaudio
:
E: [pulseaudio] core-util.c: Home directory not accessible: Permission denied
Then, I tried the solution proposed by this question to fix the accessibility problem of the home directory:
sudo chown -R giovanni:giovanni /home/giovanni
but with no apparent effect. Running pavucontrol
works fine.
The output of pulseaudio -vvvvv
is as following:
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 8.0
D: [pulseaudio] main.c: Compilation host: x86_64-pc-linux-gnu
D: [pulseaudio] main.c: Compilation CFLAGS: -g -O2 -fstack-protector-strong -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 -fno-common -fdiagnostics-show-option -fdiagnostics-color=auto
D: [pulseaudio] main.c: Running on host: Linux x86_64 4.4.0-130-generic #156-Ubuntu SMP Thu Jun 14 08:53:28 UTC 2018
D: [pulseaudio] main.c: Found 4 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 5557250d9a584b4babf69038dc518427.
I: [pulseaudio] main.c: Session ID is c2.
I: [pulseaudio] main.c: Using runtime directory /run/user/1000/pulse.
I: [pulseaudio] main.c: Using state directory /home/giovanni/.config/pulse.
I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-8.0/modules.
I: [pulseaudio] main.c: Running in system mode: no
E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() failed.
I tried to remove and reinstall pulseaudio (several times) but with no success. Also, I verified that there's no pulseaudio file in:
~/.config/autostart/
There are no files in:
/etc/X11/xinit/xinitrc.d/pulseaudio
/etc/xdg/autostart/pulseaudio-kde.desktop
There is a file in:
/etc/xdg/autostart/pulseaudio.desktop
I would be grateful for any suggestions on what to check or how to fix this issue. Thanks!
I had the same problem, none of the top Google results helped, and I finally found a solution that worked: make sure your user is in the audio
group.
I added mine with the following command:
sudo addgroup $USER audio
I had similar issues:
- sound suddenly stopped
- not able to change output and input devices
- not recognized newly added sound adaptor
- none working microphone
- none working headphone
and found out that for some reasons multiple pulseaudio
servers were running by executing ps x | grep pulseaudio
. The following steps solved the problem:
- Kill all the instances with
killall pulseaudio
. - Start the daemone again with
pulseaudio
.
After that it worked again.