[Solved] Sound only working when sound settings are open

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
narf

[Solved] Sound only working when sound settings are open

Post by narf »

I have an odd problem with my sound.
I have a DAC connected via USB and I get no sound in Linux Mint 19. So naturally I checked the sound settings. As soon as I open them the sound starts playing. When I close them the sound continues to play for roughly 5 seconds and then its gone again. If I open the settings again the sound is there.

So my problem is that the sound is only working when the sound settings are open.

How can I fix this?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
MrEen
Level 23
Level 23
Posts: 18345
Joined: Mon Jun 12, 2017 8:39 pm

Re: [Mint 19] Sound only working when sound settings are open

Post by MrEen »

Hi narf, and welcome to the forum.

I don't think I've ever read of anyone having that same issue. My suggestion would be to install and run PulseAudio Volume Control (pavucontrol) and when it opens, check that the DAC is there on the Configuration tab with the settings you'd prefer. If there's still a problem, on the Output Devices tab, uncheck the checkmarks for the other devices and I'm hoping you'll be fixed.

Good luck.
narf

Re: [Mint 19] Sound only working when sound settings are open

Post by narf »

Thank you for your reply :)

With PulseAudio Volume Control (pavucontrol) I get the same problem.
So I open pavucontrol and the sound is there. I also disabled all the other outputs and the sound is still playing.
As soon as I close pavucontrol after about 5s the sound stops again.

I'm not 100% sure but I think I also tried out Ubuntu 16.04 a while back and had the same error.
This is quite annoying since it is the only thing stopping me from using Mint instead of Windows.

Are there any other diagnostics I can run to further investigate the problem?
User avatar
MrEen
Level 23
Level 23
Posts: 18345
Joined: Mon Jun 12, 2017 8:39 pm

Re: [Mint 19] Sound only working when sound settings are open

Post by MrEen »

I still can't even think of what to check for such a situation.

Try removing the files in ~/.config/pulse and running pulseaudio -k in the terminal. Wait a few seconds then test.

Hope that helps.
narf

Re: [Mint 19] Sound only working when sound settings are open

Post by narf »

I did that but no change.

So I noticed something new about the problem.
When I open the sound settings the sound starts playing...so far so good.
Now if I switch the device in the sound settings the audio disappears again. No matter which device I select afterwards it won't come back.
Then I opened pavucontrol and saw that my graphics card was selected as HDMI audio output. I switched to my USB DAC and the audio came back (as long as pavucontrol was open, after closing it stopped after 5s). Then I again disabled all other devices.

Since I wanted to investigate more I tried this process another time. So again sound settings and the sound is there, selected a different device and back to my USB DAC afterwards -> sound gone. Then I opened pavucontrol and it switched back to HDMI and also enabled my standard audio from the mainboard again. But now my USB DAC was gone completely. And this time I could only get it back via a restart.
User avatar
MrEen
Level 23
Level 23
Posts: 18345
Joined: Mon Jun 12, 2017 8:39 pm

Re: [Mint 19] Sound only working when sound settings are open

Post by MrEen »

This is a strange issue indeed and I have two thoughts on what I would try to resolve this, one of which I can help with immediately.

If you use the DAC exclusively for sound, we can set it as the default sink and this may clear the issue. To do this, run pactl list sinks short in the terminal. The output that produces will give you a column of numbers followed by a column of names followed by other junk. Copy the NAME field for your DAC, i.e. the second field, then open ~/.config/pulse/default.pa in a text editor, scroll to the bottom of the file, and change this line:

Code: Select all

#set-default-sink output
to this:

Code: Select all

set-default-sink paste-here-the-name-you-copied
Save the file, reboot and test.

If ~/.config/pulse/default.pa doesn't exist you can create it with copy /etc/pulse/default.pa ~/.config/pulse or you could choose to edit /etc/pulse/default.pa instead.

The other thing I was thinking of is a USB power management/autosuspend issue. If nothing changes using what I wrote above, then that would be my next guess.
narf

Re: [Mint 19] Sound only working when sound settings are open

Post by narf »

Thank you very much for your help so far.

So I uncommented the set-default-sink part and replaced default by what I got:

Code: Select all

set-default-sink alsa_output.usb-FiiO_DigiHug_USB_Audio-01.iec958-stereo
Then I restarted and now the DAC is the default output in PulseAudio control and the others are disabled.
But the problem is still there. Settings open -> audio, settings closed -> no audio after 3-5s.
User avatar
MrEen
Level 23
Level 23
Posts: 18345
Joined: Mon Jun 12, 2017 8:39 pm

Re: [Mint 19] Sound only working when sound settings are open

Post by MrEen »

Okay. It would appear to me to be an autosuspend issue then. I'll have to do a little research before I can offer anything, but someone else may chime in.
User avatar
MrEen
Level 23
Level 23
Posts: 18345
Joined: Mon Jun 12, 2017 8:39 pm

Re: [Mint 19] Sound only working when sound settings are open

Post by MrEen »

From an archwiki:

Code: Select all

Alternatively, to blacklist devices that are not working with USB autosuspend and enable it for all other devices:

/etc/udev/rules.d/50-usb_power_save.rules

# blacklist for usb autosuspend
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", ATTR{idProduct}=="9205", GOTO="power_usb_rules_end"

ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="auto"
LABEL="power_usb_rules_end"
You'd need to change 05c6 and 9205 to the id's you get from running lsusb in the terminal and finding your DAC.

I'm not experienced at all in this regard, so here is the page that I found that info: https://wiki.archlinux.org/index.php/Po ... utosuspend
narf

Re: [Mint 19] Sound only working when sound settings are open

Post by narf »

So I did that and when starting up I heard the startup sound for the first time.
Then I opened a video but still no sound.
I experimented a bit with different USB ports and I found something odd.
When I put it in a different port the sound starts working again.
But even when I then plug it back into the original port the sound still works (given the OS is running and I put it in the other one before).

So looks like its a problem with USB after all. It just has a rather weird way of showing up with the sound settings and all.
Now with the DAC plugged into the other port I have working audio. Still odd since the first thing I tried before posting was checking different ports.

Thank you for your help :)
User avatar
MrEen
Level 23
Level 23
Posts: 18345
Joined: Mon Jun 12, 2017 8:39 pm

Re: [Mint 19] Sound only working when sound settings are open

Post by MrEen »

Happy to help. Like I said, it was a strange one.
peavers

Re: [Solved] Sound only working when sound settings are open

Post by peavers »

Just posting here that I have the exact same issue when attempting to use a MOTU 624 audio interface in Ubuntu 20.04
User avatar
MrEen
Level 23
Level 23
Posts: 18345
Joined: Mon Jun 12, 2017 8:39 pm

Re: [Solved] Sound only working when sound settings are open

Post by MrEen »

Hi peavers,

Did you try the same thing in my post a few above yours? Looks to me like that should still be valid syntax and location for Ubuntu 20.04 at first glance.
Locked

Return to “Sound”