No Audio over HDMI with Nvidia GT1030 and BenQ 3270u monitor on Ubuntu 18.04

Hi, I have assembled a computer using the

  1. Zotac - GeForce GT 1030 2 GB Video Card
  2. BenQ - EW3270U 31.5" 3840x2160 60 Hz Monitor
  3. Ubuntu 18.04

There seems to be no audio via the speakers (or headphones connected to these speakers) inside the monitor. The monitor is connected to the graphics card via HDMI cable. I have installed the drivers found on https://www.nvidia.com/Download/driverResults.aspx/145182/en-us.
My colleague has the exact same configuration and the speakers work fine for him. This looks like a misconfiguration issue to me.

nvidia-report-bug.log.gz => https://drive.google.com/file/d/1G8Su2_U2ZyA7rx39ER6bgOZeejLsYLif/view?usp=sharing

I have checked the following

  1. If the correct speakers are selected in the sound options.
  2. The speakers are not muted via the monitor or the operator system.
  3. I have tried the test speakers thing in sound setting but I get no sound.

According to the logs, the sound output of your monitor is detected and enabled fine:

*** /proc/asound/card0/eld#0.0
monitor_present		1
eld_valid		1
monitor_name		BenQ EW3270U

connection_type		HDMI
eld_version		[0x2] CEA-861D or below
edid_version		[0x3] CEA-861-B, C or D
manufacture_id		0xd109
product_id		0x7950
port_id			0x200
support_hdcp		0
support_ai		0
audio_sync_delay	0
speakers		[0x1] FL/FR
sad_count		1
sad0_coding_type	[0x1] LPCM
sad0_channels		2
sad0_rates		[0xe0] 32000 44100 48000
sad0_bits		[0xe0000] 16 20 24

Did you check the monitor’s OSD if sound volume is either muted or output switched to headphones or the like?

Did you check the monitor’s OSD if sound volume is either muted or output switched to headphones or the like?

I’m sorry, I do not what an OSD is. I have checked the volume of the monitor and it’s set the max. I also plugged in my headphones into the audio out jack on the monitor but it also didn’t work.

Is there something else we can try to debug the issue?

OSD = On-Screen Display, just the menu of the monitor.
Please run
pactl list >pactl.txt
and attach the output file.
Also, please play some music, then start pavucontrol and check if the application uses the correct output.

I have played music and the output is set to the correct HDMI device but still no sound.

Pactl list => https://drive.google.com/file/d/1EwrVNHSbXN8zukCsOYv71tSOFHjjV_at/view?usp=sharing
Pavucontrol => https://drive.google.com/file/d/1Udk4DyUgA7FtBDZrJlVaFlusvDJu5206/view?usp=sharing
alsamixer => https://drive.google.com/file/d/1dLqDIL38rhVUHYc8b5KPAkMn7dzIfoWF/view?usp=sharing
The controls in alsamixer seem to be empty for the nvidia device but there were controls for the other device (the intel motherboard device). Is this expected?

Alsamixer just showing s/pdif switches is normal, hdmi doesn’t have much more controls.
More noteworthy is the fact that pactl list shows ‘state: SUSPENDED’ for the hdmi output. Looks more like a pulseaudio problem.

More noteworthy is the fact that pactl list shows ‘state: SUSPENDED’ for the hdmi output. Looks more like a pulseaudio problem.

Interesting, is there any way to pull more detailed logs from pulseaudio?

You could set
log-level = debug
in
/etc/pulse/daemon.conf
and reboot. Afterwards, use journalctl to get the logs, like
sudo journalctl -b0 --no-pager |grep pulse
You could also check if commenting out
load-module module-stream-restore
in
/etc/pulse/default.pa and /etc/pulse/system.pa
changes anything, at least I had a bug with that module always putting output streams on dead devices.

sudo journalctl -b0 --no-pager |grep pulse

gives me

Apr 29 14:52:33 ibrahim-MS-7C02 dbus-daemon[803]: [system] Activating via systemd: service name='org.freedesktop.RealtimeKit1' unit='rtkit-daemon.service' requested by ':1.51' (uid=123 pid=1485 comm="/usr/bin/pulseaudio --daemonize=no " label="unconfined")

