Please help me fix my broken audio devices

I posted this earlier on the Small Linux Problem Thread, but I think this is more then a small issue so I’m starting a new thread.

TL;DR: Headphone/Speaker Plug of the ALC1220 disappeared during Fedora Release Upgrade. Would like it back, preferably as a separate audio device. Also Microphone has horrible noise I can’t fix.


Before I start, my current Audio “Setup”:
Gigabyte X470 Gaming 7 Onboard Sound (ALC1220)
Logitech G430 USB Dongle (that I’d prefer not having to use since the cable is dodgy)
10$ PC-Speakers
Headphone + Mic
Bookshelf-Speakers on the TV (connected via S/PDIF from the TV to speakers)

So the audio situation has been getting worse for me with each Fedora release upgrade…

When I installed the system (Fedora 29 IIRC) I had 1 analogue audio device (ALC1220) with 2 “plugs” (“Line Out” and “Headphone/Speaker”). The Headphone/Speaker was always showing as “unplugged” in KDE’s sound control, but I could still use it when I selected the plug in the sound settings. I then had to “default” the analogue device for applications to pick it up.
I had to do that after each reboot, which I could live with. Wasn’t cool, but it worked. I thought of it as a compromise for ditching Windows.

After the Upgrade to 31 that situation got worse in that I had to “default” that audio device each time any audio stream started. When I paused a video for a few seconds and resumed, I had to “default” it again to pick up the audio. That is to say, I hit play, popped up the audio controls below, hit the “Default Device” button. Every. Damn. Time. Since 32 was more or less around the corner I didn’t mess with it and just endured.

I thought that might go away with 32… and it did… in a way. Because now only Line Out is available, but no Headphone/Speaker-Plug anymore…
image

That context menu previously had the selection between the 2 plugs, but not anymore…

Can anyone help me finally fix that audio device setup? Audio was somehow always the biggest pain for me whenever I tried Linux, but the situation when I installed the system was the least terrible I had seen so far so I didn’t mess with it… I’m not sure if Audio is really that complicated on Linux or if I’m doing something wrong. I never messed with any of the PulseAudio configs myself though, I left it all on default as it came after install/upgrade.

Here’s what I’d like to have in an ideal world:

  • 2 analogue outs
    • 1 for the headphone
    • 1 for the 10$ speakers
    • currently I’m using a Y-Cable to connect both, but that’s not ideal really
  • 1 digital out for the bookshelf speakers (they have 2 digital in)
  • 1 audio via HDMI out (this works sort of, but I have to select the HDMI plug manually in the sound settings after each reboot, which is not a big deal though)
  • 1 Mic in

If possible I’d like to drop the G430 dongle and just use the onboard audio. Now I don’t expect any miracles from onboard sound, but it should work reasonably well to at least be able to communicate and listen.

The only reason I’m using that G430 dongle is for the microphone, because the onboard mic in has so much noise that I can barely be heard, and even on that USB dongle there’s a lot of noise I can’t suppress… I assume this is a driver and/or configuration thing, because it was fine back on Windows. Communication via Discord/TeamSpeak was not an issue there, and the noise barely audible (when cranking up the amplification in Windows settings to the max).

I don’t know if this is possible in Linux, but on Windows that RealTek audio thingy has the ability to reassign each of the ALC1220 plugs to different functions. For example I always had it set up so that the “Line Out” was a second (separate) “Speaker Out” which showed up as a separate audio device, giving the ability to route one application directly to the headphones, and another to the speakers.
On this Fedora install this was never possible. The entire analogue device was routed through one plug that had to be pre-selected.

Much in the same vein I’d like to have the digital out as a separate sound device (again, like in Windows), so that I can put music on my Bookshelf Speakers without having to turn on the TV. And no, connecting the Speakers directly to the PC is not currently an option because they are also supposed to work when I am playing or watching a movie on my consoles (which the TV does via pass-through to the speakers).

And yes, I know Linux is not Windows, but is a setup like that really unreasonable?

Damn, that’s a lot. This is peak libre.

Have you tried putting this line in /etc/pulse/default.pa? (Edit the existing load-module [...] line)

