PulseAudio Buggy on Mint 20

Questions about codecs, DVD playback, web plugins...
Forum rules
Before you post please read how to get help
Post Reply
User avatar
MrEen
Level 20
Level 20
Posts: 11542
Joined: Mon Jun 12, 2017 8:39 pm

PulseAudio Buggy on Mint 20

Post by MrEen »

This is just a heads up for users having sound issues on Mint 20.

Somewhere between the the last 11.x version of PulseAudio used on the 19 series of Mint, and the 13.99.x version used in Mint 20, something was introduced that affected a not insignificant number of users.

I've tried my best to find the cause or at least a workaround and the very limited success achieved was downgrading PulseAudio to the version in the Ubuntu security repo that helped a very few users.

A couple of present bug reports are still in progress that will hopefully resolve this. See here and here. There may be more, but I stopped looking after finding those two that seem relevant to the issue.

To know if you're affected, the output of pacmd list-cards might show something like this for your built-in sound card:
Profiles:
input:analog-stereo: Analog Stereo Input (sinks: 0, sources: 1, priority: 65, available: no)
output:analog-stereo: Analog Stereo Output (sinks: 1, sources: 0, priority: 6500, available: yes)
output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (sinks: 1, sources: 1, priority: 6565, available: no)
That is the most common symptom I've seen, and it may have been somewhat intentional based on the dialogue in those bug reports, meaning if nothing is plugged in then maybe that's what it should show, even though that's never been the case in earlier versions of PulseAudio.

I've been averaging over 40 posts per day for over a week almost exclusively dealing with this and it is starting to wear me down. I was looking forward to Mint 20 (read Ubuntu 20.04) reducing the sound issues people were experiencing with the upgraded versions of PulseAudio, ALSA, linux-firmware, sof driver and kernel, but that has not been the case. While I'm hoping this might be temporary, I am no longer counting on it. Some developers/maintainers (upstream from Mint) have made some really stupid decisions in the past few months, and there's even more new crap coming down the pike, that I am starting to believe Linux audio is going to be going backwards (for some, not all) for the foreseeable future.

I will update this post if a fix or workaround is found. I do not expect that to occur in the next week. With luck, in less than a month this might be fixed.

P.S. I know this post really belongs in the chat section, but felt it would better reach those affected here.

Pikmin
Level 1
Level 1
Posts: 6
Joined: Wed Jul 29, 2020 6:54 pm

Re: PulseAudio Buggy on Mint 20

Post by Pikmin »

I've upgraded to 20.04 a while back and the issue that I've been having with sound is that the changes I make are not persistent.

Every time I start the laptop I have to change from analog to HDMI output

I've tried changing the /etc/pulse/default.pa to no avail and had a look in ~/.config/pulse

I've purged and reinstalled pulseaudio and now speaker test is not working anymore.

Will keep looking. Thanks for your help

User avatar
MrEen
Level 20
Level 20
Posts: 11542
Joined: Mon Jun 12, 2017 8:39 pm

Re: PulseAudio Buggy on Mint 20

Post by MrEen »

Hi Pikmin, and welcome to the forum.

Let's get a look at your sound setup with this command:

Code: Select all

curl https://gitlab.freedesktop.org/pulseaudio/pulseaudio/raw/master/src/utils/pa-info?inline=false | bash | nc termbin.com 9999
If you made any error in default.pa, that could cause PulseAudio to fail to load, then the speaker test wont work.

Pikmin
Level 1
Level 1
Posts: 6
Joined: Wed Jul 29, 2020 6:54 pm

Re: PulseAudio Buggy on Mint 20

Post by Pikmin »

Thanks for your help.

I am currently at work so it will be a few hours before I can post the output.

The other thing I noticed, on Mint 19.3 I would see all of the profiles whether or not HDMI is connected, now it seems if the laptop is not connected to HDMI it will only show the analog ones.

The settings I played with in default.pa from memory is set-card-profile

From https://wiki.archlinux.org/index.php/Pu ... o/Examples (Set the default output sink profile)

My work Mint 20.04 laptop seems to have the same problem, I don't have HDMI connected at the moment

Code: Select all

