Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

[SOLVED] Audio output keeps switching to video card

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
tkzv
Tux's lil' helper
Tux's lil' helper
Posts: 121
Joined: Fri Aug 22, 2014 6:56 pm

[SOLVED] Audio output keeps switching to video card

  • Quote

Post by tkzv » Sat Mar 14, 2026 9:23 am

I've got 3 sound devices: in the video card, in the processor and on the motherboard:

Code: Select all

$ lspci -k | grep -i -A 4 audio 
01:00.1 Audio device: NVIDIA Corporation Device 22e8 (rev a1)
        Subsystem: NVIDIA Corporation Device 0000
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
02:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 600 Series Chipset PCIe Switch Upstream Port (rev 01)
--
0e:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Radeon High Definition Audio Controller [Rembrandt/Strix]
        Subsystem: Micro-Star International Co., Ltd. [MSI] Device 7e56
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
0e:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 19h PSP/CCP
--
0e:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h/1ah HD Audio Controller
        DeviceName: Realtek ALC1220
        Subsystem: Micro-Star International Co., Ltd. [MSI] Device 9e56
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel

Code: Select all

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [S32D850]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Generic [HD-Audio Generic], device 0: Generic Analog [Generic Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Generic [HD-Audio Generic], device 1: Generic Digital [Generic Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default
    Default ALSA Output (currently PipeWire Media Server)
pipewire
    PipeWire Sound Server
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, S32D850
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
    HDA NVidia, HDMI 1
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=2
    HDA NVidia, HDMI 2
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=3
    HDA NVidia, HDMI 3
    HDMI Audio Output
hdmi:CARD=Generic_1,DEV=0
    HD-Audio Generic, HDMI 0
    HDMI Audio Output
hdmi:CARD=Generic_1,DEV=1
    HD-Audio Generic, HDMI 1
    HDMI Audio Output
hdmi:CARD=Generic_1,DEV=2
    HD-Audio Generic, HDMI 2
    HDMI Audio Output
hdmi:CARD=Generic_1,DEV=3
    HD-Audio Generic, HDMI 3
    HDMI Audio Output
sysdefault:CARD=Generic
    HD-Audio Generic, Generic Analog
    Default Audio Device
front:CARD=Generic,DEV=0
    HD-Audio Generic, Generic Analog
    Front output / input
surround21:CARD=Generic,DEV=0
    HD-Audio Generic, Generic Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Generic,DEV=0
    HD-Audio Generic, Generic Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Generic,DEV=0
    HD-Audio Generic, Generic Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Generic,DEV=0
    HD-Audio Generic, Generic Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Generic,DEV=0
    HD-Audio Generic, Generic Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Generic,DEV=0
    HD-Audio Generic, Generic Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Generic,DEV=0
    HD-Audio Generic, Generic Digital
    IEC958 (S/PDIF) Digital Audio Output
Motherboard has its own audio connectors, video card outputs sound through the monitor, and it is disabled when the monitor is off. But when I select the motherboard device, after some time playback somehow switches to Nvidia.

How do I disable this switching? Permanently disabling videocard audio is acceptable.

emerge --info: https://pastebin.com/yrKwc8UD
lspci: https://pastebin.com/Cj4xHvZN
pa-info: https://pastebin.com/XV6ysXTZ

I tried blacklisting snd_hda_codec_hdmi, snd_hda_codec_realtek, snd-hda-codec-hdmi, snd-hda-codec-realtek in /lib/modprobe.d/dist-blacklist.conf and /etc/modprobe.d/blacklist.conf, but snd_hda_codec_hdmi is loaded anyway.

Setting "options snd cards_limit=1" in /etc/modprobe.d/alsa.conf did not help.

ANSWER: "options snd-hda-intel enable=0,0,1" in /etc/modprobe.d/alsa.conf disabled sound through Nvidia and Radeon.

The question how to reset PipeWire configuration without reboot still remains.
Last edited by tkzv on Sat Mar 14, 2026 4:13 pm, edited 1 time in total.
Top
Ralphred
l33t
l33t
Posts: 822
Joined: Tue Dec 31, 2013 11:52 am

  • Quote

Post by Ralphred » Sat Mar 14, 2026 1:06 pm

Assuming your using pipewire* you can use the old pactl command

Code: Select all

pactl set-default-sink <name>
But you'll have to see how they are named using the output from

Code: Select all

pactl list sinks|grep "Name:\|Description:"
.
There is probably a way to make this permanent using a config file, but I don't use pipewire (yet) so one of the guys that does will probably post with the config snippet and file location.

*it's the default, if you were using something else you'd know and would have told us.

EDIT: Apparently I do use pipewire, on my laptop, so can offer a "permanent config" fix, but not without seeing the output of pactl list sinks first...
Top
tkzv
Tux's lil' helper
Tux's lil' helper
Posts: 121
Joined: Fri Aug 22, 2014 6:56 pm

  • Quote

Post by tkzv » Sat Mar 14, 2026 2:04 pm

Ralphred wrote:Assuming your using pipewire* you can use the old pactl command

Code: Select all

pactl set-default-sink <name>
But you'll have to see how they are named using the output from

Code: Select all

pactl list sinks|grep "Name:\|Description:"
.
There is probably a way to make this permanent using a config file, but I don't use pipewire (yet) so one of the guys that does will probably post with the config snippet and file location.

*it's the default, if you were using something else you'd know and would have told us.

EDIT: Apparently I do use pipewire, on my laptop, so can offer a "permanent config" fix, but not without seeing the output of pactl list sinks first...
"pactl list sinks" output: https://pastebin.com/UcU2yTZh

The name I need is "alsa_output.pci-0000_0e_00.6.iec958-stereo".

I tried "pactl set-default-sink alsa_output.pci-0000_0e_00.6.iec958-stereo", and it switched to the correct device in KDE System Settings. But I do not hear anything from the speakers.

I do know one way to switch to that device — stop all programs that use sound, kill pipewire, unload all snd kernel modules, modprobe the desired module, start userspace programs again. Is there any simpler way to do that?

And the question I asked was: how to prevent the system from switching to Nvidia again?
Top
grknight
Retired Dev
Retired Dev
Posts: 2556
Joined: Fri Feb 20, 2015 9:36 pm

  • Quote

Post by grknight » Sat Mar 14, 2026 2:34 pm

If you want to only ever output to the iec958 and not any HDMI, then make SND_HDA_INTEL a module if not already, then:

Code: Select all

options snd-hda-intel enable=0,0,1
If you want to only disable Nvidia HDMI and keep the other HDMI:

Code: Select all

options snd-hda-intel enable=0,1,1
Top
tkzv
Tux's lil' helper
Tux's lil' helper
Posts: 121
Joined: Fri Aug 22, 2014 6:56 pm

  • Quote

Post by tkzv » Sat Mar 14, 2026 2:52 pm

grknight wrote:If you want to only ever output to the iec958 and not any HDMI, then make SND_HDA_INTEL a module if not already, then:

Code: Select all

options snd-hda-intel enable=0,0,1
Thanks. But how do I know, which number stands for which device? Can the order change after a reboot?

And how do I apply those changes without reboot? kill pipewire, modprobe -r every module with "snd", then what?

I tried "modprobe snd-hda-intel" as root, then "/usr/bin/gentoo-pipewire-launcher restart &" as non-root. KDE System Settings window now displays 3 recording and 3 playback devices "Family 17h/16h/1ah ...", 1 "HDA Nvidia..." and 2 "Rembrand Radeon". When I press "Test", I see an error "Error trying to play a test sound. The system said: "Invalid state" ", and there's no sound.
[Note: forgot to restart alsasound. This might've helped.]

lsmod displays the module snd_hda_intel, but dmesg has errors:

Code: Select all

snd_hda_intel 0000:01:00.1: probe with driver snd_hda_intel failed with error -2
snd_hda_intel 0000:0e:00.1: probe with driver snd_hda_intel failed with error -2
P.S. I ended up rebooting the machine. Nvidia and Radeon did not appear. Works fine, so far.
Last edited by tkzv on Sun Mar 15, 2026 10:43 am, edited 1 time in total.
Top
grknight
Retired Dev
Retired Dev
Posts: 2556
Joined: Fri Feb 20, 2015 9:36 pm

  • Quote

Post by grknight » Sat Mar 14, 2026 9:32 pm

tkzv wrote:Thanks. But how do I know, which number stands for which device? Can the order change after a reboot?
The order is the card list, by card number, in aplay -l so long as you haven't applied any index or enable options to snd-hda-intel.
The order will more than likely remain the same between reboots so long as there are no hardware changes to the system.

The dmesg "errors" are just drivers complaining about being disabled
Top
Post Reply

6 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy