How to force analog output and disable s/pdif?

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

Re: How to force analog output and disable s/pdif?

Post by MrEen »

When it craps out, does pulseaudio -k get it working again? I'm struggling to find the cause, and some recent changes to PulseAudio make it more difficult to trust what I see in some parts of those outputs. An example; The non working had this:

Code: Select all

	Profiles:
		input:analog-stereo: Analog Stereo Input (sinks: 0, sources: 1, priority: 65, available: yes)
		output:analog-stereo: Analog Stereo Output (sinks: 1, sources: 0, priority: 6500, available: no)
		output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (sinks: 1, sources: 1, priority: 6565, available: no)
		output:iec958-stereo: Digital Stereo (IEC958) Output (sinks: 1, sources: 0, priority: 5500, available: yes)
		output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5565, available: yes)
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
While the working had this:

Code: Select all

	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:iec958-stereo: Digital Stereo (IEC958) Output (sinks: 1, sources: 0, priority: 5500, available: yes)
		output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5565, available: no)
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
See how the first two have flipped yes versus no? In the past, that indicated an issue that could be fixable, but now the Analog Stereo Input showing no might simply be because the Profile was set to output only. That's something that happened regardless of your requesting it to be set for output and input in default.pa.

Running pulseaudio -k restarts the sound daemon, so it might then pick up the output+input setting properly. And that applies for both your working and non working outputs.

This certainly appears to be a pulseaudio issue only, but trying to find the magic formula for your case is puzzling.
Bronze Globe
Level 3
Level 3
Posts: 112
Joined: Wed Dec 14, 2016 1:27 am

Re: How to force analog output and disable s/pdif?

Post by Bronze Globe »

Not exactly. Doing pulseaudio -k had it going again for a moment, heard a bit. Bugged out yet again, and I've tried that command again after, but even though it's showing that it is on the analog in the sound settings panel, I don't hear anything when I hit the speaker test. :?
User avatar
MrEen
Level 22
Level 22
Posts: 15289
Joined: Mon Jun 12, 2017 8:39 pm

Re: How to force analog output and disable s/pdif?

Post by MrEen »

Delete the files in /home/YourUserName/.config/pulse then run pulseaudio -k again. Maybe it's the config files getting messed up causing this.
Bronze Globe
Level 3
Level 3
Posts: 112
Joined: Wed Dec 14, 2016 1:27 am

Re: How to force analog output and disable s/pdif?

Post by Bronze Globe »

Another thing I didn't try before posting, I just hit play on a youtube video, and I hear that. This despite the volume adjustment sound not playing when I adjust volume, the speaker test not testing the speakers, and no dice rolling, etc. sounds in gnu backgammon. :?

Trashed those file suggested, and ran the command again, and that oddity is still present. Well, maybe at least I can watch videos with sound?

Additionally, before posting, I've tried closing and reopening backgammon, and it has sound now. I've tried running that command again, to see if that just loses its sound connection and doesn't get it back somehow, but it still has sound after restarting it, killing pulse, and rolling the dice or moving. So I don't get why it lost sound and wouldn't get it back a short time ago. I also don't get the lack of sound from the volume adjustment, and speaker test.

I guess not understanding what the heck is going on is my current status. Thank you for your patience with it.
User avatar
MrEen
Level 22
Level 22
Posts: 15289
Joined: Mon Jun 12, 2017 8:39 pm

Re: How to force analog output and disable s/pdif?

Post by MrEen »

The volume adjustment and test volumes might be part of the system sounds volume control on the Playback tab of pavucontrol.

Let's also check one more output:

Code: Select all