pacmd list-cards
1 card(s) available.
    index: 0
	name: <alsa_card.pci-0000_00_1f.3>
	driver: <module-alsa-card.c>
	owner module: 7
	properties:
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xa121c000 irq 149"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1f.3"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "9dc8"
		device.product.name = "Cannon Point-LP High Definition Audio Controller"
		device.form_factor = "internal"
		device.string = "0"
		device.description = "Built-in Audio"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	profiles:
		input:analog-stereo: Analogue Stereo Input (priority 65, available: unknown)
		output:analog-stereo: Analogue Stereo Output (priority 6500, available: unknown)
		output:analog-stereo+input:analog-stereo: Analogue Stereo Duplex (priority 6565, available: unknown)
		output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5900, available: no)
		output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) Output + Analogue Stereo Input (priority 5965, available: no)
		output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 800, available: no)
		output:hdmi-surround+input:analog-stereo: Digital Surround 5.1 (HDMI) Output + Analogue Stereo Input (priority 865, available: no)
		output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 800, available: no)
		output:hdmi-surround71+input:analog-stereo: Digital Surround 7.1 (HDMI) Output + Analogue Stereo Input (priority 865, available: no)
		output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (priority 5700, available: no)
		output:hdmi-stereo-extra1+input:analog-stereo: Digital Stereo (HDMI 2) Output + Analogue Stereo Input (priority 5765, available: no)
		output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (priority 600, available: no)
		output:hdmi-surround-extra1+input:analog-stereo: Digital Surround 5.1 (HDMI 2) Output + Analogue Stereo Input (priority 665, available: no)
		output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (priority 600, available: no)
		output:hdmi-surround71-extra1+input:analog-stereo: Digital Surround 7.1 (HDMI 2) Output + Analogue Stereo Input (priority 665, available: no)
		output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (priority 5700, available: no)
		output:hdmi-stereo-extra2+input:analog-stereo: Digital Stereo (HDMI 3) Output + Analogue Stereo Input (priority 5765, available: no)
		output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (priority 600, available: no)
		output:hdmi-surround-extra2+input:analog-stereo: Digital Surround 5.1 (HDMI 3) Output + Analogue Stereo Input (priority 665, available: no)
		output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (priority 600, available: no)
		output:hdmi-surround71-extra2+input:analog-stereo: Digital Surround 7.1 (HDMI 3) Output + Analogue Stereo Input (priority 665, available: no)
		output:hdmi-stereo-extra3: Digital Stereo (HDMI 4) Output (priority 5700, available: no)
		output:hdmi-stereo-extra3+input:analog-stereo: Digital Stereo (HDMI 4) Output + Analogue Stereo Input (priority 5765, available: no)
		output:hdmi-surround-extra3: Digital Surround 5.1 (HDMI 4) Output (priority 600, available: no)
		output:hdmi-surround-extra3+input:analog-stereo: Digital Surround 5.1 (HDMI 4) Output + Analogue Stereo Input (priority 665, available: no)
		output:hdmi-surround71-extra3: Digital Surround 7.1 (HDMI 4) Output (priority 600, available: no)
		output:hdmi-surround71-extra3+input:analog-stereo: Digital Surround 7.1 (HDMI 4) Output + Analogue Stereo Input (priority 665, available: no)
		output:hdmi-stereo-extra4: Digital Stereo (HDMI 5) Output (priority 5700, available: no)
		output:hdmi-stereo-extra4+input:analog-stereo: Digital Stereo (HDMI 5) Output + Analogue Stereo Input (priority 5765, available: no)
		output:hdmi-surround-extra4: Digital Surround 5.1 (HDMI 5) Output (priority 600, available: no)
		output:hdmi-surround-extra4+input:analog-stereo: Digital Surround 5.1 (HDMI 5) Output + Analogue Stereo Input (priority 665, available: no)
		output:hdmi-surround71-extra4: Digital Surround 7.1 (HDMI 5) Output (priority 600, available: no)
		output:hdmi-surround71-extra4+input:analog-stereo: Digital Surround 7.1 (HDMI 5) Output + Analogue Stereo Input (priority 665, available: no)
		off: Off (priority 0, available: unknown)
	active profile: <output:analog-stereo>
	sinks:
		alsa_output.pci-0000_00_1f.3.analog-stereo/#0: Built-in Audio Analogue Stereo
	sources:
		alsa_output.pci-0000_00_1f.3.analog-stereo.monitor/#0: Monitor of Built-in Audio Analogue Stereo
	ports:
		analog-input-internal-mic: Internal Microphone (priority 8900, latency offset 0 usec, available: unknown)
			properties:
				device.icon_name = "audio-input-microphone"
		analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: unknown)
			properties:
				device.icon_name = "audio-speakers"
		analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-headphones"
		hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
		hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
		hdmi-output-2: HDMI / DisplayPort 3 (priority 5700, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
		hdmi-output-3: HDMI / DisplayPort 4 (priority 5600, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
		hdmi-output-4: HDMI / DisplayPort 5 (priority 5500, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
I added the following to /etc/pulse/default.pa
set-card-profile alsa_card.pci-0000_00_1f.3 output:hdmi-surround-extra3: Digital Surround 5.1 (HDMI 4) Output


syslog reports
pulseaudio[64019]: No such profile: output:hdmi-surround-extra3: Digital Surround 5.1 (HDMI 4) Output
Last edited by MrEen on Wed Jul 29, 2020 9:46 pm, edited 1 time in total.
Reason: Added code tags to increase readability

User avatar
MrEen
Level 20
Level 20
Posts: 11542
Joined: Mon Jun 12, 2017 8:39 pm

Re: PulseAudio Buggy on Mint 20

Post by MrEen »

Yeah, that was a bad edit, but I understand what you were trying to do. This would have been the proper edit to make:

Code: Select all

set-card-profile alsa_card.pci-0000_00_1f.3 output:hdmi-surround-extra3
Or, if you wanted input available as well, this:

Code: Select all

set-card-profile alsa_card.pci-0000_00_1f.3 output:hdmi-surround-extra3+input:analog-stereo
The problem I foresee is PulseAudio is claiming those options are unavailable. This is most likely an issue with the newest PulseAudio versions. It may work regardless, so do give it a try and let us know how you fare. If it doesn't work, go ahead with the curl output. I probably won't be back for at least 16 hours after the time this is posted, but I'll check in when I can.

Pikmin
Level 1
Level 1
Posts: 6
Joined: Wed Jul 29, 2020 6:54 pm

Re: PulseAudio Buggy on Mint 20

Post by Pikmin »

Thanks for your help. So the issue was incorrect formatting on my side

I've tried on my work laptop and the settings are persistent. Will try at home and report back

Code: Select all

Output Tab
Built-in Audio Digital Surround 5.1 (HDMI4)
Surround 5.1

Connector HDMI / DisplayPort 4
EDIT: Tried at home and no luck, keeps reverting back to analogue

https://termbin.com/txyi

What did work is when I run the command manually

pacmd set-card-profile alsa_card.pci-0000_00_1b.0 output:hdmi-stereo-extra2

Tried with a cron @reboot job with the same command but no go, maybe I should use sleep

Setting it in .bashrc works after I log in and open a shell

User avatar
MrEen
Level 20
Level 20
Posts: 11542
Joined: Mon Jun 12, 2017 8:39 pm

Re: PulseAudio Buggy on Mint 20

Post by MrEen »

I believe this is most likely a timing issue. If you look here:

Code: Select all

[    5.497708] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input13
[    5.497792] input: HDA Intel PCH Dock Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input14
[    5.497865] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input15
[    5.497935] input: HDA Intel PCH Dock Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input16
[    5.498005] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input17
[    5.498074] input: HDA Intel PCH HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input18
[    5.498143] input: HDA Intel PCH HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input19
You can see that the HDMI outputs are ready almost a full 10000th of a second later than the on board sound ports. :lol:

My suggestion would be to use a startup application script with a timer and that will probably work. This should do it:

Code: Select all

bash -c "sleep 4 && pacmd set-card-profile alsa_card.pci-0000_00_1b.0 output:hdmi-stereo-extra2"
I think 4 seconds should be plenty to make it work, but feel free to adjust to your liking and effectiveness.

The reason your edit to default.pa didn't work might be due to the newer PulseAudio that has had some issues affecting a variety of users. But, if you have a default.pa in ~/.config/pulse, then that's where the edit should be, as it'll take precedence of the copy in /etc/pulse

Hope that helps.

Pikmin
Level 1
Level 1
Posts: 6
Joined: Wed Jul 29, 2020 6:54 pm

Re: PulseAudio Buggy on Mint 20

Post by Pikmin »

Thanks for your help again, I will try the startup application and report back, probably on Sunday

The user config doesn't contain default.pa

Code: Select all

ls .config/pulse/
16fa2990e5014c52bbca62e8a9eb3558-card-database.tdb
16fa2990e5014c52bbca62e8a9eb3558-default-sink
16fa2990e5014c52bbca62e8a9eb3558-default-source
16fa2990e5014c52bbca62e8a9eb3558-device-volumes.tdb
16fa2990e5014c52bbca62e8a9eb3558-stream-volumes.tdb
The laptop is actually connected using a docking station > DVI to HDMI cable < TV so the lateness on the HDMI does make sense :lol:

Still not sure why the speaker test doesn't work at all, regardless of whether analogue or HDMI is selected after the purge and reinstall of pulseaudio and alsa-base. The sound works but not the test

User avatar
MrEen
Level 20
Level 20
Posts: 11542
Joined: Mon Jun 12, 2017 8:39 pm

Re: PulseAudio Buggy on Mint 20

Post by MrEen »

Pikmin wrote:
Thu Jul 30, 2020 10:48 pm
Still not sure why the speaker test doesn't work at all, regardless of whether analogue or HDMI is selected after the purge and reinstall of pulseaudio and alsa-base. The sound works but not the test
That really sounds like an issue with the newer PulseAudio. There have been a variety of issues reported, and I strongly believe it's the main culprit for what you're seeing.

An example of something I helped one user with; If they opened any sound settings app (pavucontrol, or the one that came with their DE) they lost the settings they had set, which said unavailable. I had them set the options via the command line, and everything works, until they open a sound settings app again.

The speaker test, being part of the sound settings, is doing something similar to you. It "senses" that there's nothing available to output the sound on, because that's what PulseAudio claims, so nothing happens.

If you want to try it, and there's really no harm trying as a test, downgrading the version of PulseAudio has worked for a few users (very few) and can be done with this command:

Code: Select all

apt update && apt install libpulse-mainloop-glib0=1:13.99.1-1ubuntu3.2 libpulse0=1:13.99.1-1ubuntu3.2 libpulsedsp=1:13.99.1-1ubuntu3.2 pulseaudio=1:13.99.1-1ubuntu3.2 pulseaudio-module-bluetooth=1:13.99.1-1ubuntu3.2 pulseaudio-utils=1:13.99.1-1ubuntu3.2
The newest version will show up again in the Update Manager afterwards, so you can always return to it. You'll need to reboot after running that for it to take effect.

Pikmin
Level 1
Level 1
Posts: 6
Joined: Wed Jul 29, 2020 6:54 pm

Re: PulseAudio Buggy on Mint 20

Post by Pikmin »

When I turned it on this morning it was set to HDMI
Downgrading didn't help with the speaker test, still doesn't work but it worked on the new version before the purge

The startup app seems to be doing it's job so I'll leave it at that.

Many thanks for all your help, I'll revisit the thread to check for further developments

User avatar
MrEen
Level 20
Level 20
Posts: 11542
Joined: Mon Jun 12, 2017 8:39 pm

Re: PulseAudio Buggy on Mint 20

Post by MrEen »

Check apt policy libcanberra-pulse and if it's not installed, install it. That may be necessary for the speaker test.

Pikmin
Level 1
Level 1
Posts: 6
Joined: Wed Jul 29, 2020 6:54 pm

Re: PulseAudio Buggy on Mint 20

Post by Pikmin »

Thanks mate, that's fixed now

User avatar
MrEen
Level 20
Level 20
Posts: 11542
Joined: Mon Jun 12, 2017 8:39 pm

Re: PulseAudio Buggy on Mint 20

Post by MrEen »

You're welcome. :D

Post Reply

Return to “Sound, Multimedia, & Codecs”