Hybrid AMD/Nvidia laptop - no audio option for HDMI/Display Port

Hi,
This seems to be quite popular issue, but on my own research I couldn’t find the fix so I’m hoping someone smarter than me will be able to help me. The issue is no sound option and therefore no sound from monitor/TV when I connect them by HDMI or mini Display Port. For the reference on Windows when I connect cable, it shows new option in audio called “Audio (Geforce GTX 1660 TI)” that when I select, I can hear my audio going through monitor or TV.
My laptop is Hp Omen 15-en0019nw from 2020.
Some hardware specs:

  • CPU: AMD Ryzen™ 7 4800H
  • GPU: NVIDIA® GeForce® GTX 1660 Ti (6 GB GDDR6 dedicated)
  • Audio driver: Bang & Olufsen (couldn’t find exact model as the producer didn’t write it)

I think this unusual audio driver may be causing the trouble as for Windows it probably got some hacky driver to work. Also on Linux audio is much much quieter, like 25% windows capabilities on 100% volume, but it never really bothered me as I’m using headphones almost all the time.

Some software specs:

  • Fedora 37 with Gnome desktop (also doesn’t work on KDE version)
  • PipeWire 0.3.63
  • X11 protocol (doesn’t work on Wayland either)
  • Nvidia driver version: 525.60.11 (tried on hybrid mode and on using only nvidia, neither works)
  • aplay -L output (when on only nvidia mode):
null
    Discard all samples (playback) or generate zero samples (capture)
pipewire
    PipeWire Sound Server
pulse
    PulseAudio Sound Server
default
    Default ALSA Output (currently PulseAudio Sound Server)
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
    HDA NVidia, PL2390
    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=NVidia,DEV=4
    HDA NVidia, HDMI 4
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=5
    HDA NVidia, HDMI 5
    HDMI Audio Output
sysdefault:CARD=Generic
    HD-Audio Generic, ALC245 Analog
    Default Audio Device
front:CARD=Generic,DEV=0
    HD-Audio Generic, ALC245 Analog
    Front output / input
