38

I have just upgraded my ubuntu to 22.04 but the audio is not working. In the setting, the audio option has only "Dummy Output" and the test fails.

I have tried to do what is reported here and here but both do not work.

Thanks

diedro
  • 533
  • 1
  • 4
  • 8

6 Answers6

39

This looks very similar to No sound output devices listed after upgrade from 21.10 to 22.04

that I could solve with:

sudo touch /usr/share/pipewire/media-session.d/with-pulseaudio
systemctl --user restart pipewire-session-manager

(credits go to https://askubuntu.com/a/1404159/139249)

Mossroy
  • 1,276
13

Pipewire restart for Ubuntu >= 22.10

Pipewire became the default sound framework since Ubuntu 22.10, so now you need to:

systemctl --user restart pipewire.service
systemctl --user restart pipewire-pulse.service

Learned from: Is there another way to restart the sound system if pulseaudio/ALSA don't work?

The audio framework may change, but some things will never change.

For Ubuntu <= 22.04, try both pulseaudio --kill then pulseaudio --start

The dummy audio is coming up for me after suspend, and to fix it I needed both:

pulseaudio --kill
pulseaudio --start

Certain applications also needed to be restarted to pick up the new pulseaudio, e.g. VLC.

More details at: No sound on wake, Dummy Output always takes over. 'pulseaudio -k' the fix

Tested on Ubuntu 22.04.1, Lenovo ThinkPad P51.

1

I have found this solution here.

Firstly, I have kill pulseaudio:

pulseaudio -k

After that, I have check if my laptop uses snd_hda_intel:

lsmod | grep snd_hda_intel

Luckily, it does.

I have, hence, run the following command:

echo "options snd-hda-intel model=generic" | sudo tee -a /etc/modprobe.d/alsa-base.conf

Finally, I have switched off and switched on my laptop. It seems that a simple reboot is not enough.

Best

diedro
  • 533
  • 1
  • 4
  • 8
  • Thanks for the comment. I have edited my previous answer. – diedro May 06 '22 at 07:44
  • Recently, I have found that even what I have done is not enough. I have to reboot each log-in session in a recovery mode. this procedure seems to fix other issues that I am experiencing such as problems with python debug mode and video plays. – diedro May 09 '22 at 08:59
1

I found the following to fix sound. This is not my fix but it worked because my hardware was Intel Pentium based. So if your hardware is Intel then edit this file:

sudo nano /etc/default/grub

Goto line: GRUB_CMDLINE_LINUX_DEFAULT=""

At the end Add to the following line enter the following: snd_hda_intel.dmic_detect=0

Press CTL+X, type "y" for yes, press enter to exit

Then type the following: sudo update-grub

Now reboot. You should have sound.

David
  • 2,101
  • 13
  • 16
  • 25
1

I tried everything else above, but then running

sudo modprobe snd-hda-intel

worked. I got immediately devices to show on: Settings->Sound->Output Devices instead of Dummy device.

I added the module name to /etc/modules to load it automatically on reboot.

PHZ.fi-Pharazon
  • 277
  • 2
  • 4
0

In my case, I had the same issue after packages update on ubuntu 22.04, and was solved by updating preinstalled PipeWire to use ppa version. You can follow the installation instructions here to see if it helps: https://linuxconfig.org/how-to-install-pipewire-on-ubuntu-linux

UPDATE:

After a few reboots, it stopped working again. New error showed me "org.freedesktop.systemd1 exited with status 1", so I dig deeper and found my /run/user/1000 folder was owned by root (because of docker restart policy). I removed the folder and reboot the system.