So I started it with

➜  ~ pulseaudio --start
N: [pulseaudio] main.c: User-configured server at {0056fa3a78c3494cb31020c6f052a16d}unix:/run/user/1000/pulse/native, which appears to be local. Probing deeper.

I thought it didn’t start so I tried starting it once again

➜  ~ pulseaudio --start --verbose
N: [pulseaudio] main.c: User-configured server at {0056fa3a78c3494cb31020c6f052a16d}unix:/run/user/1000/pulse/native, which appears to be local. Probing deeper.
I: [pulseaudio] main.c: Daemon startup successful.

Now I see this

➜  ~ sudo journalctl -b0 --no-pager | grep pulse                 
Apr 29 14:52:33 ibrahim-MS-7C02 dbus-daemon[803]: [system] Activating via systemd: service name='org.freedesktop.RealtimeKit1' unit='rtkit-daemon.service' requested by ':1.51' (uid=123 pid=1485 comm="/usr/bin/pulseaudio --daemonize=no " label="unconfined")
Apr 29 15:00:22 ibrahim-MS-7C02 pulseaudio[4690]: Daemon already running.
Apr 29 15:00:42 ibrahim-MS-7C02 pulseaudio[4706]: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
Apr 29 15:00:42 ibrahim-MS-7C02 pulseaudio[4706]: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
Apr 29 15:00:42 ibrahim-MS-7C02 pulseaudio[4706]: Successfully gained nice level -11.
Apr 29 15:00:42 ibrahim-MS-7C02 pulseaudio[4706]: This is PulseAudio 12.2
Apr 29 15:00:42 ibrahim-MS-7C02 pulseaudio[4706]: Page size is 4096 bytes
Apr 29 15:00:42 ibrahim-MS-7C02 pulseaudio[4706]: Machine ID is 0056fa3a78c3494cb31020c6f052a16d.
Apr 29 15:00:42 ibrahim-MS-7C02 pulseaudio[4706]: Session ID is 3.
Apr 29 15:00:42 ibrahim-MS-7C02 pulseaudio[4706]: Using runtime directory /run/user/1000/pulse.
Apr 29 15:00:42 ibrahim-MS-7C02 pulseaudio[4706]: Using state directory /home/ibrahim/.config/pulse.
Apr 29 15:00:42 ibrahim-MS-7C02 pulseaudio[4706]: Using modules directory /usr/lib/pulse-12.2/modules.
Apr 29 15:00:42 ibrahim-MS-7C02 pulseaudio[4706]: Running in system mode: no
Apr 29 15:00:42 ibrahim-MS-7C02 pulseaudio[4706]: Daemon already running.
Apr 29 15:03:28 ibrahim-MS-7C02 sudo[4903]:  ibrahim : TTY=pts/1 ; PWD=/home/ibrahim ; USER=root ; COMMAND=/bin/systemctl status pulseaudio

You could also check if commenting out
load-module module-stream-restore
in
/etc/pulse/default.pa and /etc/pulse/system.pa

I tried this but nothing changed. I still have no audio and

pactl list

shows hdmi audio as suspended.

Sink #0
	State: SUSPENDED
	Name: alsa_output.pci-0000_1c_00.1.hdmi-stereo
	Description: GP108 High Definition Audio Controller Digital Stereo (HDMI)
	Driver: module-alsa-card.c
	Sample Specification: s16le 2ch 44100Hz
	Channel Map: front-left,front-right
	Owner Module: 6
	Mute: no
	Volume: front-left: 48493 /  74% / -7.85 dB,   front-right: 48493 /  74% / -7.85 dB
	        balance 0.00
	Base Volume: 65536 / 100% / 0.00 dB
	Monitor Source: alsa_output.pci-0000_1c_00.1.hdmi-stereo.monitor
	Latency: 0 usec, configured 0 usec
	Flags: HARDWARE DECIBEL_VOLUME LATENCY SET_FORMATS 
	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 = "0"
		alsa.card_name = "HDA NVidia"
		alsa.long_card_name = "HDA NVidia at 0xf7080000 irq 77"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:1c:00.1"
		sysfs.path = "/devices/pci0000:00/0000:00:03.1/0000:1c:00.1/sound/card0"
		device.bus = "pci"
		device.vendor.id = "10de"
		device.vendor.name = "NVIDIA Corporation"
		device.product.id = "0fb8"
		device.product.name = "GP108 High Definition Audio Controller"
		device.string = "hdmi:0"
		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 = "GP108 High Definition Audio Controller Digital Stereo (HDMI)"
		alsa.mixer_name = "Nvidia GPU 81 HDMI/DP"
		alsa.components = "HDA:10de0081,19da2476,00100100"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	Ports:
		hdmi-output-0: HDMI / DisplayPort (priority: 5900, available)
	Active Port: hdmi-output-0
	Formats:
		pcm