load-module module-stream-restore restore_device=false

This prevents streams from “remembering” which audio sink they were using last, so they always get put on the current default device when they start. If this is still an issue even?

For the rest of your issues…could you show us the output of alsa-info?

You also might try booting up a liveCD, just to see how a fresh install behaves (no need to nuke and pave, yet).

1 Like

Thanks forthe input.

Yes, sorry about that. I wanted it to be detailed though to get the facts right (and went off on a rant for a bit, sorry :slight_smile: ).

It doesn’t seem to be. Everything is now using the G430, I don’t know if that is just luck though.
edit: tried it again by switching the Default Device in the Sound Settings, and every application picks that up right away. The button also now stays on whatever I actually selected, which didn’t happen on F31 (the button was stuck “on” on the same (wrong) sound device no matter how often I “defaulted” another device).

To be honest I wouldn’t mind if they remember what they were last on, especially for music players so I don’t need to juggle them around each time. But not a big deal if that doesn’t work.

I… don’t seem to have that:

[tarulia@localhost ~]$ alsa-info
bash: alsa-info: command not found
[tarulia@localhost ~]$ dnf search alsa-info
Last metadata expiration check: 14:28:16 ago on Tue 12 May 2020 09:37:26 CEST.
No matches found.
[tarulia@localhost ~]$ alsa info
bash: alsa: command not found

Which package provides that? :confused:
Or is that this: https://wiki.ubuntu.com/Audio/AlsaInfo

If so, then this is the output:
http://alsa-project.org/db/?f=d43a5cc04025bd72d200153280f33f35d3c16c62

That’s the one. *buntu ships with it preinstalled (and out of date), didn’t consider that Fedora might not.

I’m no ALSA expert, but it looks like your ALC1220 is showing up just fine. Cross-referencing against my own log output, every 1220-related line is the same (except volume levels, etc). So it seems less likely to be a missing-kernel-module type of issue. Then again, maybe somebody else knows better than I?

It looks like you have Jack installed, but it’s not running. Are you still using it?

How do things look in pavucontrol and alsamixer? pavucontrol will probably look the same as the systray widget, but look through the configurations tab if you haven’t already. (The configurations might also help with your analog/digital out issues maybe). Alsamixer is harder to understand, since it’s the low-level ALSA levels, which are constantly being changed by PulseAudio.

I also did a little testing on my own system. I have a different chipset (Z390), but same mfg (Gigabyte) and same ALC1220. When I plug a pair of earbuds into my front panel headphone jack, the rear-panel analog output is permanently muted. I still get the drop-down to pick “Headphones” or “Line Out” (which you used to have, but are now missing), but picking “Line Out” just sends the stream to the shadow realm. So kind of a completely different issue. But maybe try troubleshooting with only one input connected at a time?

This also might be a board-specific problem. Have you found any other owners of the same motherboard with issues?

1 Like

No, I never actually did. I originally installed it like half a year ago because I wanted to try out a virtual audio cable type setup but didn’t really figure out how it works and didn’t have the time to, then unistalled it. The only reason that it is installed now is because I compiled OBS recently and it’s one of the (soft-)dependencies.

pavucontrol has a lot more stuff available then the KDE sound controls at least… while looking at that I also noticed that the Line Out is also gone now, and it’s only showing the Digital Out as a selection.

KDE Sound Settings:

pavucontrol:

When I select Analog Stereo Out in pavucontrol, the device disappears from the KDE system tray…
/edit: setting it back to Digital Out and selecting Analog Stereo Out again and it’s still there… weird.
After plugging the Headphone back into the mainboard I now have Line Out back, but no Headphone/Speaker there. I thought that maybe Speaker and Line Out are swapped on the board, but Plugging it into the Line Out actually removed the Line Out and I just have the Digital Out again…

As for alsamixer, I’m not sure what I’m looking at:

Well no, not really different. It was the same for me when I still had both selections. Line Out was also the default audio plug is was sent to because no matter how often I replugged the headphones, the sound control would say “unplugged”. Though I don’t know if that is the reason for the Line Out default, but the sound also didn’t go out anywhere.

