No sound output from Spotify on 18.04

This is a similar problem to this post but I was unable to add to the comments since I am new to StackExchange. I tried the answer posted by Vishesh but it didn't solve the issue for me; when I run start-pulseaudio-x11 command it still says "Failure: Module initialization failed". However, the sound works for all my other applications (VLC, Rhythmbox, web-based audio such as YouTube and SoundCloud). I have not tried the solution posted by Vikas as I wasn't sure whether it would impact my applications that do have audio output.

The problem started when I switched my audio output to HDMI; I had plugged my computer into my TV.

Is anyone else experiencing this issue?


Solution 1:

The simplest solution is to install pavucontrol sudo apt install pavucontrol. Then you launch it and the gui will let you choose the output for each application.

Solution 2:

Yes, I experienced a similar problem today but not just with Spotify.
In my case, no application was able to play the sound.
Only system sounds were coming.
This occured after I had plugged my laptop to my TV using HDMI cable and then unplugged it.

This is how I solved it.

  1. Connect your PC back to the Device using HDMI port
  2. Go to display and mirror the screens
  3. Go to settings>sound.
  4. Change the audio output to the HDMI device
  5. Change the audio output back to the laptop/PC
  6. Go to display and switch back to your laptop screen
  7. Unplug the HDMI cable