Source #0
	State: SUSPENDED
	Name: alsa_output.pci-0000_1c_00.1.hdmi-stereo.monitor
	Description: Monitor of GP108 High Definition Audio Controller Digital Stereo (HDMI)
	Driver: module-alsa-card.c
	Sample Specification: s16le 2ch 44100Hz
	Channel Map: front-left,front-right
	Owner Module: 6
	Mute: no
	Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	Base Volume: 65536 / 100% / 0.00 dB
	Monitor of Sink: alsa_output.pci-0000_1c_00.1.hdmi-stereo
	Latency: 0 usec, configured 0 usec
	Flags: DECIBEL_VOLUME LATENCY 
	Properties:
		device.description = "Monitor of GP108 High Definition Audio Controller Digital Stereo (HDMI)"
		device.class = "monitor"
		alsa.card = "0"
		alsa.card_name = "HDA NVidia"
		alsa.long_card_name = "HDA NVidia at 0xf7080000 irq 77"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:1c:00.1"
		sysfs.path = "/devices/pci0000:00/0000:00:03.1/0000:1c:00.1/sound/card0"
		device.bus = "pci"
		device.vendor.id = "10de"
		device.vendor.name = "NVIDIA Corporation"
		device.product.id = "0fb8"
		device.product.name = "GP108 High Definition Audio Controller"
		device.string = "0"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	Formats:
		pcm

Did you set log_level = debug in daemon.conf?
You can try to test the output manually, run
pacmd
then enter
load-sample test /usr/share/sounds/alsa/Front_Center.wav (or any other .wav file if not available)
play-sample test 0

Did you set log_level = debug in daemon.conf?
My bad, I forgot to set it.
Here’s the output after setting the correct log level
https://drive.google.com/file/d/18g9V8UXfHK4pzIzDXNQ09NpY7j9bK0lJ/view?usp=sharing

Logs look fine, the HDMI sink is suspended because it doesn’t have a stream to play.
Did you do the manual test?

Yes, I did the manual test but there was no sound.

Here’s the log of “sudo journalctl -b0 --no-pager | grep pulse” after running the sample
https://drive.google.com/file/d/1cwzc5su7kKxjGxnWASkmn52gBC7RWeWV/view?usp=sharing

I can’t see any error, the sample gets played on the hdmi sink, the sink changes to state : RUNNING, afterwards returnes to IDLE. Is your monitor simply broken?

No, the monitor seems to be fine. I connected the monitor to my laptop via HDMI and I could play music on monitor speakers.

I really don’t know what’s going on, then. Software-side looks perfectly fine. Last thing I can come up with is to use audacious and configure it to use alsa and the hdmi device directly to check if there is an underlying problem.

Last thing I can come up with is to use audacious and configure it to use alsa and the hdmi device directly to check if there is an underlying problem.

No luck with this too. I tried a few devices from the list with alsa but still no audio. :(

Could it be possible that I have not connected the graphics card properly to the motherboard?

No, there’s nothing more to this than plugging it correctly into the pcie slot, otherwise the gpu would fail to work completely. Might be some very odd hw defect of the graphics card but I even doubt that. Since you mentioned your colleague having the same setup, ever tried swapping cards?

I found the issue. So the speaker in the monitor doesn’t work if I set the resolution to 2560x1600 (16:10). The speakers works fine if set any other resolution.

This looks like a bug in the driver to me.