You are not logged in.

#1 2024-03-19 23:09:45

afader
Member
Registered: 2013-09-12
Posts: 162

how can I enable DVI-to-HDMI sink for nvidia in pipewire/wireplumber?

Hi, I have a dual boot machine and in Windows, the HDMI out from my Nvidia card to my LG TV is detected and I can choose it as an output.
This used to work in Linux quite a long time ago but it's been broken for a while. No nvidia card or hdmi show up in pactl, wpctl, or aplay at all.
How can I enable it? Is there a udev rule or wireplumber lua config or something I can do to force the HDMI to be a choice since I know it works?
I know other people on the forums have experienced this issue so it's possibly a bug someplace, perhaps the nvidia driver or the kernel I guess.

Edit: Oh, I should say, in case this helps, that the cable is a pin out of a DVI on one side and HDMI on the other side.

Last edited by afader (2024-03-20 03:37:19)

Offline

#2 2024-03-24 11:57:46

ua4000
Member
Registered: 2015-10-14
Posts: 421

Re: how can I enable DVI-to-HDMI sink for nvidia in pipewire/wireplumber?

We need more details, e.g. which nvidia card exactly, which nvidia kernel driver.

Offline

#3 2024-03-24 18:55:23

afader
Member
Registered: 2013-09-12
Posts: 162

Re: how can I enable DVI-to-HDMI sink for nvidia in pipewire/wireplumber?

Thanks! yes... proprietary nvidia driver, using kms, with nvidia-drm.modeset=1 in kernel cmdline, Driver Version: 550.67 , NVIDIA GeForce RTX 2060, Linux 6.8.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 16 Mar 2024 17:15:35 +0000 x86_64 GNU/Linux, using Wayland, Gnome, motherboard is a ASUS TUF GAMING B460M-PLUS with i9-10850K and I've enable HD Audio in the bios, but disabled integrated graphics.

❯ wpctl status
PipeWire 'pipewire-0' [1.0.4, andrew@obsidian, cookie:1084427374]
 └─ Clients:
        31. uresourced                          [1.0.4, andrew@obsidian, pid:11882]
        32. WirePlumber                         [1.0.4, andrew@obsidian, pid:11958]
        40. WirePlumber [export]                [1.0.4, andrew@obsidian, pid:11958]
        58. gnome-shell                         [1.0.4, andrew@obsidian, pid:11973]
        59. pipewire                            [1.0.4, andrew@obsidian, pid:12979]
        60. GNOME Shell Volume Control          [1.0.4, andrew@obsidian, pid:11973]
        61. GNOME Volume Control Media Keys     [1.0.4, andrew@obsidian, pid:12570]
        62. xdg-desktop-portal                  [1.0.4, andrew@obsidian, pid:12830]
        63. Nightly                             [1.0.4, andrew@obsidian, pid:18546]
        67. Nightly                             [1.0.4, andrew@obsidian, pid:18546]
        76. wpctl                               [1.0.4, andrew@obsidian, pid:27173]

Audio
 ├─ Devices:
 │      41. Built-in Audio                      [alsa]
 │  
 ├─ Sinks:
 │  *   42. Built-in Audio Analog Stereo        [vol: 0.40 MUTED]
 │  
 ├─ Sources:
 │  *   43. Built-in Audio Analog Stereo        [vol: 1.00]
 │  
 ├─ Filters:
 │  
 └─ Streams:

Video
 ├─ Devices:
 │  
 ├─ Sinks:
 │  
 ├─ Sources:
 │  
 ├─ Filters:
 │  
 └─ Streams:

Settings
 └─ Default Configured Devices:
         0. Audio/Sink    alsa_output.pci-0000_00_1f.3.analog-stereo
         1. Audio/Source  alsa_input.usb-Generic_Realtek_Audio_USB_201701110001-00.analog-stereo