surround21:CARD=Generic,DEV=0
    HD-Audio Generic, ALC245 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Generic,DEV=0
    HD-Audio Generic, ALC245 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Generic,DEV=0
    HD-Audio Generic, ALC245 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Generic,DEV=0
    HD-Audio Generic, ALC245 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Generic,DEV=0
    HD-Audio Generic, ALC245 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Generic,DEV=0
    HD-Audio Generic, ALC245 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
  • aplay --list-devices output (when on only nvidia mode):
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 7: HDMI 1 [PL2390]
  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 0: NVidia [HDA NVidia], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 11: HDMI 5 [HDMI 5]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 0: ALC245 Analog [ALC245 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
  • lspci seems to see nvidia audio device:
01:00.0 VGA compatible controller: NVIDIA Corporation TU116M [GeForce GTX 1660 Ti Mobile] (rev a1)
01:00.1 Audio device: NVIDIA Corporation TU116 High Definition Audio Controller (rev a1)
01:00.2 USB controller: NVIDIA Corporation TU116 USB 3.1 Host Controller (rev a1)
  • alsamixer allows selecting HDA NVidia and all audio options was muted. Unmuting all of them didn’t do anything.
  • pavucontrol in configuration tab also sees “TU116 High Definition Audio Controller” but the only option in profile is “Disabled”
  • pactl list cards short output:
42	alsa_card.pci-0000_01_00.1	alsa
43	alsa_card.pci-0000_07_00.6	alsa

It seems like there is everything needed for it to work, but it doesn’t somehow. I’ve read that nvidia disabled hdmi audio output by default, because card couldn’t go to sleep, but I don’t know how to revert this change (if it is even what’s causing the problem)

If anyone has any suggestion what could I do to make it work I will be very grateful.

Update: Tried setting amd_iommu=off as noted here, but it didn’t fix the issue

I’m no expert by any means, but it looks like you have multiple audio devices and your system is defaulting to the non-nvidia device. Can you blacklist the kernel module for the sound device that you don’t want so only your nvidia card will be detected? lspci -v should list what kernel module is being used for each device.

Edit: Or maybe running rmmod <other-sound-driver> before plugging in your HDMI cable would work if you don’t want to reboot. Also, since you are using the nvidia driver, did you install the proprietary userspace tools and firmware (sh ./NVIDIA-Linux-[...].run --no-kernel-modules) as documented in the README?

Well, the only other option is snd_hda_intel. I tried blacklisting it, but somehow it broke nvidia driver so much that even enabling it again doesn’t allow me to use nvidia and falling back to noveau. I’ll try to purge and reinstall nvidia driver and try again.

Update: Still driver didn’t work. Fortunately I had btrfs snapshot and I don’t know what files has changed, but rollback fixed this issue. But in the end blacklisting this module breaks nvidia completely.

You could try doing:

  • options snd-intel-dspcfg dsp_driver=1
    to use the legacy driver
  • options snd-intel-dspcfg dsp_driver=3
    to force the sof driver

You’d want to put it under /etc/modprobe.d/
I use dspcfg.conf for the file name.

More info: Overview of Intel hardware platforms — SOF Project 2.2 documentation

1 Like

Tried adding that, rebuilding initramfs with dracut --force --regenerate-all and regenerating grub config, but unfortunately it doesn’t work. Both options still results in no audio option and pavucontrol still has only disabled in nvidia profile.

Forgot to add, lspci -v sees 3 devices with name Audio in it:

01:00.1 Audio device: NVIDIA Corporation TU116 High Definition Audio Controller (rev a1)
	Subsystem: Hewlett-Packard Company Device 8786
	Flags: bus master, fast devsel, latency 0, IRQ 115, IOMMU group 11
	Memory at fc080000 (32-bit, non-prefetchable) [size=16K]
	Capabilities: [60] Power Management version 3
	Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
	Capabilities: [78] Express Endpoint, MSI 00
	Capabilities: [100] Advanced Error Reporting
	Kernel driver in use: snd_hda_intel

07:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] ACP/ACP3X/ACP6x Audio Coprocessor (rev 01)
	Subsystem: Hewlett-Packard Company Device 8786
	Flags: bus master, fast devsel, latency 0, IRQ 98, IOMMU group 8
	Memory at fc580000 (32-bit, non-prefetchable) [size=256K]
	Capabilities: [48] Vendor Specific Information: Len=08 <?>
	Capabilities: [50] Power Management version 3
	Capabilities: [64] Express Endpoint, MSI 00
	Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
	Kernel driver in use: snd_rn_pci_acp3x
	Kernel modules: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x, snd_pci_acp6x, snd_rpl_pci_acp6x, snd_sof_amd_renoir

07:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller
	Subsystem: Hewlett-Packard Company Device 8786
	Flags: bus master, fast devsel, latency 0, IRQ 116, IOMMU group 8
	Memory at fc5c0000 (32-bit, non-prefetchable) [size=32K]
	Capabilities: [48] Vendor Specific Information: Len=08 <?>
	Capabilities: [50] Power Management version 3
	Capabilities: [64] Express Endpoint, MSI 00
	Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
	Kernel driver in use: snd_hda_intel

That output appears to show that the nvidia device is indeed using/trying-to-use the snd_hda_intel driver. I don’t know if that is right or not. But it looks like the other device is using the snd_rn_pci_acp3x driver. So, at least while trying to troubleshoot the problem with the nvidia card, I’d remove the snd_rn_pci_acp3x driver from the equation. You can do that temporarily with rmmod snd_rn_pci_acp3x. You can reload it with modprobe snd_rn_pci_acp3x (or by rebooting your PC).

1 Like

When using rmmod snd_rn_pci_acp3x it would hang forever (left it for 5 min and didn’t finish), and blacklisting it result in the same story with broken nvidia and rollback needed.
Both times journalctl is spamming these errors:

