Bug 1213052 - Using Pipewire but no audio ouitput to HDMI
Summary: Using Pipewire but no audio ouitput to HDMI
Status: NEW
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: Sound (show other bugs)
Version: Leap 15.5
Hardware: x86-64 openSUSE Leap 15.5
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Takashi Iwai
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-05 18:53 UTC by Chris Wong
Modified: 2023-07-27 12:42 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---
tiwai: needinfo? (viking018-mailbox)


Attachments
output from alas-info (47.91 KB, text/plain)
2023-07-06 16:28 UTC, Chris Wong
Details
output from nvidia-bug-report.sh (567.87 KB, application/gzip)
2023-07-14 14:06 UTC, Chris Wong
Details
dmesg without modprobe.d script (120.22 KB, text/plain)
2023-07-18 07:14 UTC, Chris Wong
Details
dmesg with script applied (143.46 KB, text/plain)
2023-07-18 07:16 UTC, Chris Wong
Details
lastest dmesg output (865.37 KB, text/plain)
2023-07-22 04:58 UTC, Chris Wong
Details
dmesg output with latest hack scripts (145.54 KB, text/plain)
2023-07-22 18:33 UTC, Chris Wong
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Wong 2023-07-05 18:53:20 UTC
Hi,

I had upgraded to Leap 15.5

> uname -a
Linux VikingSrvNew 5.14.21-150500.53-default #1 SMP PREEMPT_DYNAMIC Wed May 10 07:56:26 UTC 2023 (b630043) x86_64 x86_64 x86_64 GNU/Linux

The pipewire does not output audio to my Samsung monitor's built-in speaker via HDMI

> wpctl status
PipeWire 'pipewire-0' [0.3.64, chris@VikingSrvNew, cookie:2511349141]
 └─ Clients:
        31. pasystray                           [0.3.64, chris@VikingSrvNew, pid:3294]
        32. Firefox                             [0.3.64, chris@VikingSrvNew, pid:7143]
        33. PulseAudio systray                  [0.3.64, chris@VikingSrvNew, pid:3294]
        34. wpctl                               [0.3.64, chris@VikingSrvNew, pid:11162]
        35. Firefox                             [0.3.64, chris@VikingSrvNew, pid:7143]

Audio
 ├─ Devices:
 │  
 ├─ Sinks:
 │  
 ├─ Sink endpoints:
 │  
 ├─ Sources:
 │  
 ├─ Source endpoints:
 │  
 └─ Streams:

Video
 ├─ Devices:
 │  
 ├─ Sinks:
 │  
 ├─ Sink endpoints:
 │  
 ├─ Sources:
 │  
 ├─ Source endpoints:
 │  
 └─ Streams:

Settings
 └─ Default Configured Node Names:

> aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [SE790C]
  Subdevices: 1/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

