Linux Mint 20: PulseAudio - wrong profile

Questions about codecs, DVD playback, web plugins...
Forum rules
Before you post please read how to get help
Post Reply
User avatar
NeroR
Level 2
Level 2
Posts: 61
Joined: Fri Oct 26, 2018 4:32 pm

Linux Mint 20: PulseAudio - wrong profile

Post by NeroR »

I have the "wrong" audio profile in PulseAudio!

After a reboot I have an "analog" profile, but I want to have a "HDMI" profile:

Code: Select all

$ pacmd list-cards | grep 'active profile'
        active profile: <output:analog-stereo+input:analog-stereo>

I have tried to fix it, but this is not working for me.

Code: Select all

$ tail -5 /etc/pulse/default.pa
### 2020-06-08
### set HDMI profile
### see https://wiki.archlinux.org/index.php/PulseAudio/Examples#Set_the_default_output_sink_profile
set-card-profile alsa_card.pci-0000_00_0e.0 output:hdmi-stereo+input:analog-stereo
I can set the correct profile in pavucontrol or with pactl:

Code: Select all

$ pactl set-card-profile alsa_card.pci-0000_00_0e.0 output:hdmi-stereo+input:analog-stereo
$
$ pacmd list-cards | grep 'active profile'
        active profile: <output:hdmi-stereo+input:analog-stereo>
How can I configure PA to have the correct profile always?
Why is my change in /etc/pulse/default.pa not switching to the correct profile, like the pactl command does?
A workaround might be to run the pactl after reboot (somehow automatically), but it should be possible to do it in the PA configuration.


P.S.: $ pacmd list-cards

Code: Select all

