Pulse Audio - editing default.pa file to save settings on reboot

Am running Endeavour KDE and want to edit the etc/pulse/default.pa file to # out the relevant fields so that when I reboot the machine it saves the last used settings. It seems to already save the settings for config but not output, as it defaults to Line out and I want it to use headphones. Apologies if this has been asked before. I have succeeded in doing this in the past with various distros and DEs, following the Arch guide, but it doesn’t seem to always be the same each time. TIA!

You can edit this file using any file editor, e.g. sudo nano /etc/pulse/default.pa .

Sorry I should have been clearer. I am comfortable editing the default.pa file and saving it as administrator, I just want to clarify what fields I need to hash out.

I suspect you want to edit client.conf,

Alternatively, if you use something like pavucontrol in usermode you can set the default device and the setting will “stick” between boots.

Thanks. I’m still totally lost here :frowning: I opened the client.conf file but I couldn’t see a line for default device, only sink and I’d have to figure out what to put after the equals sign. I installed pavucontrol using pacman but I can’t seem to start it, when I try to start it from terminal, nothing happens. When I try searching for the app name in the program menu, all it comes up with are entries for Pulse Audio and a line for ‘run Pavucontrol’ but if I click on the latter, nothing happens. Is Pulse Audio Volume Control the same as Pavucontrol? I already had PA VC installed and running but when I installed pavucontrol in pacman, it did not show that I was reinstalling it but installing it for the first time. I can edit the settings in Pulse Audio Vol Control but like I said above, the output setting doesn’t stick when I reboot. It just seems really counter intuitive for Pulse Audio to behave in this manner.

What are you trying to change or set it to. I see people have these issues on audio and i never have had them on different desktops or different hardware. I’m trying to understand what the issue is.

To get Pulse Audio Volume Control to work through my speakers, I needed to change the settings to:

Output

  • Port: ‘Headphones (unplugged)’

Configuration

  • Ellesmere HDMI Audio (Radeon RX570) - Profile - Off

  • Built In Audio - Profile: Analog Stereo Output

When I reboot the machine, The Configuration settings are saved but the Output Port setting is not saved but defaults back to ‘Line Out (plugged in)’. Therefore when I boot up, to have any sound, I have to open up Pulse Audio Volume Control every time and change Output Port to ‘Headphones (unplugged)’. I have trying to edit Pulse Audio or trying to find some other method so it doesn’t keep resetting the Output Port.

Mine says line out all the time. What are your speakers plugged into? My configuration is shown also. Are speakers plugged in to the proper port? Just asking?

Screenshot_20210505_215311

Screenshot_20210505_215803

Edit: I wonder if you try commenting out the last line in the default.pa here:

### Automatically restore the default sink/source when changed by the user
### during runtime
### NOTE: This should be loaded as early as possible so that subsequent modules
### that look up the default sink/source get the right value
load-module module-default-device-restore
1 Like

Pavucontrol IS the volume control. It can usually do all that is needed - including keeping output settings through reboots. I use HDMI output myself (because I use KVM switch, and want sound to switch with monitor (etc) in use and it works fine.

What might fool you is that the settings are on the FAR right in my setup, and not visible without scrolling/panning over there to find them! I used that to turn off everything except the HDMI output…

Hi Rick, thanks for the screenshots. I have the analogue cable for the 2 speakers plugged into the Line Out port on the motherboard, p.21 & 22, L/O is labelled ‘n’. It is recognised as headphones on the 3 OSes I use from memory, never have an issue setting it up except in Linux.

‘The line out jack. Use this audio jack for a headphone or 2-channel speaker. This jack can be used to connect front speakers in a 4/5.1/7.1-channel audio configuration.’

Thanks for your suggestion, that is usually the first thing I try when trying to fix it in Linux in general, although with Endeavour this time around I commented out one other line which might have caused a problem so I’ll try just that line on it’s own.

I have avoided this issue in the past by choosing HDMI in Pavucontrol and plugging in my speaker cable into the headphone jack on the display but it seems that it’s an extra set of cabling that is unlikely to do the sound any favours.

Thanks for the post. Are you talking about Pavucontrol window or are you talking about the Audio sections in the Systems Settings window? Thanks.

I’m not sure why you are using line out n. I would be using k which is for speakers and hooking the headphones up to another jack. A lot of these jacks have sensing and automatically switch when you plug in to another port. I would try it differently.

Thanks. I don’t use headphones, just speakers (Edifier). I tried hooking up the speakers to ‘k’ (Rear Speaker Out) and when I booted up Endeavour, PA defaulted to SPDIF out lol, not sure why, and it didn’t detect the changed settings on the next reboot, so I gave up and decided to plug the speakers into the monitor and chose HDMI4 and off in the config and it works fine on reboot now. The HDMI cable is pretty decent anyway and the speaker cable wasn’t long enough to have the left speaker on the left etc. so I had them the wrong way around before plugged straight into the motherboard, so at least now I have the reach to have them the right way around. I might play around with some of the other jacks later to see if I can get it to work directly to the motherboard.

I was talking about the pavucontrol window (that you can also access from the speaker icon on the panel) - and on my setup the palce to turn outputs OFF was hidden on the far right.

BTW - I also use Edifier speakers on HDMI, which is why I wanted to kill off the line out defaults…

1 Like

Yes i have seen this a lot too where it defaults to this. Honestly I’ve never had any audio issues on any of my hardware on different desktops and distro’s but lots of people have and do. Audio is difficult to figure out . There are lots of things to contend with and now with pipewire in the mix i just hope i don’t have any of these issues. I don’t use anything other than speakers where as other people have headphones and bluetooth stuff in the mix and sound bars etc. I do run an audio out to my stereo and play it when using the output to the tv sometimes and i don’t have any issues.

1 Like

You mean this Window?

Screenshot_20210506_204119

yes that’s the one, always showed line out as plugged in and headphones as the other option as not plugged in. When I had it in the other jack like you suggested SPDIF was only option in Port. Cheers.

This would explain why it

Does this:

mean you have extension cables connected to the output jacks that in turn aren’t connected to speakers? Again, this will confuse the detection mechanisms because you have something connected to a jack that’s not connected to a speaker, that is, the audio subsystem is detecting that you have something electrically connected and is trying to use it as an output, but it has no way of knowing that you don’t have a speaker connected.

For example laptops will automatically mute internal speakers when you plug in a set of headphones. If you leave an extension cable connected to the headphone jack then the internal speakers will be muted, no matter whether or not you have headphones connected to the other end of the extension cable.

1 Like

Hi Jonathon, I have one pair of RCA cables from the left Edifier speaker going into an Audioquest female RCA to male 3.5mm jack which currently plugs into the phones jack on my display. I don’t have extensions, but having the headphone jack for the display central on my desk rather than having the pc case at the side means I hae the length to have the speakers the right way around. Using sound over HDMI, I can use keyboard volume buttons in Linux but not in OS X which is annoying. If I use the original Edifier cable auto-detect from PA might work.

OK, so the issue seems to come down to HDMI. It’s pretty normal for HDMI outputs to disappear when a display is powered off (or even goes into standby), so it might be an idea to connect your speakers to a standard audio jack instead.