audio-switcher
audio-switcher copied to clipboard
Nvidia dual screen missing device
Hello,
This is a tricky one that has been bothering me for a few months. I finally decided to look into it.
Running Ubuntu 18.04, I have an Nvidia GPU using proprietary driver with 2 identical HDMI monitors including audio output. From the System Settings, in sound, I see 2 devices. In audio-switcher, the two HDMI audio out are shown as only one device. The only way to properly select which monitor I want the audio to come from is to use System Settings.
I do not know the first thing about Audio and how it's managed, but I saw something called a "sink" mentioned in the code. I looked in PulseAudio, and there's only one sink for HDMI output:
- index: 0 name: <alsa_output.pci-0000_01_00.1.hdmi-stereo> driver: <module-alsa-card.c> flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY state: SUSPENDED suspend cause: IDLE priority: 9030 volume: front-left: 49808 / 76% / -7,15 dB, front-right: 49808 / 76% / -7,15 dB balance 0,00 base volume: 65536 / 100% / 0,00 dB volume steps: 65537 muted: no current latency: 0,00 ms max request: 0 KiB max rewind: 0 KiB monitor source: 0 sample spec: s16le 2ch 48000Hz channel map: front-left,front-right Stereo used by: 0 linked by: 1 configured latency: 0,00 ms; range is 0,50 .. 341,33 ms card: 0 <alsa_card.pci-0000_01_00.1> module: 7 properties: alsa.resolution_bits = "16" device.api = "alsa" device.class = "sound" alsa.class = "generic" alsa.subclass = "generic-mix" alsa.name = "HDMI 0" alsa.id = "HDMI 0" alsa.subdevice = "0" alsa.subdevice_name = "subdevice #0" alsa.device = "3" alsa.card = "2" alsa.card_name = "HDA NVidia" alsa.long_card_name = "HDA NVidia at 0xdf080000 irq 17" alsa.driver_name = "snd_hda_intel" device.bus_path = "pci-0000:01:00.1" sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card2" device.bus = "pci" device.vendor.id = "10de" device.vendor.name = "NVIDIA Corporation" device.product.id = "10f0" device.product.name = "GP104 High Definition Audio Controller" device.string = "hdmi:2" device.buffering.buffer_size = "65536" device.buffering.fragment_size = "32768" device.access_mode = "mmap+timer" device.profile.name = "hdmi-stereo" device.profile.description = "Digital Stereo (HDMI)" device.description = "GP104 High Definition Audio Controller Digital Stereo (HDMI)" alsa.mixer_name = "Nvidia GPU 83 HDMI/DP" alsa.components = "HDA:10de0083,14623301,00100100" module-udev-detect.discovered = "1" device.icon_name = "audio-card-pci" ports: hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: yes) properties: device.icon_name = "video-display" device.product.name = "VG245 " active port:
After I manually select the other HDMI audio out from system menu, the Sink is replaced by this new one (I have 2 other irrelevant audio outputs, the new sink is added at the end of the index, so it's getting index 3):
- index: 3 name: <alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1> driver: <module-alsa-card.c> flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY state: IDLE suspend cause: priority: 9030 volume: front-left: 49808 / 76% / -7,15 dB, front-right: 49808 / 76% / -7,15 dB balance 0,00 base volume: 65536 / 100% / 0,00 dB volume steps: 65537 muted: no current latency: 64,86 ms max request: 14 KiB max rewind: 64 KiB monitor source: 4 sample spec: s16le 2ch 48000Hz channel map: front-left,front-right Stereo used by: 0 linked by: 1 configured latency: 75,00 ms; range is 0,50 .. 341,33 ms card: 0 <alsa_card.pci-0000_01_00.1> module: 7 properties: alsa.resolution_bits = "16" device.api = "alsa" device.class = "sound" alsa.class = "generic" alsa.subclass = "generic-mix" alsa.name = "HDMI 1" alsa.id = "HDMI 1" alsa.subdevice = "0" alsa.subdevice_name = "subdevice #0" alsa.device = "7" alsa.card = "2" alsa.card_name = "HDA NVidia" alsa.long_card_name = "HDA NVidia at 0xdf080000 irq 17" alsa.driver_name = "snd_hda_intel" device.bus_path = "pci-0000:01:00.1" sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card2" device.bus = "pci" device.vendor.id = "10de" device.vendor.name = "NVIDIA Corporation" device.product.id = "10f0" device.product.name = "GP104 High Definition Audio Controller" device.string = "hdmi:2,1" device.buffering.buffer_size = "65536" device.buffering.fragment_size = "32768" device.access_mode = "mmap+timer" device.profile.name = "hdmi-stereo-extra1" device.profile.description = "Digital Stereo (HDMI 2)" device.description = "GP104 High Definition Audio Controller Digital Stereo (HDMI 2)" alsa.mixer_name = "Nvidia GPU 83 HDMI/DP" alsa.components = "HDA:10de0083,14623301,00100100" module-udev-detect.discovered = "1" device.icon_name = "audio-card-pci" ports: hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: yes) properties: device.icon_name = "video-display" device.product.name = "VG245 " active port:
At this point I've decided to come here and ask for you help/advices. Anybody here knows how I can modify the extensions in order to have both HDMI output displayed?
Same problem here.