20

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!

Giovanni De Gaetano
  • 1,322
  • 2
  • 11
  • 17

4 Answers4

8

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
Kevin Bowen
  • 19,615
  • 55
  • 79
  • 83
  • 1
    Thanks for the answer! This wasn't the problem in my case, as I already was a member of 'audio'. – Giovanni De Gaetano Jul 29 '18 at 10:57
  • 1
    This was the case for me – Andrea Vacondio Dec 23 '18 at 17:54
  • The user group audio is unlikely to be a fix, at least with modern Ubuntu - see https://wiki.archlinux.org/index.php/users_and_groups#Pre-systemd_groups which notes that it's used for accessing device files pre-systemd. More details at https://www.freedesktop.org/wiki/Software/systemd/multiseat/ particularly 71-seat.rules and 73-seat-late.rules that ship with systemd (thanks buhman from #pulseaudio IRC) – Ben Creasy Feb 06 '19 at 07:28
  • @BenCreasy On the contrary, this ended up fixing a pulseaudio issue that I've been trying to fix for a month and a half now on 19.10. – Dzinic Dec 08 '19 at 07:54
5

I had similar issues:

  1. sound suddenly stopped
  2. not able to change output and input devices
  3. not recognized newly added sound adaptor
  4. none working microphone
  5. 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:

  1. Kill all the instances with killall pulseaudio.
  2. Start the daemone again with pulseaudio.

After that it worked again.

Fabby
  • 34,259
mascha
  • 163
  • Welcome to Ask Ubuntu! :-) Please don't add the things that didn't work to the answer, but the essential parts that did work! And also: Keep up the good work! :-) – Fabby Sep 07 '18 at 09:16
  • 4
    killall pulseaudio and it's still there in ps – austin Feb 01 '19 at 02:08
  • it's being launched by some other process/service. works fine apparently. i just can't use the pulseaudio command without error – austin Feb 01 '19 at 02:13
3

Had a similar issue where the attached USB audio device just played on 4 of the 8 output channels after update from Ubuntu 19.04 to 19.10. The pulseaudio log was

E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() failed.

Deleting the files in ~/.config/pulse and restarting the machine solves the issue

user.dz
  • 48,105
Jens
  • 39
1

What did work for me :

Pulseaudio configuration's files in

~/.config/pulse

were like

589187e8155f40638e8344f0f9b0ab3c-*

Therefore I deleted them then I did

cp /etc/pulse/* ~/.config/pulse/

It works !

Capeya
  • 19
  • 2