Currently there is nothing plugged into the motherboard directly at all because then I wouldn’t have sound. I have both Mic and Headphone/Speaker connected to the G430 now as a work around. But my Mic is still getting terrible noise that is being directly monitored to the headphones and I can’t disable it apparently.

Not really, no. I thought about that too but why did it work (sort of) when installing then… I mean if it were a problem with the board, the sound devices would have been missing from the start, no?

Also alsa-info with the Headphone plugged into the motherboard (instead of the G430):
http://alsa-project.org/db/?f=7f80cbccc414b3b7512f8677cce0eb3a0deebd09

edit:
I think someone’s messing with me …
So I didn’t really want to fiddle around with the ALSA controls but I thought it’s busted anyway soo… I did this:

And now I’m actually getting sound out of the headphone jack, but KDE’s control still calls it Line Out (which… not a big deal, just weird).
But why was it muted there in the first place… also not sure if it will persist.

And another edit:
I just saw that the motherboards backside actually labels the jack as “Line Out”, not Headphone, so the naming sort of makes sense. But then the <Headphone> in alsamixer controls it and <Line> is probably the (blue) Line In.

edit after restart:
No sound again, alsamixer’s <Headphone> is on MM (which I assume is supposed to be “mute”?) again and Volume at 0. Weird thing is: When I turn up the volume without “unmuting” I still get sound… eh?
Anyway, how would I go about it not being muted on each restart? :confused:

That’s unfortunately past the bounds of my knowledge. I might be able to help you with one thing, though:

Try disabling “Loopback” in alsamixer (arrow over to the right until you see it). When enabled, it mixes the line-in into the output. I don’t think PA will reset that setting once you fix it.

On my own system, muting any one channel in alsamixer mutes everything else as well, and nothing comes back until I manually unmute everything.

In my KDE Audio settings, I get the full list of profiles, not just digital. That seems like your best lead imo.

You could also mess with aplay, which I think will let you play a .wav file to any working ALSA output. I think you have to kill the PulseAudio daemon and prevent it from re-spawning for this to work. I would only was time with this if you really think it might be ALSA, or if you want to sanity-check all the outputs.

1 Like

Good to know where to find that. Although it is not really an issue now, since output works on the mainboard again (once I unmute it of course), and the loopback is only going to the G430’s output (i.e. I don’t hear the Mic when the headphone is connected to the motherboard).

The issue with that noise is not so much hearing it anyway, it’s that it is there in the first place. It is really annoying on voice chat or when streaming. Although OBS audio filters can filter it out (on the G430, I haven’t tried on the mainboard Mic connector because according to people on voice it was really bad) to a certain degree, it is still audible.
I’m not sure if Windows just does filtering in the background automatically, or if it’s a driver thing, but it was never an issue there (although when cranking up the amplification it was still mildly audible).

Until the Upgrade to F32 I had every option available as well, so that might just be a version difference (Plasma 5.18.5 and Frameworks 5.68.0).
I mean, Analog is back available as soon as I plug it in, so that seems reasonable (only making available what can actually be used).
edit: just noticed I have all the options from 2.0 to 7.1 back, I didn’t check that since I plugged it back into the motherboard.

Also here’s an OBS test recording of the Mic plugged into the G430. The first half is without noise suppression filter, the second half with filter turned on:

And the ALC1220:

I’m not sure if the ALC1220 got better since I installed the system but back then the only reason I used the G430 was that apparently the ALC1220 was way worse on Discord… but in the recording it’s quieter, so not sure what’s up with that.
Anyway though, that noise floor is pretty obnoxious :confused:

PS: apparently Discourse just assumes .mp4 has a video track, but they don’t…

So today I got some time and played around with this for a bit, but still having no luck.

For now I’m just trying to set the volume properly on boot, as that is reset to 0 at each boot.

I tried what was suggested here:

But I’m not getting anywhere. This is my ~/.config/pulse/default.pa:

# include the distro-supplied configuration file
.include /etc/pulse/default.pa

