Bug 1684943 - Sound over HDMI not working. [NEEDINFO]
Summary: Sound over HDMI not working.
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 29
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jaroslav Kysela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-03 23:25 UTC by Honza Brázdil
Modified: 2019-08-20 17:43 UTC (History)
19 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
jforbes: needinfo? (jbrazdil)


Attachments (Terms of Use)
alsa-info.sh output (62.87 KB, text/plain)
2019-03-03 23:25 UTC, Honza Brázdil
no flags Details
alsa-info without AMDGPU (62.97 KB, text/plain)
2019-03-11 21:28 UTC, Honza Brázdil
no flags Details

Description Honza Brázdil 2019-03-03 23:25:52 UTC
Created attachment 1540420 [details]
alsa-info.sh output

I have two devices connected through my graphics card, only one is playing sound.

First one is monitor over DisplayPort (HDMI / DisplayPort - Hawaii HDMI Audio [Radeon R9 290/290X / 390/390X]) and sound is working. The second one is receiver connected over HDMI (HDMI / DisplayPort 6 - Hawaii HDMI Audio [Radeon R9 290/290X / 390/390X]) and sound is not working.

Recently it worked, but then it got from bad to worse. I think in Fedora 27 everything worked fine and my system picked used the HDMI whenever I turned the receiver on. When I upgraded to F28, I had to manualy select correct output in the Gnome Shell Sound settings and sometimes the correct output would not even show and I needed to do a rebbot.
Then I bought new monitor and after a bit of struggling everything was working like with the old monitor, but I could also use the new monitor to play sound (previus one didn't have speakers).
Then I upgraded to F29 and it seemd to work still the same for a day or two, but now I can't get any sound through the receiver via HDMI. I can still select it in the Sound settings, but no sound is going through. Restart nor unplug/plug doesn't work.

I have Radeon R9 390 graphic card with AMDGPU drivers enabled (radeon.cik_support=0 amdgpu.cik_support=1). I also tried to enable DC (amdgpu.dc=1) but without any effect.

Comment 1 Jaroslav Kysela 2019-03-11 09:01:51 UTC
It looks like a kernel bug (graphics or audio driver).

Comment 2 Jaroslav Kysela 2019-03-11 09:12:31 UTC
Could you comment / attach the working / non-working output from alsa-info.sh ?

From the already attached log, the two monitors are detected by the audio driver:


	control.1 {
		iface CARD
		name 'HDMI/DP,pcm=3 Jack'
		value true
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.6 {
		iface PCM
		device 3
		name ELD
		value '100008000d1400019e8558554994980d09d1507942656e51204557333237305500090707'
		comment {
			access 'read volatile'
			type BYTES
			count 36
		}
	}

	control.31 {
		iface CARD
		name 'HDMI/DP,pcm=11 Jack'
		value true
		comment {
			access read
			type BOOLEAN
			count 1
		}
	}
	control.36 {
		iface PCM
		device 11
		name ELD
		value '10000b000e40004f9e8558554994980d3dcb010054582d53523637342020202020000f1f071707503707503f07c00000'
		comment {
			access 'read volatile'
			type BYTES
			count 48
		}
	}

Perhaps, you may try give a test using the pure ALSA tools:

  speaker-test -D plug:hdmi:0
  speaker-test -D plug:hdmi:5

Comment 3 Honza Brázdil 2019-03-11 09:47:23 UTC
The attached alsa-info.sh output is "non-working", I can't provide "working" output, because it's never working now.



Neither of the commands produced any sound (tried it without and also with sudo)

$ speaker-test -D plug:hdmi:0

speaker-test 1.1.8

Playback device is plug:hdmi:0
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Playback open error: -2,No such file or directory

$ speaker-test -D plug:hdmi:5

speaker-test 1.1.8

Playback device is plug:hdmi:5
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
ALSA lib confmisc.c:767:(parse_card) cannot find card '5'
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4568:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM hdmi:5
Playback open error: -2,No such file or directory

Comment 4 Jaroslav Kysela 2019-03-11 15:21:46 UTC
Sorry, try:

  speaker-test -c 2 -D hdmi:1,0
  speaker-test -c 2 -D hdmi:1,5

Comment 5 Honza Brázdil 2019-03-11 21:20:41 UTC
  speaker-test -c 2 -D hdmi:1,0
Outputs sound through the monitor fine.

  speaker-test -c 2 -D hdmi:1,5
No sound can be heard via the receiver. (I tested in Windows, there the reveiver and connection from PC works fine.)

$ speaker-test -c 2 -D hdmi:1,5

speaker-test 1.1.8

Playback device is hdmi:1,5
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 1048576
Period size range from 32 to 524288
Using max buffer size 1048576
Periods = 4
was set period_size = 262144
was set buffer_size = 1048576
 0 - Front Left
 1 - Front Right
Time per period = 11,008152
 0 - Front Left
 1 - Front Right
Time per period = 11,013990
 0 - Front Left
^C 1 - Front Right
Time per period = 0,637198

Comment 6 Honza Brázdil 2019-03-11 21:28:04 UTC
Created attachment 1543046 [details]
alsa-info without AMDGPU

I disabled AMDGPU drivers (and enabled radeon drivers) by removing "radeon.cik_support=0 amdgpu.cik_support=1 amdgpu.dc=1" and tried it. No change except that now I see the output as "HDMI / DisplayPort 2" instead of "HDMI / DisplayPort 6".

Comment 7 Jaroslav Kysela 2019-03-12 07:34:47 UTC
If the HDMI sound device number changes, you need to use the correct value for the speaker-test (for the second monitor):

  speaker-test -c 2 -D hdmi:1,1

Comment 8 Honza Brázdil 2019-03-12 11:09:52 UTC
As I was not sure how to determine the device number I tried hdmi:1,0 through hdmi:1,6, only the one monitor output sound.

Comment 9 Honza Brázdil 2019-03-29 15:27:14 UTC
I'm on kernel 5.0.4-200.fc29.x86_64 now and the issue is still present. Can I do anything more to help solving this?

Comment 10 Justin M. Forbes 2019-08-20 17:43:04 UTC
*********** MASS BUG UPDATE **************

We apologize for the inconvenience.  There are a large number of bugs to go through and several of them have gone stale.  Due to this, we are doing a mass bug update across all of the Fedora 29 kernel bugs.

Fedora 29 has now been rebased to 5.2.9-100.fc29.  Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.

If you have moved on to Fedora 30, and are still experiencing this issue, please change the version to Fedora 30.

If you experience different issues, please open a new bug report for those.


Note You need to log in before you can comment on or make changes to this bug.