nvidia: Process '/usr/bin/bash -c '/usr/bin/mknod -Z -m 666 /dev/nvidiactl c 195 255'' failed with exit code 1.
nvidia: Process '/usr/bin/bash -c '/usr/bin/mknod -Z -m 666 /dev/nvidiactl c 195 255'' failed with exit code 1.
(EE) NVIDIA: Failed to initialize the NVIDIA kernel module. Please see the
(EE) NVIDIA:     system's kernel log for additional error messages and
(EE) NVIDIA:     consult the NVIDIA README for details.
NVRM: The NVIDIA probe routine was not called for 1 device(s).
NVRM: This can occur when a driver such as: 
NVRM: nouveau, rivafb, nvidiafb or rivatv 
NVRM: was loaded and obtained ownership of the NVIDIA device(s).
NVRM: Try unloading the conflicting kernel module (and/or
NVRM: reconfigure your kernel without the conflicting
NVRM: driver(s)), then try loading the NVIDIA kernel module
NVRM: again.
NVRM: No NVIDIA devices probed.
nvidia: Process '/usr/bin/bash -c '/usr/bin/mknod -Z -m 666 /dev/nvidiactl c 195 255'' failed with exit code 1.
nvidia: Process '/usr/bin/bash -c '/usr/bin/mknod -Z -m 666 /dev/nvidiactl c 195 255'' failed with exit code 1.

Noveau shouldn’t take control as it is blacklisted in the grub parameter (automatically added when installing nvidia from RPMFusion).
It’s strange that nvidia depends on this driver even though it doesn’t use it.

I don’t think the nvidia driver should be dependent on snd_rn_pci_acp3x. lsmod will show driver dependencies.

The next thing I’d try would be to disable, if possible, the AMD sound device via the system firmware. But I’m really out of ideas beyond that. Sorry.

I don’t see any reason why that command should be failing. I googled it and I saw a mention about SELinux causing problems. You might try disabling SELinux temporarily (setenforce 0) and then see if that error still occurs. Your nvidia driver may need that /dev/nvidiactl device node to work properly.

can you post: journalctl -b -g 'snd|sound'

Thanks

Here is lsmod output grepped for these two audio drivers:

snd_hda_intel          61440  11
snd_intel_dspcfg       36864  2 snd_hda_intel,snd_sof
snd_hda_codec         184320  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
snd_hda_core          114688  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
snd_pcm               151552  12 snd_sof_amd_acp,snd_hda_codec_hdmi,snd_pci_acp6x,snd_hda_intel,snd_hda_codec,snd_sof,snd_compress,snd_soc_core,snd_sof_utils,snd_hda_core,snd_acp3x_pdm_dma,snd_pcm_dmaengine
snd_rn_pci_acp3x       24576  0
snd                   126976  48 snd_ctl_led,snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_sof,snd_timer,snd_compress,snd_soc_core,snd_pcm
snd_acp_config         16384  2 snd_rn_pci_acp3x,snd_sof_amd_renoir

journalctl -b -g 'snd|sound' output:

