Ryzen 3 3200g, Ubuntu 18.04.4, no HDMI sound

For discussion related to MythTV which doesn't belong in another forum.

Moderator: Forum Moderators

Post Reply
mathog
Senior
Posts: 125
Joined: Thu Dec 15, 2016 5:22 pm
United States of America

Ryzen 3 3200g, Ubuntu 18.04.4, no HDMI sound

Post by mathog »

Same system as the preceding post. When it plays to the 720p TV over HDMI there is no sound. Hmm, is there any sound at all? lspci -k
shows two audio devices:

Code: Select all

06:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device 15de
	Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Device 15de
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
06:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Device 15e3
	Subsystem: Gigabyte Technology Co., Ltd Device a182
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
and

Code: Select all

ps -ef | grep puls
david     4777  1377  0 21:46 ?        00:00:00 /usr/bin/pulseaudio --start --log-target=syslog
but try and run pavucontrol and it says:

Code: Select all

Connection to PulseAudio failed.  Automatic retry in 5s.
In this case this is likely because PULSE_SEVER in the Environment/X11 Root Window Properties or default-server in client.conf is misconfigured.
This situation can also arise when PulseAudio crashed and left stale details in the X11 Root Window.
If this is the case, then PluseAudio should autospawn again, or if this is not configured you should run start-pulseaudio-x11 manually.
Run "PulseAudio Volume Control" from "multimedia" and it shows two entries on the "output devices" tab:

Code: Select all

HD-Audio Generic Digital Stereo (IEC958)
  port Digital Output (S/PDIF)
HD-Audio Generic Digital Stereo (HDMI)
  port HDMI/Displayport (unplugged)
On my laptop there is a device "built in Audio analog stereo", shouldn't there be something like that here too?

Open up firefox and play a video. Go to playback tab and set the Firefox audio stream to the HDMI device. No sound out of the TV.
Nothing comes out of the headphone jack, but that isn't S/PDIF I think.

Ugh. If video plays for a couple of minutes on MythTV that locks up. If it plays for 30s or so on Firefox the whole computer locks up. Setting the memory speed back down to default of 2140 MHz, from the XMP speed of 3200 MHz (the memory is rated for 3200 but...)
Reboot.

Ok, that is just BIZARRE. Now the audio devices are:

Code: Select all

HD-Audio Generic Analog Stereo 
  port headphones (unplugged)
HD-Audio Generic Digital Stereo (HDMI)
  port HDMI/Displayport (unplugged)
But the headphones are in fact plugged in (on the port on the back of the motherboard). And sound is coming through them. Plug in
a set of USB headphones and they show up and sound comes through them too. MythTV frontend can play sound through either of those headphones too, but not to the TV.

Come to think of it, I don't have a positive control for sound through HDMI on that TV. It has only ever been used before as a computer monitor. Odd though that that HMDI port always shows as "unplugged".
mathog
Senior
Posts: 125
Joined: Thu Dec 15, 2016 5:22 pm
United States of America

Re: Ryzen 3 3200g, Ubuntu 18.04.4, no HDMI sound

Post by mathog »

Just to close this out, once the newer kernel (5.3.0-59) was installed on 18.04.4 and rebooted X11 correctly loaded amdgpu and sound out through HDMI started working.
mathog
Senior
Posts: 125
Joined: Thu Dec 15, 2016 5:22 pm
United States of America

Re: Ryzen 3 3200g, Ubuntu 18.04.4, no HDMI sound

Post by mathog »

Un-closing this out. If the DVR is started before the TV amdgpu loads but it has no HDMI sound device. Easy enough to fix by restarting lightdm after the TV is on but it would be nice if it did not do that. Probably I need to force X11 to use the TV's EDID. No problem downloading that, but how to get the current version of the X11 server to load it ONLY IF it does not see a real device on the HDMI port?
mathog
Senior
Posts: 125
Joined: Thu Dec 15, 2016 5:22 pm
United States of America

Re: Ryzen 3 3200g, Ubuntu 18.04.4, no HDMI sound

Post by mathog »

I think it is solved, based on information starting from here:

https://askubuntu.com/questions/71863/h ... g-playback

Let's say that the UID of the process running Mythtv is 1000. Boot the DVR with the monitor off and ssh into that account.

Code: Select all

export PULSE_RUNTIME_PATH="/run/user/1000/pulse/"
pacmd list-sink-inputs 
Two were listed, 0 was the HDMI, 1 was the analog. (Hopefully the numbers are stable.)

Code: Select all

sudo nano /etc/pulse/default.pa
#uncomment the 2nd from the bottom line and convert it to
set-default-sink output 0
Reboot the machine (again, with the TV off). Then turn on the TV. Voila, sound through HDMI even though the DVR started before the TV.
Post Reply