T420 Optimus no sound through DisplayPort

I have a Thinkpad T420 with Nvidia Optimus. I have been successful in installing Leap 15.3 with Nvidia drivers. Video over Displayport works with the Nvidia-settings configured. Though I don’t get the sound to work over DisplayPort. This seems to be a known issue:

https://forums.developer.nvidia.com/t/gtx-1060-no-audio-over-hdmi-only-hda-intel-detected-azalia/53463/12
https://forums.linuxmint.com/viewtopic.php?t=288514
https://forums.developer.nvidia.com/t/no-hdmi-sound-no-nvidia-sound-card-found/49210/6
https://forums.developer.nvidia.com/t/no-hdmi-sound-w-optimus-in-linux/30785

lspci -H 1 does report the device from the get-go, but I’m not able to activate it for some reason.

The command echo 1 > /sys/bus/pci/devices/0000:00:01.0/remove seems to stall, so I does not make sense to rescan at all.

When I turn off Optimus in the BIOS:

  • Display: Discrete
  • Enable OPTIMUS detection: Disabled

openSUSE does not want to boot at all.

Changing the BIOS to:

  • Display: Integrated
  • Enable OPTIMUS detection: Disabled

openSUSE does boot, but the audio device is not found with lspci -H 1

Chaning the BIOS to:

  • Display: Discrete (or NVIDIA OPTIMUS)
  • Enable OPTIMUS detection: Enabled

openSUSE boots, but the Nvidia audio device is not enabled. It is seen when executing lscpi -H 1

I have the 390.44 Nvidia drivers installed.

What can I do to get sound going or where can I look for more detail as to why the Nvidia device is not recognised as audio output?

lscpi -H 1 output:

00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (Lewisville) (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4)
00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b4)
00:1c.3 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4 (rev b4)
00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b4)
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation QM67 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port Mobile SATA AHCI Controller (rev 04)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation GF119M [Quadro NVS 4200M] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GF119 HDMI Audio Controller (rev a1)
03:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8188CE 802.11b/g/n WiFi Adapter (rev 01)
0d:00.0 System peripheral: Ricoh Co Ltd MMC/SD Host Controller (rev 08)

At 01:00.1 the audio device is visible.

I have sound working through Displayport.
I re-installed Leap 15.3 and noticed that sound output was available through DP.
I installed the Nvidia drivers -> DP output was gone after reboot.
I deleted Nvidia drivers -> DP output is back.
Now I have sound, but image quality is poor with the Nouveau driver.