this post was submitted on 18 Feb 2025
10 points (100.0% liked)

Linux

50355 readers
1305 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

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!-

you are viewing a single comment's thread
view the rest of the comments
[–] eldavi@lemmy.ml 1 points 3 days ago (1 children)

lspci -k will show you what driver each piece of hardware is using

[–] ThelVadam@programming.dev 1 points 3 days ago* (last edited 3 days ago) (1 children)

I went and booted into Windows to double check how the audio devices are set up and I don't think I've ever seen onboard audio controllers show up like this with previous motherboards, which might explain why I'm having such a hard time getting it to work on Linux. It seems to be throwing whatever is plugged into the jack ports through two different hoops. The devices themselves (Speakers and Mac Mini) aren't directly connecting to the integrated Realtek audio card, and it seems like there's another layer of audio processing happening in-between. I don't know, I know nothing about audio so I'm kinda talking out of my ass based on what I'm expecting to see and what I'm seeing...

This is what lspci -k returns, I'm seeing no mention of Realtek and the only audio related things I'm seeing appear to be the CPU's iGPU (73:00.1) and the GPU's (01:00.1) audio...

00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Root Complex
	Subsystem: ASUSTeK Computer Inc. Device 8877
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge IOMMU
	Subsystem: ASUSTeK Computer Inc. Device 8877
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Dummy Host Bridge
00:01.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge GPP Bridge
	Subsystem: ASUSTeK Computer Inc. Device 8877
	Kernel driver in use: pcieport
00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge GPP Bridge
	Subsystem: ASUSTeK Computer Inc. Device 8877
	Kernel driver in use: pcieport
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Dummy Host Bridge
00:02.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge GPP Bridge
	Subsystem: ASUSTeK Computer Inc. Device 8877
	Kernel driver in use: pcieport
00:02.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge GPP Bridge
	Subsystem: ASUSTeK Computer Inc. Device 8877
	Kernel driver in use: pcieport
00:03.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Dummy Host Bridge
00:04.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Dummy Host Bridge
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Dummy Host Bridge
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Internal GPP Bridge to Bus [C:A]
	Subsystem: ASUSTeK Computer Inc. Device 8877
	Kernel driver in use: pcieport
00:08.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Internal GPP Bridge to Bus [C:A]
	Subsystem: ASUSTeK Computer Inc. Device 8877
	Kernel driver in use: pcieport
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 71)
	Subsystem: ASUSTeK Computer Inc. Device 8877
	Kernel driver in use: piix4_smbus
	Kernel modules: i2c_piix4, sp5100_tco
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
	Subsystem: ASUSTeK Computer Inc. Device 8877
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Data Fabric; Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Data Fabric; Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Data Fabric; Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Data Fabric; Function 3
	Kernel driver in use: k10temp
	Kernel modules: k10temp
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Data Fabric; Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Data Fabric; Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Data Fabric; Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge Data Fabric; Function 7
01:00.0 VGA compatible controller: NVIDIA Corporation GA104 [GeForce RTX 3060 Ti] (rev a1)
	Subsystem: NVIDIA Corporation Device 147a
	Kernel driver in use: nvidia
	Kernel modules: nouveau, nvidia_drm, nvidia
01:00.1 Audio device: NVIDIA Corporation GA104 High Definition Audio Controller (rev a1)
	Subsystem: NVIDIA Corporation Device 147a
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
02:00.0 Non-Volatile memory controller: Sandisk Corp WD Black SN850X NVMe SSD (rev 01)
	Subsystem: Sandisk Corp WD Black SN850X NVMe SSD
	Kernel driver in use: nvme
	Kernel modules: nvme
[…]
71:00.0 USB controller: ASMedia Technology Inc. Device 2426 (rev 01)
	Subsystem: ASMedia Technology Inc. Device 2421
	Kernel driver in use: xhci_hcd
72:00.0 USB controller: ASMedia Technology Inc. Device 2425 (rev 01)
	Subsystem: ASMedia Technology Inc. Device 2421
	Kernel driver in use: thunderbolt
	Kernel modules: thunderbolt
73:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Granite Ridge [Radeon Graphics] (rev c5)
	Subsystem: ASUSTeK Computer Inc. Device 8877
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu
73:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt Radeon High Definition Audio Controller
	Subsystem: ASUSTeK Computer Inc. Device 8877
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
73:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 19h PSP/CCP
	Subsystem: ASUSTeK Computer Inc. Device 8877
	Kernel driver in use: ccp
	Kernel modules: ccp
73:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge USB 3.1 xHCI
	Subsystem: ASUSTeK Computer Inc. Device 8877
	Kernel driver in use: xhci_hcd
73:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Raphael/Granite Ridge USB 3.1 xHCI
	Subsystem: ASUSTeK Computer Inc. Device 8877
	Kernel driver in use: xhci_hcd
74:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] Device 15b8
	Subsystem: ASUSTeK Computer Inc. Device 8877
	Kernel driver in use: xhci_hcd

The deeper I dig the less I understand.

Edit: had to redact the code-block because it seems there’s a character limit and it was long enough to hit it.

[–] eldavi@lemmy.ml 1 points 3 days ago* (last edited 3 days ago) (1 children)

use lspci (lspci -nnk) & lsmod to show you what arch is doing w your realtek device.

edit: might be lsusb instead of lspci since windows shows it's a usb device

[–] ThelVadam@programming.dev 1 points 3 days ago (1 children)

Yyyyep, shows up on lsusb

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub
Bus 001 Device 003: ID 174c:2174 ASMedia Technology Inc. ASMT2307
Bus 001 Device 004: ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub
Bus 001 Device 005: ID 0b05:1b9b ASUSTek Computer, Inc. USB Audio
Bus 001 Device 006: ID 1532:00aa Razer USA, Ltd Razer Basilisk V3 Pro
Bus 001 Device 007: ID 1532:0292 Razer USA, Ltd DSV2 Pro
Bus 001 Device 008: ID 0b05:19af ASUSTek Computer, Inc. AURA LED Controller
Bus 001 Device 009: ID 0489:e13a Foxconn / Hon Hai Wireless_Device
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 002: ID 0bda:0411 Realtek Semiconductor Corp. Hub
Bus 002 Device 003: ID 174c:3174 ASMedia Technology Inc. ASMT2307
Bus 002 Device 004: ID 0bda:0411 Realtek Semiconductor Corp. Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 009 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 010 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
[–] eldavi@lemmy.ml 1 points 2 days ago

the advice is still the same: understand what arch is doing with your usb device using lsusb and udev or sysfs along with lsmod.

however, it's confusing how this usb device fits into any of this since your initial comments suggest that you're trying to use your pci devices to enable sound from your mac mini.