❯ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: PCH [HDA Intel PCH], device 0: ALCS1200A Analog [ALCS1200A Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 1: ALCS1200A Digital [ALCS1200A Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Not sure if related but I see this in dmesg

[    3.155536] nvidia: loading out-of-tree module taints kernel.
[    3.155541] nvidia: module license 'NVIDIA' taints kernel.
[    3.155542] Disabling lock debugging due to kernel taint
[    3.155544] nvidia: module verification failed: signature and/or required key missing - tainting kernel
[    3.155544] nvidia: module license taints kernel.
[    3.237195] usb 1-3: new full-speed USB device number 2 using xhci_hcd
[    3.303633] nvidia-nvlink: Nvlink Core is being initialized, major device number 240

[    3.304371] nvidia 0000:01:00.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=none:owns=none
[    3.345255] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  550.67  Tue Mar 12 23:54:15 UTC 2024
[    3.357197] tsc: Refined TSC clocksource calibration: 3600.011 MHz
[    3.357202] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x33e45d8079c, max_idle_ns: 440795324677 ns
[    3.357238] clocksource: Switched to clocksource tsc
[    3.357383] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  550.67  Tue Mar 12 23:29:25 UTC 2024
[    3.359078] [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
[    3.373528] nvidia_uvm: module uses symbols nvUvmInterfaceDisableAccessCntr from proprietary module nvidia, inheriting taint.
[    3.957437] nvidia-uvm: Loaded the UVM driver, major device number 238.
[    4.365001] [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:01:00.0 on minor 0
..
[    7.794429] e1000e 0000:00:1f.6 eno1: renamed from eth0
[    7.953846] snd_hda_codec_realtek hdaudioC1D0: ALCS1200A: SKU not ready 0x00000000
[    7.954622] snd_hda_codec_realtek hdaudioC1D0: autoconfig for ALCS1200A: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:line
[    7.954630] snd_hda_codec_realtek hdaudioC1D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    7.954633] snd_hda_codec_realtek hdaudioC1D0:    hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)
[    7.954636] snd_hda_codec_realtek hdaudioC1D0:    mono: mono_out=0x0
[    7.954638] snd_hda_codec_realtek hdaudioC1D0:    dig-out=0x11/0x0
[    7.954641] snd_hda_codec_realtek hdaudioC1D0:    inputs:
[    7.954646] snd_hda_codec_realtek hdaudioC1D0:      Front Mic=0x19
[    7.954647] snd_hda_codec_realtek hdaudioC1D0:      Rear Mic=0x18
[    7.954651] snd_hda_codec_realtek hdaudioC1D0:      Line=0x1a
[    8.130211] input: HDA Intel PCH Front Mic as /devices/pci0000:00/0000:00:1f.3/sound/card1/input12
[    8.130244] input: HDA Intel PCH Rear Mic as /devices/pci0000:00/0000:00:1f.3/sound/card1/input13
[    8.130281] input: HDA Intel PCH Line as /devices/pci0000:00/0000:00:1f.3/sound/card1/input14
[    8.130310] input: HDA Intel PCH Line Out as /devices/pci0000:00/0000:00:1f.3/sound/card1/input15
[    8.130336] input: HDA Intel PCH Front Headphone as /devices/pci0000:00/0000:00:1f.3/sound/card1/input16

I also tried this as a workaround

> cat /etc/systemd/system/hdmi-audio.service
[Unit]
Description=Enable HDMI audio then reload nvidia module

[Service]
Type=oneshot
ExecStart=/usr/bin/hdmi-audio-workaround

[Install]
WantedBy=basic.target
> cat /usr/bin/hdmi-workaround
cat: /usr/bin/hdmi-workaround: Permission denied
> sudo cat /usr/bin/hdmi-workaround
#!/bin/bash
setpci -s 01:00.0 0x488.l=0x2000000:0x2000000
echo 1 > /sys/bus/pci/devices/0000:01:00.0/remove
echo 1 > /sys/bus/pci/devices/0000:00:01.0/rescan
nvidia-modprobe
exit 0

I suspect maybe the script doesn't work if I change it as follows for this reason

#!/bin/bash
setpci -s 01:00.0 0x488.l=0x2000000:0x2000000
rmmod nvidia-drm nvidia-modeset nvidia-uvm nvidia
echo 1 > /sys/bus/pci/devices/0000:01:00.0/remove
echo 1 > /sys/bus/pci/devices/0000:00:01.0/rescan
nvidia-modprobe
modprobe nvidia-drm nvidia-modeset nvidia-uvm nvidia
exit 0
> sudo hdmi-workaround
rmmod: ERROR: Module nvidia_drm is in use
rmmod: ERROR: Module nvidia_modeset is in use by: nvidia_drm
rmmod: ERROR: Module nvidia is in use by: nvidia_modeset

Last edited by afader (2024-03-24 19:07:51)

Offline

#4 2024-03-25 10:19:09

ua4000
Member
Registered: 2015-10-14
Posts: 421

Re: how can I enable DVI-to-HDMI sink for nvidia in pipewire/wireplumber?

The workaround script is from
https://wiki.archlinux.org/title/NVIDIA … _over_HDMI
right ? But you modified it ?
And did you consider the hint "not running X" during the script ?
I propose to boot the system without GUI, run "aplay -l", run the original script from the wiki, run "aplay -l" and post all inputs + outputs here, maybe + dmesg / journalctl logs.

And: for me it looks not like an issue with PipeWire, as long aplay doesn't show the device.

Offline

#5 2024-03-25 10:22:21

afader
Member
Registered: 2013-09-12
Posts: 162

Re: how can I enable DVI-to-HDMI sink for nvidia in pipewire/wireplumber?

I've tried a number of variations on that script and nothing does anything. But I can try again and post. I use Wayland, not X11. The script does seem to run before the display manager starts, but it doesn't do anything. And it seems like other people it doesn't help them either.

Offline

#6 2024-03-30 03:37:43

afader
Member
Registered: 2013-09-12
Posts: 162

Re: how can I enable DVI-to-HDMI sink for nvidia in pipewire/wireplumber?

Tried this version of the script...

rmmod nvidia-drm nvidia-modeset nvidia-uvm nvidia
setpci -s 01:00.0 0x488.l=0x2000000:0x2000000
echo 1 > /sys/bus/pci/devices/0000:01:00.0/remove
echo 1 > /sys/bus/pci/devices/0000:00:01.0/rescan
modprobe nvidia-drm nvidia-modeset nvidia-uvm nvidia
nvidia-modprobe
exit 0

I think the problem is that it can't actually rmmod the modules because they are in use by the nvidia framebuffer.
Is there any suggestion to fix that?

Offline

Board footer

Powered by FluxBB