KDE can't get sound through onboard Intel HDMI but some apps can

I connected a TV via HDMI but can’t get sound out no matter what device I tried in KDE sound settings. Pulse audio, pavucontrol, doesn’t help either. Cards and drivers can be selected but no test sound comes through. Alsamixer shows HDMI output as unmuted, there are 3 s/pdifs there but their values are stuck on 00 and don’t get up when I press arrow up key. Some say it’s a normal behavior for s/pdifs, though.

VLC, however, plays videos with no problems and sound module in audio settings there is set to “automatic”. Xine plays videos with sound out of the box, too, and so does DragonPlayer. Umplayer, a front end to mplayer, gets the movie sound out if I select one of the available alsa drivers, which is shown as alsa(0.7 - HDA Intel HDMI) and that’s the only one that works. Smplayer, another mplayer front end, however, can’t get the sound out even if it appears to have the similar list of available alsa drivers. MPV, which is also based on mplayer, is mute, and there are no options to select drivers there. Mplayer itself was mute at first but now it gets the sound out after DragonPlayer left a notification that it switched the sound to the same HDMI module I have already set in KDE. After this notification Kaffeine suddenly found its voice, too.

With videos being a mixed bag music, like mp3 files, won’t play at all even in players that get video sound out. Amarok keeps playing them to headphones but all other programs are completely silent.

All in all, everything appears to be working in terms of KDE recognized devices, everything is selectable and configurable, only without actual sound going to HDMI. Except some programs can get it out. Could it be a permissions issue where some programs get it and others don’t?

Thanks for the explanation but I confess I am a bit slow in the understanding. I would like to help if possible.

You note VLC, xine, Dragon player, Umplayer, kaffeine all play with HDMI sound … ? But test sound and some mp3 players do not (yet) work with HDMI sound.

Can you specifically state which applications can not send sound to the HDMI device ? Note also some apps are configurable to attempt to ignore pulse audio and in contrast some apps are setup to use pulse audio. This can limit pavucontrol functionality dependent on the app.

I assume you know pulse audio provides the capability for audio to be routed from applications to sound device on a per application basis and on a per sound device basis. Nominally pavucontrol is the application that provides this routing functionality (assuming the app is cooperating with pulse audio). Note its unlikely to be a permissions issue.

So please advise exactly which apps can not send sound to the HDMI device - and I propose this be addressed on a per application basis one at a time.

Let me try again - KDE multimedia module doesn’t produce test sound when HDMI output is selected and I can hear test sound through headphones instead. I consider this to be the main problem that can affect Youtube, Netflix, and any video played in browsers, plus system notifications.

Programs that I believe rely on KDE sound settings don’t produce sound either - Kaffeine, mplayer, and mplayer front ends. Front ends like Smplayer and Umplayer have the option of selecting a different sound driver and so I can get Umplayer to work with a particular version of alsa but Smplayer is mute no matter what.

VLC works and so does Xine.

Dragon Player, which is an old KDE program, works and it sends a system notification that it has set audio output to HDMI. After that notification Kaffeine and mplayer start working as well, but no KDE test sound still. MPV, which is another mplayer front end, is still mute, too.

Pavucontrol allows to select HDMI and shows a pulsating bar for the programs I tried it with but no sound comes out.

I haven’t found any program that would play mp3 audio, not even VLC.

I hope that by fixing KDE all these problems will go away, and it would be the only solution for videos in browsers. KDE’s backend is Phonon gstreamer and shortly after upgrading to 42.2 I “switched all packages” to Packman repo so it must be a Packman version, too. Sadly, I have no idea how pulse and alsa relate to each other in KDE and on the system level.

I thought it could be permissions issue because of membership in audio group or something like that. Some programs can force themselves there on install but if I, as a user, fail to count as a member when HDMI is selected than KDE would fail even if all correct devices are set.

This motherboard is three years old, HDMI comes from onboard Intel, and initially I installed 13.1 on this machine but I never plugged a TV into it until now.

OK - so if I read correctly, you only have headphone sound and no HDMI sound , no matter what app.

Please in a konsole/xterm as a regular user run this diagnostic script with PC connected to internet:


/usr/sbin/alsa-info.sh

select the SHARE/UPLOAD option and let script run to completion. When complete in konsole/xterm will be a web/address URL where a snapshot of the sound configuration has been uploaded. Please post here that web/address URL. That may give some clues as to where the problem may be.

I’m not convinced the problem is strictly KDE, unless you have gone and changed those multimedia from default. My experience is this nominally ‘just works’ with KDE (unless one has gone in and changed default values) and the problem lays elsewhere.
.