# Pulse and/or ALSA boot with a volume level 0
# set it to 100% at boot
# this is an absolute value, taken from command:
# pacmd list-sinks | grep -e "name:" -e "index:" -e "base volume:"

set-sink-volume alsa_output.pci-0000_0d_00.3.analog-stereo 65536

I suspect this is because set-sink-volume only sets the volume of the Master volume (see image of alsamixer above), but what I actually need to control is the Headphone volume.

Just for reference, the output of pacmd list-sinks in the state right after boot (i.e. Headphones muted):

Spoiler
[tarulia@localhost ~]$ pacmd list-sinks
2 sink(s) available.
    index: 0
        name: <alsa_output.pci-0000_0b_00.1.hdmi-stereo-extra1>
        driver: <module-alsa-card.c>
        flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
        state: IDLE
        suspend cause: (none)
        priority: 9030
        volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
                balance 0.00
        base volume: 65536 / 100% / 0.00 dB
        volume steps: 65537
        muted: no
        current latency: 1999.74 ms
        max request: 344 KiB
        max rewind: 344 KiB
        monitor source: 1
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 0
        linked by: 0
        configured latency: 1999.82 ms; range is 0.50 .. 1999.82 ms
        card: 1 <alsa_card.pci-0000_0b_00.1>
        module: 7
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "HDMI 1"
                alsa.id = "HDMI 1"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "7"
                alsa.card = "1"
                alsa.card_name = "HDA ATI HDMI"
                alsa.long_card_name = "HDA ATI HDMI at 0xfe7a0000 irq 113"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:0b:00.1"
                sysfs.path = "/devices/pci0000:00/0000:00:03.1/0000:09:00.0/0000:0a:00.0/0000:0b:00.1/sound/card1"
                device.bus = "pci"
                device.vendor.id = "1002"
                device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
                device.product.id = "aaf8"
                device.product.name = "Vega 10 HDMI Audio [Radeon Vega 56/64]"
                device.string = "hdmi:1,1"
                device.buffering.buffer_size = "352768"
                device.buffering.fragment_size = "176384"
                device.access_mode = "mmap+timer"
                device.profile.name = "hdmi-stereo-extra1"
                device.profile.description = "Digital Stereo (HDMI 2)"
                device.description = "Vega 10 HDMI Audio [Radeon Vega 56/64] Digital Stereo (HDMI 2)"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: yes)
                        properties:
                                device.icon_name = "video-display"
                                device.product.name = "LG TV"
        active port: <hdmi-output-1>
  * index: 1
        name: <alsa_output.pci-0000_0d_00.3.analog-stereo>
        driver: <module-alsa-card.c>
        flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
        state: RUNNING
        suspend cause: (none)
        priority: 9039
        volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
                balance 0.00
        base volume: 65536 / 100% / 0.00 dB
        volume steps: 65537
        muted: no
        current latency: 100.86 ms
        max request: 17 KiB
        max rewind: 17 KiB
        monitor source: 2
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 1
        linked by: 1
        fixed latency: 100.14 ms
        card: 2 <alsa_card.pci-0000_0d_00.3>
        module: 8
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "ALC1220 Analog"
                alsa.id = "ALC1220 Analog"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "2"
                alsa.card_name = "HD-Audio Generic"
                alsa.long_card_name = "HD-Audio Generic at 0xfe900000 irq 115"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:0d:00.3"
                sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:0d:00.3/sound/card2"
                device.bus = "pci"
                device.vendor.id = "1022"
                device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
                device.product.id = "1457"
                device.product.name = "Family 17h (Models 00h-0fh) HD Audio Controller"
                device.string = "front:2"
                device.buffering.buffer_size = "17664"
                device.buffering.fragment_size = "2944"
                device.access_mode = "mmap"
                device.profile.name = "analog-stereo"
                device.profile.description = "Analog Stereo"
                device.description = "Family 17h (Models 00h-0fh) HD Audio Controller Analog Stereo"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                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"
        active port: <analog-output-lineout>

Since that didn’t work I also tried sudo alsactl store that was mentioned in that article, but that didn’t help either.