> inxi -GAa
Graphics:
  Device-1: NVIDIA GM204 [GeForce GTX 980] vendor: ASUSTeK driver: nvidia
    v: 535.54.03 alternate: nouveau,nvidia_drm non-free: 520.xx+
    status: current (as of 2022-10) arch: Maxwell code: GMxxx
    process: TSMC 28nm built: 2014-19 pcie: gen: 1 speed: 2.5 GT/s lanes: 16
    link-max: gen: 3 speed: 8 GT/s ports: active: none off: HDMI-A-1
    empty: DP-1, DP-2, DP-3, DVI-I-1 bus-ID: 0a:00.0 chip-ID: 10de:13c0
    class-ID: 0300
  Device-2: Sunplus Innovation Full HD webcam type: USB driver: uvcvideo
    bus-ID: 3-3.3.1:7 chip-ID: 1bcf:2284 class-ID: 0102 serial: AN20200618001
  Display: x11 server: X.Org v: 1.21.1.4 with: Xwayland v: 22.1.5 driver: X:
    loaded: nvidia unloaded: fbdev,modesetting,nouveau,vesa alternate: nv
    gpu: nvidia,nvidia-nvswitch display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3440x1440 s-dpi: 109 s-size: 802x333mm (31.57x13.11")
    s-diag: 868mm (34.19")
  Monitor-1: HDMI-A-1 mapped: HDMI-0 note: disabled model: Samsung SE790C
    serial: H1AK500000 built: 2014 res: 3440x1440 hz: 50 dpi: 110 gamma: 1.2
    size: 797x333mm (31.38x13.11") diag: 864mm (34") modes: max: 3440x1440
    min: 640x480
  API: OpenGL v: 4.6.0 NVIDIA 535.54.03 renderer: NVIDIA GeForce GTX
    980/PCIe/SSE2 direct render: Yes
Audio:
  Device-1: NVIDIA GM204 High Definition Audio vendor: ASUSTeK
    driver: snd_hda_intel bus-ID: 3-3.3.1:7 v: kernel chip-ID: 1bcf:2284 pcie:
    gen: 3 class-ID: 0102 serial: AN20200618001 speed: 8 GT/s lanes: 16
    bus-ID: 0a:00.1 chip-ID: 10de:0fbb class-ID: 0403
  Device-2: Sunplus Innovation Full HD webcam type: USB driver: uvcvideo
  Sound API: ALSA v: k5.14.21-150500.53-default running: yes
  Sound Server-1: PulseAudio v: 15.0 running: no
  Sound Server-2: PipeWire v: 0.3.64 running: yesplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [SE790C]
  Subdevices: 1/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

Also after cold boot the Sink is "Dummy Output" for "GM204 High Definition Audio", when use YaST to re-configure it disappear and no sink being shown in wpctl.

Any advice !

Best Regards
Chris
Comment 1 Takashi Iwai 2023-07-06 13:14:14 UTC
Please don't use YaST sound module.  For modern systems, it rather often breaks things.  Check /etc/modprobe.d/*, and remove a file if it's created by YaST sound module.

Then boot again.  Run alsa-info.sh script with --no-upload option as root, and attach the output to Bugzilla (don't paste).
Comment 2 Chris Wong 2023-07-06 16:28:47 UTC
Created attachment 868042 [details]
output from alas-info

Please find attached the output of alsa-info.sh
Comment 3 Takashi Iwai 2023-07-10 07:30:04 UTC
The kernel log shows:
[    1.227909] snd_hda_intel 0000:0a:00.1: Cannot probe codecs, giving up

Is it something to do with the default setup of SUSE-prime?
  https://github.com/openSUSE/SUSEPrime

Check the section "HDMI audio support does not work".
Comment 4 Chris Wong 2023-07-10 18:10:53 UTC
Hi,

There is no 90-nvidia-udev-pm-G05.rules script under /usr/lib/udev/rules.d on my system.

So I cannot do what is suggested under "HDMI audio support does not work" that is being mention in "https://github.com/openSUSE/SUSEPrime".

Also prime-select is not being install on my system.

Best Regards
Chris
Comment 5 Takashi Iwai 2023-07-11 06:17:02 UTC
OK, but it still smells like a setup problem of Nvidia driver.
Adding Stefan to Cc.
Comment 6 Stefan Dirsch 2023-07-11 07:58:18 UTC
I see only one graphics card, so there is no need to have suse-prime package installed. Therefore there is no /usr/lib/udev/rules.d/90-nvidia-udev-pm-G05.rules installed, which would disable HDMI audio by default. So this issue needs to have a different reason.
Comment 7 Stefan Dirsch 2023-07-11 08:07:31 UTC
NVIDIA's driver README refers to 

https://download.nvidia.com/XFree86/gpu-hdmi-audio-document/

Not sure whether this is useful. It's obviously old information from 2014.
Comment 8 Chris Wong 2023-07-14 14:06:28 UTC
Created attachment 868218 [details]
output from nvidia-bug-report.sh
Comment 9 Chris Wong 2023-07-16 09:40:00 UTC
Hi,

I had found a workaround after boot as follow

  1. YaST delete current GM204 audio
  2. YaST re-initialise GM204 audio
  3. systemctl --user restart pipewire.service

Best Regards
Chris
Comment 10 Takashi Iwai 2023-07-17 09:47:13 UTC
Then this might be related with the power management of Nvidia chip.

Could you try to add a file /etc/modprobe.d/60-hda-softdep.conf containing the line:
  softdep snd-hda-intel pre: nvidia

then reboot/retest?
Comment 11 Chris Wong 2023-07-18 05:52:24 UTC
Hi 

No change after reboot with the new script in /etc/modprobe.d, below is the output of wpctl

wpctl status
PipeWire 'pipewire-0' [0.3.64, chris@VikingSrvNew, cookie:1613439557]
 └─ Clients:
        31. pipewire-pulse                      [0.3.64, chris@VikingSrvNew, pid:3688]
        33. PulseAudio systray                  [0.3.64, chris@VikingSrvNew, pid:3395]
        34. WirePlumber                         [0.3.64, chris@VikingSrvNew, pid:3687]
        35. WirePlumber [export]                [0.3.64, chris@VikingSrvNew, pid:3687]
        53. Firefox                             [0.3.64, chris@VikingSrvNew, pid:3296]
        54. wpctl                               [0.3.64, chris@VikingSrvNew, pid:5487]

Audio
 ├─ Devices:
 │      44. Full HD webcam                      [alsa]
 │  
 ├─ Sinks:
 │  *   32. Dummy Output                        [vol: 1.00]
 │  
 ├─ Sink endpoints:
 │  
 ├─ Sources:
 │  *   51. Full HD webcam Mono                 [vol: 1.00]
 │  
 ├─ Source endpoints:
 │  
 └─ Streams:

Video
 ├─ Devices:
 │      41. Full HD webcam                      [v4l2]
 │      42. Full HD webcam                      [v4l2]
 │      43. OBS Virtual Camera                  [v4l2]
 │  
 ├─ Sinks:
 │  
 ├─ Sink endpoints:
 │  
 ├─ Sources:
 │  *   45. Full HD webcam (V4L2)              
 │  
 ├─ Source endpoints:
 │  
 └─ Streams:

Settings
 └─ Default Configured Node Names:
         0. Audio/Sink    alsa_output.pci-0000_0a_00.1.hdmi-stereo
         1. Audio/Source  alsa_input.usb-Sunplus_IT_Co_Full_HD_webcam_AN20200618001-02.mono-fallback

Best Regards
Chris
Comment 12 Takashi Iwai 2023-07-18 05:56:50 UTC
Please give the dmesg output, at best from both the boot with the modprobe.d hack and another boot without the hack.
Comment 13 Chris Wong 2023-07-18 07:14:48 UTC
Created attachment 868271 [details]
dmesg without modprobe.d script

dmesg output with no modprobe.d script applied.
Comment 14 Chris Wong 2023-07-18 07:16:03 UTC
Created attachment 868272 [details]
dmesg with script applied

dmesg output with modprobe.d script hack
Comment 15 Takashi Iwai 2023-07-18 12:45:20 UTC
Thanks.  So nvidia module itself gets loaded before snd-hda-intel module.  But this still might be some timing issue.

Remove the previous modprobe.d entry, and create another one containing the following line:

install snd-hda-intel sleep 3; /sbin/modprobe --ignore-install snd-hda-intel $CMDLINE_OPTS

This hackish workaround will delay the load of HD-audio module forcibly for 3 seconds.  Let's see whether this helps or not.
Comment 16 Chris Wong 2023-07-19 08:57:29 UTC
Hi,

Do you mean create a new script in /etc/modprobe.d ?
What will be the "number" use to start the script name ?

Best Regards
Chris
Comment 17 Takashi Iwai 2023-07-19 09:40:23 UTC
The file name doesn't matter much as long as it contains ".conf" extension.
You can keep the same file or create a new one as you like.
Comment 18 Chris Wong 2023-07-22 04:58:02 UTC
Created attachment 868374 [details]
lastest dmesg output

Hi,

Please find attached is the latest dmesg output with new hack script.
Same as before wirepipe do not recognise the Nvidia audio.

Best Regards
Chris
Comment 19 Takashi Iwai 2023-07-22 06:49:10 UTC
Hm, the whole process seemed just shifted instead of only this one.
What if you add the previous softdep config in addition?

Also, when you change the sleep 3 to a longer value, e.g. sleep 10, how is the effect?

Last but not least, drop all those modprobe.d configs again, add the following instead:
  blacklist snd-hda-intel

This will disable HD-audio loading.  Then load the module manually after the boot.  Does it work?  If yes, it means the problem is the timing of the device initialization.
Comment 20 Chris Wong 2023-07-22 18:33:07 UTC
Created attachment 868378 [details]
dmesg output with latest hack scripts

Delay install and softdep does not work.
But blacklist snd_hda_intel then reload it after boot finish work, so I will write a script to do "modprobe snd_hda_intel" for workaround.

Best Regards
Chris