Pavucontrol allows to select HDMI and shows a pulsating bar for the programs I tried it with but no sound comes out.

You can switch each Programm!!! which is streaming sound with pavucontrol to another sound device:
http://openmafia.org/~osf/Screenshots/Lautstärkeregler_193.jpg

http://openmafia.org/~osf/Screenshots/Lautstärkeregler_194.jpg

http://www.alsa-project.org/db/?f=fb4396817d48463cbd99f3d4c1d7b704320138df

At first I didn’t do anything but when I realized I don’t have the sound I went to KDE settings and checked what’s there.

As for pavucontrol, this is what I get:


The bar is pulsating, the output should be correct, but there’s no sound.

Sometimes I get test sound in KDE in this tab:


but not at this moment, and I never ever get the sound in Audio Hardware Setup tab where you can test individual speakers.

Today VLC consistently causes the entire machine to freeze with no response to mouse or keyboard, no logging out on Ctrl-Alt-Backspace, nothing. Only hard reset works.

In your example pavucontrol you have HDMI-2 selected. Are you certain that is the correct HDMI ? You have 3 to choose from and likely only one works.

wrt the script, I note a Gigabyte H87M-HD3 with two instances of the snd_hda_intel driver running, one associated with the Intel Haswell HDMI, an Intel Xeon E3-1200, (which is card-0 on your openSUSE install) and one assocaited with the analog sound, an Intel C220 Series Chipset ALC887-VD Analog (which is card-1 on your openSUSE install). By default sound should go to card-0, which is the HDMI device.

The mixer gives no indication of HDMI muted for card-0. I do note the mixer for card-1 has surround OFF/muted, center volume OFF/muted, and LFE OFF/muted. But given you are attempting to play audio via card-0 I don’t think those card-1 settings are important.

Given you are playing to an HDMI device, make certain the volume problem is not the external HDMI device which may have a separate volume control ?

Now here are some sound tests I would like you try to do from a konsole. Try as a regular user and also try with root permissions.


aplay -D plughw:0,3 /usr/share/sounds/alsa/test.wav

and


aplay -D plughw:0,7 /usr/share/sounds/alsa/test.wav

and


aplay -D plughw:0,8 /usr/share/sounds/alsa/test.wav

do any of those give sound, or give a syntax error ? I proposed also trying with root permissions to try and ensure no permission issues.

If any indicate the device is busy try this (in my example I am assuming hw:0,3 give a busy syntax error, but it cold be hw:0,7 or hw:0,8) then try this :


pasuspender -- aplay -D plughw:0,3 /usr/share/sounds/alsa/test.wav

Do any of those give HDMI sound ?

Also, on an unrelated note, you may have a problem with your FAT partition sdb1. I note:


    2.334807] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

In that tab in Pavucontrol I get only HDMI 2 and Analog Stereo, there are more devices in Configuration tab but none of them works, I’ve checked.

None of the aplay commands produced actual sound. Here’s the terminal output including adjustments for one device that was busy.

stan@linux-pwfe:~> aplay -D plughw:0,3 /usr/share/sounds/alsa/test.wav
Playing WAVE '/usr/share/sounds/alsa/test.wav' : Signed 16 bit Little Endian, R
ate 44100 Hz, Stereo
stan@linux-pwfe:~> sudo aplay -D plughw:0,3 /usr/share/sounds/alsa/test.wav
root's password:
Playing WAVE '/usr/share/sounds/alsa/test.wav' : Signed 16 bit Little Endian, R
ate 44100 Hz, Stereo
stan@linux-pwfe:~> aplay -D plughw:0,7 /usr/share/sounds/alsa/test.wav      
aplay: main:786: audio open error: Device or resource busy
stan@linux-pwfe:~> sudo aplay -D plughw:0,7 /usr/share/sounds/alsa/test.wav
aplay: main:786: audio open error: Device or resource busy
stan@linux-pwfe:~> sudo aplay -D plughw:0,8 /usr/share/sounds/alsa/test.wav
Playing WAVE '/usr/share/sounds/alsa/test.wav' : Signed 16 bit Little Endian, R
ate 44100 Hz, Stereo
stan@linux-pwfe:~> aplay -D plughw:0,8 /usr/share/sounds/alsa/test.wav      
Playing WAVE '/usr/share/sounds/alsa/test.wav' : Signed 16 bit Little Endian, R
ate 44100 Hz, Stereo
stan@linux-pwfe:~> sudo aplay -D plughw:0,7 /usr/share/sounds/alsa/test.wav
aplay: main:786: audio open error: Device or resource busy
stan@linux-pwfe:~> pasuspender -- aplay -D plughw:0,7 /usr/share/sounds/alsa/te
st.wav
Playing WAVE '/usr/share/sounds/alsa/test.wav' : Signed 16 bit Little Endian, R
ate 44100 Hz, Stereo
stan@linux-pwfe:~> sudo pasuspender -- aplay -D plughw:0,7 /usr/share/sounds/al
sa/test.wav
Connection failure: Connection refused
pa_context_connect() failed: Invalid argument
stan@linux-pwfe:~> 


