Pulseaudio default output problem

System is mid-2011 Mac Mini (2.3). Intel HD Graphics 3000 processor with 288MB of DDR3 SDRAM shared with main memory, HDMI port supports multichannel audio output.

My issue involves having Pulseaudio use HDMI as persistent default output, rather than the internal speaker. I am able to set with pavucontrol but it reverts to the internal speaker after reboot. I added the following to default.pa but it hasn’t resolved issue:

 	fuscop@Vinyl:~> tail -4 /etc/pulse/default.pa
### Make some devices default
#set-default-sink output
#set-default-source input
set-default-sink alsa_output.pci-0000_00_1b.0.hdmi-surround-extra2 digital-output-speaker

I’m sure they’re is something more needed but I have been unable to determine what that might be. Lots of information out there.

To get a better handle on this, please run

pactl info
pactl list sinks

and report back with the output.

pactl info
https://pastebin.com/MAKUX0hi

pactl list sinks
https://pastebin.com/xause5Aw

1 Like

Ok, that confirms default sink as desired at least…

Default Sink: alsa_output.pci-0000_00_1b.0.hdmi-surround-extra2

I also note the state is reported as “SUSPENDED”. That might be expected if no stream present I guess…?


Sink #8 
        State: SUSPENDED 
        Name: alsa_output.pci-0000_00_1b.0.hdmi-surround-extra2 
        Description: Built-in Audio Digital Surround 5.1 (HDMI 3)

If you switch away to analog and back to HDMI again (via pavucontrol) does it work as expected?

I also note the state is reported as “SUSPENDED”. That might be expected if no stream present I guess…?

Sink #8
State: SUSPENDED
Name: alsa_output.pci-0000_00_1b.0.hdmi-surround-extra2
Description: Built-in Audio Digital Surround 5.1 (HDMI 3)

 

Yes, here is a snippet from pactl list sinks with active audio stream:

fuscop@Vinyl:~> pactl list sinks
Sink #0
        State: RUNNING
        Name: alsa_output.pci-0000_00_1b.0.hdmi-surround-extra2
        Description: Built-in Audio Digital Surround 5.1 (HDMI 3)
        Driver: module-alsa-card.c

If you switch away to analog and back to HDMI again (via pavucontrol) does it work as expected?

[/QUOTE]
Yes, it does. The problem I’ve observed is that the setting added to default.pa is not persistent after reboot or shutdown.

The problem I’ve observed is that the setting added to default.pa is not persistent after reboot or shutdown.

Just tested with logoff/login three times and observed no change to output. It also resumes from sleep with no change to output. So problem after reboot or shutdown.
Reboot or shutdown is also where I experience an HDMI related video issue that I’m currently addressing through a separate thread in the Install/Boot/Login section.

Good to know, as well as the deliberate switching with pavucontrol.

The problem I’ve observed is that the setting added to default.pa is not persistent after reboot or shutdown.

Right. Perhaps try removing the existing user PA config…

rm -rf ~/.config/pulse

and restart with

pulseaudio -k

It should immediately respawn (as per default system-wide PA settings). Does the default sink now remain? Persistent after reboot? If not, a bug report may be required.

I’m sure that this HDMI audio sink issue will be related to this somehow.

I’d actually tried this previously but gave it another try. Prior to running it I checked and the current setting was Analog Stereo Output which was where I left it earlier. I figured this would be an even better test to see if the default setting was used. I ran the commands and it changed to Analog Stereo Output + Digital Stereo (IEC958) Input. I’ve seen that before as well.

Brings to mind something I wondered about in regard to the default.pa change I made. Do I need to add a second entry for a default source? Could that be causing confusion?

### Make some devices default
#set-default-sink output
#set-default-source input
set-default-sink alsa_output.pci-0000_00_1b.0.hdmi-surround-extra2 digital-output-speaker

And one more question. Most examples I found online used the same form “set-default-sink output” as shown in the example. I added “digital-output-speaker” after seeing similar in some posts on this forum. I wasn’t sure if I needed to do that or not.

No, that should not matter…they’re different things.

### Make some devices default
#set-default-sink output
#set-default-source input
set-default-sink alsa_output.pci-0000_00_1b.0.hdmi-surround-extra2 digital-output-speaker

And one more question. Most examples I found online used the same form “set-default-sink output” as shown in the example. I added “digital-output-speaker” after seeing similar in some posts on this forum. I wasn’t sure if I needed to do that or not.

I don’t think that is needed, but not sure if it could cause an issue either. Some info with example here…
https://wiki.archlinux.org/index.php/PulseAudio/Examples#Set_the_default_output_sink

I believe that may well be true. I’ve raised a question with the person helping me on that thread regarding the current video driver I see installed. It is the generic vesa driver rather than the Intel one. Don’t want to add confusion to this thread but figured I’d mention that.

The thread follows in case you want to consult/review it.

https://forums.opensuse.org/showthread.php/543178-Mid-2011-Mac-Mini-(single-OS)

Which Desktop GUI are you using?

  • If KDE Plasma then, you’ll need to check the Audio settings in the KDE System Configuration …

[HR][/HR]I’ve had an issue with Leap 15.2 running on an AMD Ryzen 5 with an integrated GPU system and Audio via the HDMI cable to the monitor – only two cables to the monitor: HDMI and power …

  • Setting the default sound to the HDMI channel via KDE resolved the issue.
  • YaST doesn’t result in any sound being sent to the monitor’s speakers – only KDE Plasma – curious but that’s the way it is …

Strange…AFAIU the KDE audio settings are just a front-end for controlling PulseAudio, similar to the pactl command and pavucontrol GUI. But perhaps it is having some effect when the user first logged on (following a reboot). I can understand why YaST doesn’t reflect reality, as it is responsible for system-wide settings, and user preferences will override these of course, (including any made by KDE Audio KCM).

FWIW, an interesting blog on the subject…

I’m actually going to be using this Mac Mini for another purpose where HDMI audio won’t be involved.

But to answer your question, it is KDE. I’ve been through the KDE Settings and that didn’t stick either. What I finally ended up doing which seemed effective was creating the following Autostart custom entry:
Command: pulseaudio -k

Something interesting I did discover was if I changed resolution from say, 1280x720 to 1920x1080 to watch a video stream the audio output would revert to Analog using the internal speaker in the Mac Mini.
I don’t know whether that’s an actual bug or attributable to my particular configuration. Given other issues I encountered I would lean toward the age of the Mac Mini being the more likely culprit.

Take a close look at the KDE System Settings related to Audio – in the “Advanced” tab – there’s a setting to automatically change all the Audio streams to a new device as soon as it becomes available.

  • There’s also an option to use a Virtual device to send the Audio streams simultaneously to all the local Sound Cards …