EDIT: Making the specs clearer as my long-winded breakdown is causing confusions:

  • Motherboard: Asus ROG STRIX X870-F Gaming Wifi
  • CPU: AMD Ryzen 7 9700X
  • RAM: 64GB (DDR5)
  • GPU: Nvidia RTX 3070 Ti
  • Storage: (2x) WesternDigital Black SN850X (2Tb)
  • OS: Dual-Boot: Arch Linux with KDE Plasma 6 and PipeWire on one drive, Windows 11 IoT LTSC on the other.

Problem: “Line In” from the Mac Mini to the PC described above does not receive any audio whatsoever on Linux, but works perfectly fine on Windows. Trying to get Audio Loopback working on Linux so audio from the Mac Mini plays out from the PC described above.

cross-posted from: https://programming.dev/post/25416188

Hey all, I have a bit of a weird issue I’ve been struggling to fix for a little while now and am hoping a kind soul here might have the knowledge to help me figure it out.

A couple of years ago i switched from a single-system-dual-display setup to dual-system-single-display (as in one screen per system). I’ll spare the long winded explanation for it, but the gist of it is that the new system (a Mac Mini) is connected to the original, main system (custom built PC) via the motherboard’s audio jack so I can get the audio from both systems to play on the same speakers. That way the main PC focuses on the game or whatever else i’m doing, while the Mac Mini focuses on tools/streams/movies/etc. and both share the same set of speakers.

So it goes: Mac Mini (audio out) > (line in) Main PC (audio out) > Speakers

The way I had it work on Windows was by simply going to the audio settings, going to the Line In item’s properties, and checking the “listen to this device” box.

On Linux (Arch, KDE 6 if that helps at all), it was as simple as running either pactl load-module module-loopback or pw-loopback and it would work the same way as Windows out of the box.

Problem is, my motherboard (Asus TUF Gaming X570-Pro (Wi-Fi)) in the main PC died recently, so I had to get a new one (Asus ROG STRIX X870-F Gaming Wifi), and ever since, I’ve been unable to get audio loopback to work even after a clean, fresh install. Listening to device on Windows works fine still but I’m looking to completely get rid of Windows.

By default, running pw-loopback with no tinkering (which worked on the previous build) cut the audio from the main PC and replaced it by what sounds like slow steps in a very echo-y cave.

With a bit of tinkering trying to follow online guides and documentations which i’ve since undone (but the changes remained somehow) it changed to just duplicating the main PC audio with a tiny bit of delay (or at least the audio from one app on the main PC).

One thing I’ve noticed is that when I boot up my main PC, a couple of errors do show up:

Hub 10-0:1.0: config failed, hub doesn’t have any ports! (err -19)
hid-generic 0003:1532:0292.0008: No inputs registered, leaving
Bluetooth: hci0: Opcode 0x0c03 failed: -16

While seemingly unrelated to my loopback issue (hid error being my keyboard), looking those up made me realize that the motherboard IS fairly new and therefore driver support might be lacking (specifically the Bluetooth error, which I don’t care much about in all honesty), which might potentially be the root cause of loopback not working as expected.

Here are the results of some commands I see are asked about often when troubleshooting the same problem: ‘lspci | grep -i audio’

01:00.1 Audio device: NVIDIA Corporation GA104 High Definition Audio Controller (rev a1)
73:00.1 Audio Device: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt Radeon High Definition Audio Controller