sudo fuser -v /dev/snd/*
All lines returned should have your username and pulseaudio on them (I don't need to see them) but if there's a line that has something else, that might be interfering.
Bronze Globe
Level 3
Level 3
Posts: 112
Joined: Wed Dec 14, 2016 1:27 am

Re: How to force analog output and disable s/pdif?

Post by Bronze Globe »

There doesn't appear to be a conflicting line, then.

There's one, either side of my username there is /dev/snd/controlC0: my username, and then 104362 F.... pulseaudio.
User avatar
MrEen
Level 22
Level 22
Posts: 15289
Joined: Mon Jun 12, 2017 8:39 pm

Re: How to force analog output and disable s/pdif?

Post by MrEen »

Bronze Globe wrote:
Sun Oct 11, 2020 3:30 pm
There doesn't appear to be a conflicting line, then.

There's one, either side of my username there is /dev/snd/controlC0: my username, and then 104362 F.... pulseaudio.
Yeah, that's how it should be. The next time the sound craps out, immeditely run that command again. Maybe something like speech-dispatcher is launching and hogging the sound card. You'll see speech-dispatcher (or some other app) in place of either your username or pulseaudio or both, I can't remember.
Bronze Globe
Level 3
Level 3
Posts: 112
Joined: Wed Dec 14, 2016 1:27 am

Re: How to force analog output and disable s/pdif?

Post by Bronze Globe »

It's flaked out again for a bit, and while it was, I've tried pulseaudio -k to no joy. Then did sudo fuser -v /dev/snd/*, and here's the output.

Code: Select all

sudo fuser -v /dev/snd/*
[sudo] password for myusername:             
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  myusername    107489 F.... pulseaudio
/dev/snd/pcmC0D0c:   myusername    107489 F...m pulseaudio
/dev/snd/pcmC0D0p:   myusername    107489 F...m pulseaudio
But the /dev/snd/pcmC0D0p: myusername 107940 F...m pulseaudio line has also shown while the audio in a youtube video was successfully playing.
User avatar
MrEen
Level 22
Level 22
Posts: 15289
Joined: Mon Jun 12, 2017 8:39 pm

Re: How to force analog output and disable s/pdif?

Post by MrEen »

Maybe this is audio priority related (though I doubt it) so try what I've posted in this post: viewtopic.php?p=1752180#p1752180

While it might not help, it will not hurt to make that change.
Bronze Globe
Level 3
Level 3
Posts: 112
Joined: Wed Dec 14, 2016 1:27 am

Re: How to force analog output and disable s/pdif?

Post by Bronze Globe »

I have tried the suggestion from that thread. It doesn't seem to have hurt, but also doesn't seem to have helped. Sound still drops out.

I would prefer the analog to be the only thing the system will ever use and never switch from, instead of merely high priority, anyway. S/PDIF isn't even a last resort.
User avatar
MrEen
Level 22
Level 22
Posts: 15289
Joined: Mon Jun 12, 2017 8:39 pm

Re: How to force analog output and disable s/pdif?

Post by MrEen »

I hear ya! This is a detection issue causing this.

One thing I didn't spot after scanning through the thread again is this; Is Windows also on this machine? If so, boot to Windows and verify the sound is working properly there, then shut down fully, don't reboot. Wait a moment before booting up into Mint and see if the issue stays away doing that. And if the Windows is Windows 10, also ensure Fast Startup is off.

Windows is known to sometimes cause issue like this. And even the reverse is also possible.

As I've edited out the links from previous posts, could you PM me a fresh output of this again, just to make sure I'm not missing something obvious:

Code: Select all

curl https://gitlab.freedesktop.org/pulseaudio/pulseaudio/raw/master/src/utils/pa-info?inline=false | bash | nc termbin.com 9999
I think in your case I also need this one:

Code: Select all

wget http://www.alsa-project.org/alsa-info.sh -O alsa-info.sh && bash alsa-info.sh
Bronze Globe
Level 3
Level 3
Posts: 112
Joined: Wed Dec 14, 2016 1:27 am

Re: How to force analog output and disable s/pdif?

Post by Bronze Globe »

I think it has an old install of Vista on it, that I didn't delete, but haven't booted into for years. If it can still boot into it I'll try that, on an upcoming reboot.

Other things PMed.
User avatar
MrEen
Level 22
Level 22
Posts: 15289
Joined: Mon Jun 12, 2017 8:39 pm

Re: How to force analog output and disable s/pdif?

Post by MrEen »

Having not booted to it in ages means you don't even need to try it now. That issue would have resolved itself by now, so don't bother. I'll look through the new outputs shortly.
User avatar
MrEen
Level 22
Level 22
Posts: 15289
Joined: Mon Jun 12, 2017 8:39 pm

Re: How to force analog output and disable s/pdif?

Post by MrEen »

I wonder if we disable the S/PDIF port if it might stop this from happening.

To do that, install alsa-tools-gui and run HDAJackRetask and make sure ALC883 is selected in the upper left for Select a Codec.

Then check the Override box for pin 0x1e and change it to Not connected, then click on Install boot override. Reboot after that and run it through it's paces.

I should add, this is not something I've tried to help anyone do before. Therefore, I don't know what the consequences might be. It won't be anything unfixable, but just wanted to mention that. I suspect you might have 0 sound cards available in certain scenarios.
Bronze Globe
Level 3
Level 3
Posts: 112
Joined: Wed Dec 14, 2016 1:27 am

Re: How to force analog output and disable s/pdif?

Post by Bronze Globe »

Well, it isn't worse now. The sound settings box shows Dummy Output instead of S/PDIF when it drops out.

In HDAJackRetask, which of the pins would be my speaker output, is it Green Headphone, Front side / Pin ID:0x1b?

I notice with the Advanced override option checked, a couple of options I'd like an opinion on, instead of just setting them and hoping it isn't worse.

Would setting 0x1b's jack detection to Present, force it to stay on?

Would setting 0x1e's Jack detection to Not present force it to stay off?

Could either of these lead to Bad Things?
User avatar
MrEen
Level 22
Level 22
Posts: 15289
Joined: Mon Jun 12, 2017 8:39 pm

Re: How to force analog output and disable s/pdif?

Post by MrEen »

Okay, what's happening here is that the card isn't getting detected properly when the issue creeps in. In only see audio IN and S/PDIF as available, but not audio out.

The change you last made in HDAJackRetask setting the Digital pin to Not connected is why you're now getting Dummy Output instead of the Digital profile. You might as well click on Remove boot override.

0x1b's Jack detection SHOULD be listed as present already! Although if you're using this during the Dummy Output period, that may have changed it?

I don't know about the other pin, but I'd say give it a shot!

And all that means is the system is supposed to detect a plug event when it happens. Turning it off can be useful in cases where where ports are not reporting the plug events properly, then using the command line or default.pa to assign the port in use. It does not mean the system should think something is plugged in always.

I'm somewhat hoping that jack detection on 0x1b might be the key here.

Just to make sure there's no confusion here, first run Remove boot override, then reboot. Then change 0x1b's jack detection to present and click on Install boot override, then reboot and start testing. Changing 0x1e is up to you. I suspect it won't really make a difference.

Good luck!
Bronze Globe
Level 3
Level 3
Posts: 112
Joined: Wed Dec 14, 2016 1:27 am

Re: How to force analog output and disable s/pdif?

Post by Bronze Globe »

Thanks, I'll give it a go!
Bronze Globe
Level 3
Level 3
Posts: 112
Joined: Wed Dec 14, 2016 1:27 am

Re: How to force analog output and disable s/pdif?

Post by Bronze Globe »

It hasn't been noticeably better. I still hope someone will come to the thread with a silver bullet to shoot this trouble, but probably not.
User avatar
MrEen
Level 22
Level 22
Posts: 15289
Joined: Mon Jun 12, 2017 8:39 pm

Re: How to force analog output and disable s/pdif?

Post by MrEen »

I wonder if an older kernel might work better on your system. Was this an upgrade or a fresh install. If an upgrade, you might still have a 4.15 kernel installed on the system. You could use the Advanced options of the grub menu to boot to a 4.15 kernel and see if the issue disappears.
Bronze Globe
Level 3
Level 3
Posts: 112
Joined: Wed Dec 14, 2016 1:27 am

Re: How to force analog output and disable s/pdif?

Post by Bronze Globe »

Checking the kernels I have, from the update manager, it looks like I have three on here, 5.8, 5.4, and 5.0. I'm currently set to a 5.4 kernel. It was an upgrade from 19 to 20, but I may have since removed older kernels that were listed as unsupported, once things seemed reasonably stable overall. Frankly I'm surprised I even left 5.0 in there, since it is listed as unsupported.

Edit to add: 5.8 appears to be available to install, but may not actually be installed yet.

Addendum 2: In place of going back, to an older supported kernel, I'm pushing forward to 5.8, and see if that's any more stable with regard to audio. Maybe I'll luck out?
Post Reply

Return to “Sound, Multimedia, & Codecs”