3

Since I plugged in a broken HDD drive, my pulseaudio won't work. At startup ubuntu stayed checking whether it worked and it took a long time to boot (several start jobs were started).

If I try to start it from console I get the following output.

W: [pulseaudio] alsa-mixer.c: Your kernel driver is broken: it reports a volume range from 0 to 0 which makes no sense.
W: [pulseaudio] alsa-mixer.c: Your kernel driver is broken: it reports a 
volume range from 0 to 0 which makes no sense.
W: [pulseaudio] authkey.c: Failed to open cookie file '/root/.config/pulse/cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to load authentication key '/root/.config/pulse/cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to open cookie file '/root/.pulse-cookie': No such file or directory
W: [pulseaudio] authkey.c: Failed to load authentication key '/root/.pulse-cookie': No such file or directory

If I try vlc I get the following output:

[000055b30db07200] alsa audio output error: cannot open ALSA device "default": No such file or directory

I saw many people with the same issues but their solutions somehow didn't work for me. pulseaudio -D came in many of them but for me this outputs Daemon startup failed.

Due to these tutorials, I did delete .pulse, since it wasn't created at a reboot or startup of pulseaudio, I don't know if it's a problem.

I'm quite new to ubuntu, so don't hesitate to explain whatever it is daemon does and how my HDD affected my kernel.

I'm not afraid to use the terminal as this is the reason why I switched to ubuntu.

System is Ubuntu 19.10 (Eoan Ermine)

Kernel is 5.3.0-29-generic x86_64

I also changed my home directory to another hard drive, but this shouldn't be a problem because the path would stay the same.

Thanks anyway.

I indeed ran pulseaudio with root access because if I just wrote pulseaudio it said

Home directory not accessible: permission denied.

If I run systemctl --user restart pulseaudio I get:

Job for pulseaudio.service failed because the control process exited with error code.
See "systemctl --user status pulseaudio.service" and "journalctl --user -xe" for details.

If I run systemctl --user status pulseaudio.service I get: run systemctl for more info

Mär 02 16:40:41 tom-X570-AORUS-ELITE systemd[1320]: Failed to start Sound Service.
Mär 02 16:40:41 tom-X570-AORUS-ELITE systemd[1320]: pulseaudio.service: Service RestartSec=100ms expired, scheduling restart.
Mär 02 16:40:41 tom-X570-AORUS-ELITE systemd[1320]: pulseaudio.service: Scheduled restart job, restart counter is at 5.
Mär 02 16:40:41 tom-X570-AORUS-ELITE systemd[1320]: Stopped Sound Service.
Mär 02 16:40:41 tom-X570-AORUS-ELITE systemd[1320]: pulseaudio.service: Start request repeated too quickly.
Mär 02 16:40:41 tom-X570-AORUS-ELITE systemd[1320]: pulseaudio.service: Failed with result 'exit-code'.
Mär 02 16:40:41 tom-X570-AORUS-ELITE systemd[1320]: Failed to start Sound Service.

If you need the output of journalctl do tell me.

  • 1
    It looks like you are trying to use sudo to run pulseaudio or you are logged in as root. You should not do this. What commands are you using to start pulseaudio? – mchid Mar 01 '20 at 23:31

1 Answers1

8

It seems that removing and reinstalling pulseaudio fixes this problem for some people. However, the only methods I have seen are quite destructive as many packages depend on pulseaudio. To circumvent the dependency issue, we can purge pulseaudio using dpkg instead of apt.

First, run the following commands:

sudo apt update
sudo apt upgrade
sudo dpkg -P --force-all pulseaudio
sudo rm -r ~/.pulse ~/.asound* ~/.pulse-cookie ~/.config/pulse

If you get an error at the last step, ignore the error.

Next, reinstall and restart ALSA and pulseaudio:

sudo apt install --reinstall -o Dpkg::Options::="--force-confmiss" pulseaudio
sudo alsa force-reload
systemctl --user restart pulseaudio

Finally, you can check the status of pulseaudio with the following command:

systemctl --user status pulseaudio

It should return as "loaded" and "active". If not, reboot and check the status again.

mchid
  • 45,159
  • 1
    Solution confirmed! This is the 10th one I tried, congrats. Ubuntu 18.04 user on an ASUS TUF gaming x570-plus motherboard. – legel Jun 30 '20 at 13:43
  • This is a very thorough answer. Thank you. I just installed 18.04 onto a fanless mini PC, Intel based. It has no sound. No output devices of any kind, not even dummy sound, show up in sound settings. I tried all of the steps you listed and get this:

    Loaded: loaded (/usr/lib/systemd/user/pulseaudio.service; enabled; vendor pre Active: failed (Result: signal) since 27s ago Process: 1347 ExecStart=/usr/bin/pulseaudio --daemonize=no (code=killed, signa Main PID: 1347 (code=killed, signal=KILL) ... pulseaudio.service: Failed with result 'sig Failed to start Sound Service.

    – robline Feb 20 '22 at 09:11
  • This should really be asked as a separate question. However you can check the logs using journalctl -b | grep -i pulse – mchid Feb 20 '22 at 09:51
  • @robline Also, I have 18.04 and pulseaudio service is disabled for some reason but it's actually working fine without the service. Try pulseaudio -k to simply restart pulseaudio (it should start up on its own). – mchid Feb 20 '22 at 09:59
  • @robline Also also, if you're facing the same kernel error as the question, it was supposed to be fixed according to a bug report. If you have the kernel driver is broken when you try to run pulseaudio, then update ubuntu fully: sudo apt update and sudo apt dist-upgrade – mchid Feb 20 '22 at 10:06
  • Please, don't do this DPKG command, unless you want to crash your audio. I had to sudo apt --fix-broken install packages. I had no sound even after restart. – Unix Jun 15 '24 at 07:00
  • @Unix It appears you didn't immediately follow the next step which installs your missing package making sudo apt -f install obsolete. – mchid Jun 15 '24 at 10:06
  • @Unix or possibly skipped the first two commands (and there was existing broken packages that needed to be fixed before running dpkg)? – mchid Jun 15 '24 at 10:11
  • @Unix If there's no sound, then what happens when you run sudo apt install --reinstall -o Dpkg::Options::="--force-confmiss" pulseaudio? Simply installing the package without forcing replacement of the missing configuration files (which is what sudo apt -f install would likely do by reinstalling the package but not the missing files) will result in pulseaudio having no configuration to work with. – mchid Jun 15 '24 at 10:32
  • @Unix If all that is good and well, then the other solution to the common "dummy output" reported as the only available device is usually to install the pavucontrol package and then launch the "PulseAudio Volume Control" app, go to the Configuration tab and then select like the first one or two "unavailable" profiles listed should give you a working output device (or sometimes switching the profile to "off" or selecting a different profile and then switching back works as well). – mchid Jun 15 '24 at 10:40