NVIDIA HDMI dont output sound [Legion 5 RTX3060]

Hello everyone, i am enjoying OpenSUSE on my new hardware, until here, everything is running flawlessly and without problems.

The thing that is not going ok is the audio output from the HDMI connection. it doesnt work, dont even show as a option in the menu. The HDMI is connected to a television.

I installed all nvidia related drivers and packages via YaST.

Anyone know something about this issue on laptops with switchable graphics? (Intel + Nvidia GPU)?

I would love to know it better to solve and learn too

also:

http://alsa-project.org/db/?f=1f3bef7eac36e6a8dc08c480e85425a1d7cc2df4

  Type: Laptop System: LENOVO product: 82TB v: Legion 5 15IAH7H
    serial: <superuser required> Chassis: type: 10 v: Legion 5 15IAH7H
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: SDK0T76462 WIN
    serial: <superuser required> UEFI: LENOVO v: J2CN51WW date: 03/08/2023
Graphics:
  Device-1: Intel Alder Lake-P GT2 [Iris Xe Graphics] vendor: Lenovo
    driver: i915 v: kernel arch: Gen-12.2 process: Intel 10nm built: 2021-22+
    ports: active: eDP-1 empty: DP-1,DP-2 bus-ID: 00:02.0 chip-ID: 8086:46a6
    class-ID: 0300
  Device-2: NVIDIA GA106M [GeForce RTX 3060 Mobile / Max-Q] vendor: Lenovo
    driver: nvidia v: 545.29.06 alternate: nouveau,nvidia_drm non-free: 545.xx+
    status: current (as of 2023-11; EOL~2026-12-xx) arch: Ampere code: GAxxx
    process: TSMC n7 (7nm) built: 2020-2023 pcie: gen: 1 speed: 2.5 GT/s
    lanes: 8 link-max: gen: 4 speed: 16 GT/s lanes: 16 ports: active: none
    off: HDMI-A-1 empty: DP-3,DP-4,eDP-2 bus-ID: 01:00.0 chip-ID: 10de:2560
    class-ID: 0300
  Display: x11 server: X.Org v: 21.1.9 with: Xwayland v: 23.2.2
    compositor: kwin_x11 driver: X: loaded: modesetting,nvidia alternate: intel
    dri: iris gpu: i915,nvidia,nvidia-nvswitch display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 507x285mm (19.96x11.22")
    s-diag: 582mm (22.9")
  Monitor-1: HDMI-A-1 mapped: HDMI-0 note: disabled model: LG (GoldStar) TV
    serial: <filter> built: 2014 res: 1920x1080 hz: 60 dpi: 30 gamma: 1.2
    size: 1600x900mm (62.99x35.43") diag: 1836mm (72.3") ratio: 16:9 modes:
    max: 1024x768 min: 640x480
  Monitor-2: eDP-1 mapped: eDP-1-1 pos: primary model: BOE Display 0x0ae3
    built: 2021 res: 1920x1080 hz: 144 dpi: 142 gamma: 1.2
    size: 344x194mm (13.54x7.64") diag: 395mm (15.5") ratio: 16:9
    modes: 1920x1080
  API: EGL v: 1.5 hw: drv: intel iris drv: nvidia platforms: device: 0
    drv: nvidia device: 1 drv: iris device: 3 drv: swrast surfaceless:
    drv: nvidia x11: drv: nvidia inactive: gbm,wayland,device-2
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 545.29.06
    glx-v: 1.4 direct-render: yes renderer: NVIDIA GeForce RTX 3060 Laptop
    GPU/PCIe/SSE2 memory: 5.86 GiB
  API: Vulkan v: 1.3.268 layers: 8 device: 0 type: integrated-gpu name: Intel
    Graphics (ADL GT2) driver: mesa intel v: 23.2.1 device-ID: 8086:46a6
    surfaces: xcb,xlib device: 1 type: discrete-gpu name: NVIDIA GeForce RTX
    3060 Laptop GPU driver: nvidia v: 545.29.06 device-ID: 10de:2560
    surfaces: xcb,xlib
Audio:
  Device-1: Intel Alder Lake PCH-P High Definition Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel alternate: snd_sof_pci_intel_tgl
    bus-ID: 00:1f.3 chip-ID: 8086:51c8 class-ID: 0403
  API: ALSA v: k6.6.2-1-default status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: PipeWire v: 1.0.0 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl```

The solution is quite simple. Edit /usr/lib/udev/rules.d/90-nvidia-udev-pm-G06.rules. Comment those three lines as in example below and reboot.

Remove NVIDIA USB xHCI Host Controller devices, if present

#ACTION==β€œadd”, SUBSYSTEM==β€œpci”, ATTR{vendor}==β€œ0x10de”, ATTR{class}==β€œ0x0c0330”, ATTR{remove}=β€œ1”

Remove NVIDIA USB Type-C UCSI devices, if present

#ACTION==β€œadd”, SUBSYSTEM==β€œpci”, ATTR{vendor}==β€œ0x10de”, ATTR{class}==β€œ0x0c8000”, ATTR{remove}=β€œ1”

Remove NVIDIA Audio devices, if present

#ACTION==β€œadd”, SUBSYSTEM==β€œpci”, ATTR{vendor}==β€œ0x10de”, ATTR{class}==β€œ0x040300”, ATTR{remove}=β€œ1”

The sound work now.

1 Like

You should never ever edit anything under /usr. You should copy this file to the /etc/udev/rules.d and edit this copy.

Welp…

Editing either directly over the file in/usr/lib/udev/rules.d/or /etc/udev/rules.d gave me a black screen after reboot, not showing KDE sddm after that.

I agree with you, what you saying is the correct way to do it, but for some reason o system completed ignored the /etc file.

Set prime-select to intel or offload , and test it. But I really don’t have a clue why this happen.