1 card(s) available.
    index: 0
        name: <alsa_card.pci-0000_00_0e.0>
        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 0xa1410000 irq 138"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:0e.0"
                sysfs.path = "/devices/pci0000:00/0000:00:0e.0/sound/card0"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "3198"
                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: Analog Stereo Input (priority 65, available: no)
                output:analog-stereo: Analog Stereo Output (priority 6500, available: unknown)
                output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6565, available: no)
                output:analog-surround-21: Analog Surround 2.1 Output (priority 1300, available: unknown)
                output:analog-surround-21+input:analog-stereo: Analog Surround 2.1 Output + Analog Stereo Input (priority 1365, available: no)
                output:analog-surround-40: Analog Surround 4.0 Output (priority 1200, available: unknown)
                output:analog-surround-40+input:analog-stereo: Analog Surround 4.0 Output + Analog Stereo Input (priority 1265, available: no)
                output:analog-surround-41: Analog Surround 4.1 Output (priority 1300, available: unknown)
                output:analog-surround-41+input:analog-stereo: Analog Surround 4.1 Output + Analog Stereo Input (priority 1365, available: no)
                output:analog-surround-50: Analog Surround 5.0 Output (priority 1200, available: unknown)
                output:analog-surround-50+input:analog-stereo: Analog Surround 5.0 Output + Analog Stereo Input (priority 1265, available: no)
                output:analog-surround-51: Analog Surround 5.1 Output (priority 1300, available: unknown)
                output:analog-surround-51+input:analog-stereo: Analog Surround 5.1 Output + Analog Stereo Input (priority 1365, available: no)
                output:iec958-stereo: Digital Stereo (IEC958) Output (priority 5500, available: unknown)
                output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958) Output + Analog Stereo Input (priority 5565, available: no)
                output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5900, available: unknown)
                output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) Output + Analog Stereo Input (priority 5965, available: no)
                output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 800, available: unknown)
                output:hdmi-surround+input:analog-stereo: Digital Surround 5.1 (HDMI) Output + Analog Stereo Input (priority 865, available: no)
                output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 800, available: unknown)
                output:hdmi-surround71+input:analog-stereo: Digital Surround 7.1 (HDMI) Output + Analog 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 + Analog 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 + Analog 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 + Analog 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 + Analog 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 + Analog 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 + Analog 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 + Analog 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 + Analog 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 + Analog 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 + Analog 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 + Analog 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 + Analog Stereo Input (priority 665, available: no)
                off: Off (priority 0, available: unknown)
        active profile: <output:hdmi-stereo+input:analog-stereo>
        sinks:
                alsa_output.pci-0000_00_0e.0.hdmi-stereo/#6: Built-in Audio Digital Stereo (HDMI)
        sources:
                alsa_input.pci-0000_00_0e.0.analog-stereo/#3: Built-in Audio Analog Stereo
                alsa_output.pci-0000_00_0e.0.hdmi-stereo.monitor/#7: Monitor of Built-in Audio Digital Stereo (HDMI)
        ports:
                analog-input-front-mic: Front Microphone (priority 8500, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-input-microphone"
                analog-input-rear-mic: Rear Microphone (priority 8200, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-input-microphone"
                analog-input-linein: Line In (priority 8100, latency offset 0 usec, available: no)
                        properties:

                analog-output-lineout: Line Out (priority 9000, latency offset 0 usec, available: yes)
                        properties:

                analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-headphones"
                iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
                        properties:

                hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: yes)
                        properties:
                                device.icon_name = "video-display"
                                device.product.name = "DENON-AVR"
                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"
P.S. 2: I need the correct HDMI profile in Kodi to get 5.1 and not only 2.0 for IPTV (to my Denon-AVR)
Last edited by NeroR on Tue Aug 11, 2020 12:14 pm, edited 3 times in total.
User avatar
NeroR
Level 2
Level 2
Posts: 61
Joined: Fri Oct 26, 2018 4:32 pm

Re: Linux Mint 20: PulseAudio - wrong profile

Post by NeroR »

Based on thread PulseAudio Buggy on Mint 20 I found a solution, even if it's only a workaround.
I use the profile output:hdmi-stereo now (without +input:analog-stereo). So I get the correct output profile, but I don't have input (microphone).
The problem seems to be "available: no" for the output+input profile, even if the output is available and working. Maybe because of a missing input (microphone) the output+input profile is not available.

Currently I don't need input and so I can live with it for now.
User avatar
MrEen
Level 22
Level 22
Posts: 15287
Joined: Mon Jun 12, 2017 8:39 pm

Re: Linux Mint 20: PulseAudio - wrong profile

Post by MrEen »

I think it's quite possible NeroR has nailed this one on the head.

Because the input part of the profile is showing as unavailable, it's not accepting the profile at startup. As you've discovered, you can modify it afterwards, so I can only say the best workaround might be to restart pulseaudio shortly after bootup, then maybe the setting will take. A startup application with the following command line will probably work:

Code: Select all

bash -c "sleep 8 && pulseaudio -k"
When the fixed version of pulseaudio arrives, the startup application shouldn't be necessary any longer. You'll know if that has happened by looking at pacmd list-cards and the inputs no longer have available: no
User avatar
NeroR
Level 2
Level 2
Posts: 61
Joined: Fri Oct 26, 2018 4:32 pm

Re: Linux Mint 20: PulseAudio - wrong profile

Post by NeroR »

I have to correct it: My workaround (setting output profile, without input, in default.pa)is not working reliable.

I've booted (ca. two hours ago).
Now I started Kodi and I saw, the analog profile was active. (I have not checked the profile before).
Kodi uses the "Default Profile".

I get tired with Mint 20. And Ubuntu ...
User avatar
NeroR
Level 2
Level 2
Posts: 61
Joined: Fri Oct 26, 2018 4:32 pm

Re: Linux Mint 20: PulseAudio - wrong profile

Post by NeroR »

Unfortunately the situation has not changed till now, even if there have been some updated to ALSA and PulseAudio.

I still just have my workaround with set-card-profile alsa_card.pci-0000_00_0e.0 output:hdmi-stereo in /etc/pulse/default.pa but this is not working well. Sometimes I have the correct HDMI profile but sometimes I have the wrong analog profile.

I hoped, the problem would be fixed soon, but I doesn't look so.

:cry:
User avatar
MrEen
Level 22
Level 22
Posts: 15287
Joined: Mon Jun 12, 2017 8:39 pm

Re: Linux Mint 20: PulseAudio - wrong profile

Post by MrEen »

Let me see this output please:

Code: Select all

curl https://gitlab.freedesktop.org/pulseaudio/pulseaudio/raw/master/src/utils/pa-info?inline=false | bash | nc termbin.com 9999
Maybe I'll spot something amiss in your sound setup.
User avatar
NeroR
Level 2
Level 2
Posts: 61
Joined: Fri Oct 26, 2018 4:32 pm

Re: Linux Mint 20: PulseAudio - wrong profile

Post by NeroR »

MrEen wrote:
Sat Oct 17, 2020 3:27 pm
Maybe I'll spot something amiss in your sound setup.
https://termbin.com/cjfny

Maybe. 8)