Neither seems to be the motherboard (the first one being my 3060 Ti which I don’t pull audio from, the second looking like the CPU’s (AMD Ryzen 7 9700X) iGPU.

‘journalctl -p err’, or simply ‘journalctl’ don’t return anything relating to audio (essentially only returns the same keyboard and bluetooth errors mentioned above).

‘pactl info’ does return something interesting which might be the cause of the issue:

Server String: /run/user/1000/pulse/native
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 128
Tile Size: 65472
User Name: thelvadam
Host Name: CoreDynamics
Server Name: PulseAudio (on PipeWire 1.2.7)
Server Version: 15.0.0
Default Sample Specification: float32le 2ch 48000Hz
Default Channel Map: front-left, front-right
Default Sink: alsa_output.usb-Generic_USB_Audio-00.analog-stereo
Default Source: alsa_input.usb-Generic_USB_Audio-00.analog-stereo
Cookie: 6a69:7312

The weird thing is that the Sink and Source are labeled as usb-Generic_USB_Audio despite being the audio jack ports on the back of the motherboard. Maybe I’m just dumb. The motherboard BIOS settings do have an option for “USB Audio Controller” which is enabled by default under Advanced > Onboard Devices Configuration, but disabling it completely disables any and all audio devices.

I also tried using alsamixer to see if anything was disabled. I found a “Microhone” and “Line In” that were disabled, enabled them, but no change.

Does anyone have any idea why I can’t get audio loopback to work again? I’ll gladly provide more system info if I didn’t provide enough.

Thanks in advance!-

  • Gayhitler@lemmy.ml
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    4 days ago

    What does Kmix show?

    E: actually before you check that, do the speakers play sound from the mac when plugged in to it directly?

    • ThelVadam@programming.devOP
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      4 days ago

      Ohhh very interesting, didn’t think to try THAT.

      When I unplug the jack from the Mac Mini, the audio plays out from the Mac Mini’s internal speaker (that I tried).

      But when I unplug the speakers from the main PC and plug them into the Mac Mini, nothing plays through the speakers.

      Outputs listed on the Mac Mini are: LG ULTRAGEAR (HDMI), External Headphones (Headphone port), and Mac mini Speakers (Built-in).

      Default audio device is set to External Headphones (the jack port i’m using that worked perfectly before), unmuted and volume set to 75%, so audio SHOULD play, but it does not.

      Edit: really weird that it works fine through Windows though. Audio from the Mac Mini’s plays fine when plugged to the main PC and it’s booted to Windows, but not through Linux and not through the Speakers directly??

      • Gayhitler@lemmy.ml
        link
        fedilink
        English
        arrow-up
        1
        ·
        4 days ago

        This is gonna sound stupid, but plug and unplug your jack a few times with sound playing.

        • ThelVadam@programming.devOP
          link
          fedilink
          arrow-up
          1
          ·
          4 days ago

          This is gonna sound even stupider, I actually got my cables mixed up and the cable I plugged into the Mac Mini thinking it was the Speakers was actually the other end of the Line In cable so audio was being sent to nowhere.

          Plugged the actual Speakers cable in the Mac Mini and audio played find through the Speakers.

          Re-arranged the cables back to the previous setup and the issue remains :(

            • ThelVadam@programming.devOP
              link
              fedilink
              arrow-up
              1
              ·
              4 days ago

              Same as other audio software, “USB Audio Device” for both Output and Input, both are enabled and volume at 75% or higher, capture is enabled on the Input, if Kmix shows audio activity levels then it’s not detecting anything either despite media playing on the Mac Mini

              • Gayhitler@lemmy.ml
                link
                fedilink
                English
                arrow-up
                1
                ·
                3 days ago

                Okay I got another stupid question. You have everything going to the rear of the pc, but often times motherboards will have a riser to send audio to the front or top of the case so you can plug your headset in there. Do you have this facility and if so does running to it make any difference?

                I may end up having to bow out but if I don’t get to keep trying to help: at some point you’ll need to fire up a daw or obs or jack or something to figure out if you can actually see the signal you’re dealing with anywhere.

                The troubleshooting process I’m working through is more akin to what you’d do if you were at a big old mixing console trying to figure out why there’s no sound as opposed to the seemingly more obvious process of tracing device drivers and whatnot.

                It’s been very helpful to me when troubleshooting sound issues “in the box”, so if you get stumped fiddlefarting around with lspci and whatnot, give it a shot from that side.

                • ThelVadam@programming.devOP
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  3 days ago

                  Unfortunately I can’t use the front ports on the case because the cables for it don’t reach the plug on the motherboard.

                  Haven’t thought to try OBS, I’ll have to give it a go tomorrow!

                  I do appreciate the attempt to help me troubleshoot it, even if unsuccessful!