Dec 28 11:20:03 ADRIAN-OMEN kernel: snd_rn_pci_acp3x 0000:07:00.5: enabling device (0000 -> 0002)
Dec 28 11:20:04 ADRIAN-OMEN kernel: snd_hda_intel 0000:01:00.1: enabling device (0000 -> 0002)
Dec 28 11:20:04 ADRIAN-OMEN kernel: snd_hda_intel 0000:01:00.1: Disabling MSI
Dec 28 11:20:04 ADRIAN-OMEN kernel: snd_hda_intel 0000:01:00.1: Handle vga_switcheroo audio client
Dec 28 11:20:04 ADRIAN-OMEN kernel: snd_hda_intel 0000:07:00.6: enabling device (0000 -> 0002)
Dec 28 11:20:04 ADRIAN-OMEN kernel: input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.1/0000:01:00.1/sound/card0/input18
Dec 28 11:20:04 ADRIAN-OMEN kernel: input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.1/0000:01:00.1/sound/card0/input19
Dec 28 11:20:04 ADRIAN-OMEN kernel: input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.1/0000:01:00.1/sound/card0/input20
Dec 28 11:20:04 ADRIAN-OMEN kernel: input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:01.1/0000:01:00.1/sound/card0/input21
Dec 28 11:20:04 ADRIAN-OMEN kernel: input: HDA NVidia HDMI/DP,pcm=10 as /devices/pci0000:00/0000:00:01.1/0000:01:00.1/sound/card0/input22
Dec 28 11:20:04 ADRIAN-OMEN kernel: input: HDA NVidia HDMI/DP,pcm=11 as /devices/pci0000:00/0000:00:01.1/0000:01:00.1/sound/card0/input23
Dec 28 11:20:04 ADRIAN-OMEN kernel: snd_hda_codec_realtek hdaudioC1D0: autoconfig for ALC245: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
Dec 28 11:20:04 ADRIAN-OMEN kernel: snd_hda_codec_realtek hdaudioC1D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
Dec 28 11:20:04 ADRIAN-OMEN kernel: snd_hda_codec_realtek hdaudioC1D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
Dec 28 11:20:04 ADRIAN-OMEN kernel: snd_hda_codec_realtek hdaudioC1D0:    mono: mono_out=0x0
Dec 28 11:20:04 ADRIAN-OMEN kernel: snd_hda_codec_realtek hdaudioC1D0:    inputs:
Dec 28 11:20:04 ADRIAN-OMEN kernel: snd_hda_codec_realtek hdaudioC1D0:      Mic=0x19
Dec 28 11:20:04 ADRIAN-OMEN kernel: input: HD-Audio Generic Mic as /devices/pci0000:00/0000:00:08.1/0000:07:00.6/sound/card1/input24
Dec 28 11:20:04 ADRIAN-OMEN kernel: input: HD-Audio Generic Headphone as /devices/pci0000:00/0000:00:08.1/0000:07:00.6/sound/card1/input25
Dec 28 11:20:04 ADRIAN-OMEN systemd[1]: alsa-restore.service - Save/Restore Sound Card State was skipped because of a failed condition check (ConditionPathExists=!/etc/alsa/state-daemon.conf).
Dec 28 11:20:04 ADRIAN-OMEN systemd[1]: Started alsa-state.service - Manage Sound Card State (restore and store).
Dec 28 11:20:04 ADRIAN-OMEN systemd[1]: Reached target sound.target - Sound Card.
Dec 28 11:20:45 ADRIAN-OMEN systemd[2275]: Starting org.gnome.SettingsDaemon.Sound.service - GNOME sound sample caching service...
Dec 28 11:20:45 ADRIAN-OMEN systemd[2275]: Started org.gnome.SettingsDaemon.Sound.service - GNOME sound sample caching service.
Dec 28 11:20:45 ADRIAN-OMEN systemd[2275]: Started app-gnome-libcanberra\x2dlogin\x2dsound-2772.scope - Application launched by gnome-session-binary.
Dec 28 11:20:45 ADRIAN-OMEN systemd[2275]: Reached target org.gnome.SettingsDaemon.Sound.target - GNOME sound sample caching target.
Dec 28 11:20:45 ADRIAN-OMEN libcanberra-login-sound.desktop[2772]: Failed to play sound: File or data not found

Will try SELinux and search for bios setting and update this comment.

Update: completely disabling SELinux and then blacklisting driver results in the same nvidia issue. Also this laptop has very minimal bios options and I didn’t find the option to turn off audio.

I would avoid completely disabling selinux (i.e. selinux=0 on the kernel command line). If you run the system for any length of time with selinux disabled, you can end up with files that don’t have the right security labels. Then, when you boot the system with selinux enabled, random things can fail because they cannot access the files/directories. It is better to use enforcing=0 on the kernel command line (or setenforce 0 in a terminal) so files will still be generated with the proper permissions, even though the permissions will be ignored/bypassed as long as enforcing=0.

Also, it is possible (though I think unlikely) that some commands may error if selinux is completely disabled/absent from the system. That mknod command might even be one such command since it appears to have a -Z on the parameter list (-Z means to apply the proper selinux permissions).

I would suggest

  1. Run sudo fixfiles -F onboot and then reboot to correct any files that might have improper selinux labels (this might take a while to run if you have a lot of files).

  2. Retry getting your nvidia driver to work with enforcing=0.

The command getenforce shows the current selinux setting which will be one of Enforcing, Permissive, or Disabled. By default Fedora Workstation is installed with selinux in Enforcing mode.
The command sudo setenforce 0 will change a current setting from Enforcing to Permissive, and sudo setenforce 1 will change selinux to Enforcing.

If selinux is in either Permissive or Enforcing mode new files created/installed will be given the proper selinux context. If it is Disabled then context is not applied to file changes or creations.

The command sudo fixfiles -F onboot is only able to fix the context with the next boot. The command sudo restorecon -R / will verify & restore the selinux context for the entire system as well but does it while the system is running.

Thanks for clarification. Fortunately I only disabled it when testing and after nvidia broke I had to rollback to previous snapshot, so any file that changed was restored.

Trying with enforcing=0 also results in nvidia driver not loading.

Edit: Just in case I ran sudo restorecon -R /.