The problem with sdb1 could be because I hard reset the machine a few times today when VLC froze the system. Is there any way to avoid these hard resets? By design Linux is not supposed to suffer from this.

The above suggests to me that your HDMI device is hw:0,7. The first time you tried pulse audio was blocking aplay. Then when you tried with ‘pulse audio suspender’ it played the media and pulse audio was not blocking.

You should have had audio.

My speculation is hw:0,7 may be the same as the HDMI-2 that you have selected (and hw:0,3 may be HDMI-1 which logically is not a selection)

Did you check your HDMI device to see if it has its own (additional) audio control - and if so, check the audio volume control on your actual HDMI device. Many HDMI devices also have their own audio volume controls.

You don’t show what output device is set in pavucontrol just the source be sure that hardware status indicates plugged in

I see the logic of this but there was no sound and there’s no sound still - next day after a fresh start. “Test” button in KDE multimedia module works (or just worked - before I make any changes), but no sound from testing “left” and “right” channels in hardware setup tab there. It’s a TV, btw, of course it has its own volume control, and TV itself works - I just heard test sound from the computer and I’m sure I can get sound from playing a video in Umplayer, but aplay commands still don’t work and neither does Kaffeine. Umplayer, btw, works if I manually select the same 0,7 alsa driver which was used by pulse in that series of tests.

Here’s screenshot of configuration tab in pavucontrol:


This is what it looks like after new boot. Music file is playing, HDMI 2 is selected and the sound bar is pulsating, but no sound comes out.

Does this quoted sentence mean HDMI works with Umplayer ?

In any event - likely you need to write a big report, so to get support of the SUSE-GmbH sound packager. There is guidance here: openSUSE:Submitting bug reports - openSUSE Wiki

Yes, HDMI sound works with Umplayer when this particular driver is selected in its options. It also works with Dragon Player. Right now it works with SMplayer, too, and the driver there is set simply to “alsa”

Here are lines from settings files for some of my video players

Smplayer: driver\audio_output=alsa -works
Umplayer: driver\ao=“alsa:device=hw=0.7” -works
Mplayer (gui.conf): ao_driver=alsa:device=default -works
MPV: ao=alsa - doesn’t work

There’s no sound in browsers, too, and the same players with same settings stop working if I open an mp3 instead of video.

I submitted bug report here: 1034235 – Sound though HDMI not present in most apps

I think could be a pulse audio bug more than it could be a KDE bug. Its possible an edit to a pulse audio file will fix this. I can’t recall - did you try deleting /home/username/.pulse (if it exists) and deleting /home/username/.config/.pulse (if it exists), reboot and test [configuring with pavucontrol as appropriate] ?

Good luck with the bug report. That may be the quickest way to get this fixed.

Renamed both directories, rebooted, only /home/stan/.config/pulse was recreated, no changes, everything the same. Bug report might take a while to get considered.

Are you sure that you did the complete vendor change to packman.With some programs working and others not might indicate that you did not make the switch to all proprietary codecs since not all multimedia use the same backends. Be certain before you file a bug report

No, that’s not it. I can’t get “aplay” to produce any sounds, nothing comes from the browser, no youtube, and nothing can play mp3s - it’s not just some apps with mixed up dependencies that are misbehaving.

The SUSE-GmbH sound packager is very good (he is also an alsa sound driver developer) and IMHO at this stage where all suggestions to date have failed, you will get support there FAR FAR quicker than any forum suggestion from this point on.

So please raise a bug report, and constantly monitor the bug report for questions and solutions that are proposed.

Good luck - and if you do not mind, please post a link to the bug report here so that we can monitor your progress.

My bug was assigned to Takashi Iwai who is probably “SUSE-GmbH sound packager” you mean. Last he asked was to install pulse packages from OBS multimedia libs and then went quiet. Sound didn’t appear either.

I can see bugs on his openSUSE “distribution” list, mine is one of the most recent but he might be dealing with bugs submitted for Tumbleweed or something else.

Give him some time to come back to you. No doubt he’s very busy with other concurrent issues.