P.S.: Actually the "wrong" analog profile is active.
User avatar
MrEen
Level 22
Level 22
Posts: 15287
Joined: Mon Jun 12, 2017 8:39 pm

Re: Linux Mint 20: PulseAudio - wrong profile

Post by MrEen »

Okay, there have been changes to PulseAudio that make some of what I'm reading in that output unreliable. Stuff like this:
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)
output:analog-surround-21: Analog Surround 2.1 Output (sinks: 1, sources: 0, priority: 1300, available: yes)
In the past I could say something is wrong without hesitation, but the folks that make the big decisions detemined if the active profile was set to output only, then any input profiles should show as unavailable (even though the profile is still select-able.) As this is not the proper place to trash those responsible, I'll simply try to help sort this out.

Some users have been having trouble with the realtek driver module lately causing similar issues, although not HDMI related. We can see if blacklisting that module has any impact on your issue by running this command followed by a reboot:

Code: Select all

sudo tee /etc/modprobe.d/blacklist-realtek.conf <<<'blacklist snd_hda_codec_realtek' 
A few users actually needed to shut down instead of rebooting for that to fix their issues. And a couple of users had an even worse experience after doing that, so here's how to undo it if necessary:

Code: Select all

sudo rm /etc/modprobe.d/blacklist-realtek.conf
I'm hoping that the above blacklist command combined with your edit to /etc/pulse/default.pa, we might get a better outcome.

Good luck!
User avatar
MrEen
Level 22
Level 22
Posts: 15287
Joined: Mon Jun 12, 2017 8:39 pm

Re: Linux Mint 20: PulseAudio - wrong profile

Post by MrEen »

And I may have found the source of the issue:

Code: Select all

numid=38,iface=CARD,name='Line Out Front Jack'
  ; type=BOOLEAN,access=r-------,values=1
  : values=on
The system thinks something is plugged into the Line Out port. I'd like to verify this before trying to do anything about this. Install alsa-tools so you can run this command:

Code: Select all

sudo hdajacksensetest -a
User avatar
NeroR
Level 2
Level 2
Posts: 61
Joined: Fri Oct 26, 2018 4:32 pm

Re: Linux Mint 20: PulseAudio - wrong profile

Post by NeroR »

MrEen wrote:
Sat Oct 17, 2020 9:27 pm
The system thinks something is plugged into the Line Out port.
OMG! :roll:
I had plugged in a jack in the line out (front), on the back panel!
I did this long time ago when I used also analog output (also as simultaneous output, for zone 2 of my AVR). I didn't remember and I didn't recognize it, since my PC is in a shelf.

Now I've unplugged the jack (since I don't use it by now) and it is "off" now:

Code: Select all

numid=38,iface=CARD,name='Line Out Front Jack'
  ; type=BOOLEAN,access=r-------,values=1
  : values=off

Currently, after booting without line out jack, I have the HDMI-Stereo profile active.
I guess, this will solve my problem. Hopefully!
I think I can also eliminate setting the profile in /etc/pulse/default.pa. I'll try it later.


However, before upgrading to Linux Mint 20 it worked fine, also with plugged-in jack. A HDMI profile was always active.
Basically this is also be my expected behavior: It should be possible to use digital output by default – at least when setting the profile manually, even with plugged in analog jack, like it was before. Digital outputs should be preferred (as I think this is the algorithm of ALSA/PulseAudio, don't knowing why it was not working well for me).


May thanks, MrHero!
:D
User avatar
MrEen
Level 22
Level 22
Posts: 15287
Joined: Mon Jun 12, 2017 8:39 pm

Re: Linux Mint 20: PulseAudio - wrong profile

Post by MrEen »

I really hope this has solved the issue!

What may have been happening is the HDMI audio took longer to "set up" so pulseaudio defaulted to the available built-in audio. I can't say for sure we've actually accomplished anything to negate that from happening. But at least it not having an available port to output on should increase the chance it won't default to it now.

There were a lot of changes in the entire sound stack between 19.3 and 20, and many things have been somewhat quirky since. Keep us informed if your ourput remains stable please.

Good luck. :D
Post Reply

Return to “Sound, Multimedia, & Codecs”