Attempts to install proper codecs fail

Hardware: Acer Aspire Z3-710 all-in-one
OS: Leap 15.1 fresh install
No sound from players (Amarok, VLC, Dragon Player) or FireFox; very loud beep is audible on boot-up.

Although I have successfully implemented multimedia support on several occasions in the past, I have not been able to do so in this case.

Over the past few days, I used the Multimedia Guide for openSUSE Leap 15.1, the Restricted formats - openSUSE Community Wiki one-click option, the opensuse-guide.org/codecs.php one-click option, and CubicleNate’s Techpad, but none have resolved the issue. After each of these attempts, I performed a Snapper rollback, so that the machine is back to a relatively clean state.I recognize that I may have overlooked something in the process.

The output from alsa-info is at https://susepaste.org/2703763
The current list of repositories is https://susepaste.org/18716194

I note the PulseAudio is not running…

Pulseaudio
      Installed - Yes (/usr/bin/pulseaudio)
      Running - No

That will impact here.

Report back with output of…

setup-pulseaudio --status

If disabled, try the following

sudo setup-pulseaudio --enable

and capture the output.

Once PA is running, use pavucontrol to check that you have the appropriate profile selected (via configuration tab). Check that nothing is muted and that the levels are set as expected.

Thanks for the reply.

I enabled pulseAudio, then installed pavucontrol via Yast, but it fails to start (gui: “Establishing connection to PulseAudio. Please wait…”). From command line, with reconfirmation of pulse audio status:

linux-8:~ # pavucontrol
No protocol specified
No protocol specified

(pavucontrol:5495): Gtk-WARNING **: Theme parsing error: gtk.css:68:35: The style property GtkButton:child-displacement-x is deprecated and shouldn't be used anymore. It will be removed in a future version

(pavucontrol:5495): Gtk-WARNING **: Theme parsing error: gtk.css:69:35: The style property GtkButton:child-displacement-y is deprecated and shouldn't be used anymore. It will be removed in a future version

(pavucontrol:5495): Gtk-WARNING **: Theme parsing error: gtk.css:70:34: The style property GtkCheckButton:indicator-size is deprecated and shouldn't be used anymore. It will be removed in a future version

(pavucontrol:5495): Gtk-WARNING **: Theme parsing error: gtk.css:71:36: The style property GtkCheckMenuItem:indicator-size is deprecated and shouldn't be used anymore. It will be removed in a future version

(pavucontrol:5495): Gtk-WARNING **: Theme parsing error: gtk.css:73:46: The style property GtkScrolledWindow:scrollbars-within-bevel is deprecated and shouldn't be used anymore. It will be removed in a future version

(pavucontrol:5495): Gtk-WARNING **: Theme parsing error: gtk.css:76:30: The style property GtkExpander:expander-size is deprecated and shouldn't be used anymore. It will be removed in a future version

(pavucontrol:5495): Gtk-WARNING **: Theme parsing error: gtk.css:83:29: The style property GtkStatusbar:shadow-type is deprecated and shouldn't be used anymore. It will be removed in a future version
No protocol specified
^C
linux-8:~ # setup-pulseaudio --status
enabled
linux-8:~ # setup-pulseaudio --enable
Enabling PulseAudio for ALSA...
Enabling PulseAudio for libao...
Default driver is pulse already in /etc/libao.conf
Enabling PulseAudio for mplayer...
Enabling PulseAudio for OSS...
Application aumix already setup for PulseAudio
Application sox already setup for PulseAudio
Enabling PulseAudio for SDL...
Enabling PulseAudio for Timidity...
Timidity already setup for using PulseAudio
Enabling PulseAudio for Phonon...
Enabling PulseAudio for Kmix...
Enabling PulseAudio for speech dispatcher...
Enabling PulseAudio for SoX...
Setting auto sink/src for gstreamer
Enabling PulseAudio for QEMU/KVM
Enabling PulseAudio autospawn...
linux-8:~ # 

Just to be certain about the pc’s hardware, I booted into the live version of 15.1. Music (YouTube) plays through Firefox and from a separate USB drive through VLC - with no additions, etc. I vaguely recall doing this initially before loading 15.1 on the hard drive but wanted to be certain.

Here’s the alsa-info report from the live version: https://susepaste.org/59864397

Updated Leap 15.1 installed on internal disk and added multimedia support yesterday performing the following steps:

The above steps worked without any glitch.

karmistelberger -

Thank you. As stated in my initial post, I already tried the opensuse-guide approach without success. I believe something else is going on here.

One click not always executes the same commands as given on the command line. It is worthwhile trying a full ‘zypper ref --force’ and revert to the basic repos only repo-oss, repo-non-oss, repo-update and repo-update-non-oss. Then try ‘zypper up’ to get a consistent state. Then add packman.

Perhaps this has nothing to do with the problem on this machine, but none of my other machines are running pulseaudio (two on 15.1 and one on 42.3). They do have kmix, which again might not be relevant to the problem here. And all three are pumping out music as I write this. Here is the alsa-info.txt from one of the machines recently-upgraded (in-place) to 15.1: https://susepaste.org/43864725

I need to better understand how sound gets from the source to the speakers.

I recommend reviewing the Audio_troubleshooting guide first. I would expect PulseAudio to be present in a modern desktop context for most users. Basic overviews:
https://www.ghacks.net/2017/08/16/linux-audio-explained/

Thank you. I’ve recently been through the references, the first one several times over the past few days, as well as the other referenced SDB articles.

Something might be blocking the path from ALSA to the sound card. As mentioned, sound is working on the other machines - but that may be dependent on configuration files set up a few years ago perhaps in 42.1 or earlier. My notes from then address specific codecs added after using the one-click method.

You need to check that nothing is muted and the levels are set appropriately. Use ‘alsamixer’ for that. If that checks out, you should try to generate some test sounds with aplay…

aplay -vv /usr/share/sounds/alsa/test.wav

For analogue sound (card 1)…

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

Something might be blocking the path from ALSA to the sound card. As mentioned, sound is working on the other machines - but that may be dependent on configuration files set up a few years ago perhaps in 42.1 or earlier. My notes from then address specific codecs added after using the one-click method.

Forget codecs etc until you can demonstrate working sound at the ALSA level. Your alsa-info.sh output shows that you have two sound cards present. You need to be certain about which you are using for sound output…HDMI will be in use by default…




  1. !!Soundcards recognised by ALSA

  1. !!-----------------------------

  1.  

  1.  0 [HDMI           ]: HDA-Intel - HDA Intel HDMI

  1.                       HDA Intel HDMI at 0xf7f14000 irq 33

  1.  1 [PCH            ]: HDA-Intel - HDA Intel PCH

  1.                       HDA Intel PCH at 0xf7f10000 irq 34

  1.  

  1.  

  1. !!PCI Soundcards installed in the system

  1. !!--------------------------------------

  1.  

  1. 00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)

  1. 00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)

  1.  

Thank you. I will do that and let you know how that works out. I recall doing at least one of the tests recently. But I plan to go through this methodically as you suggested.

Does the fact that I was able to demonstrate sound with the live (USB) version have any impact? Perhaps not, since if I understand the system correctly, ALSA and everything else above the physical sound card is software.

Thank you for your time and assistance.

I took a look at the alsa-info.sh output, and I agree with deano_ferrari’s assessment wrt HDMI and sound. Deano_ferrai’s suggestion to try:

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

is a key test, and I think it should play sound. By specifying “hw:1,0” in the above, deano_ferrai is trying to force the sound out through the hw:1,0 device, which is sound card-1 (ie your analog sound).

Sound is likely going out via the HDMI interface (sound card-0), which you likely are not setup to use. Hence sound needs to be re-directed to go out via sound-card-1 (your analogue sound) , … or alternatively the HDMI needs to be changed to be sound-card-1 and analog sound assigned to be sound-card-0 (the default for applications to send sound out to speakers).

Directing sound to sound-card-0 or to sound-card-1 is normally (not always thou) easy to do if pulse audio is running correctly, as one simply installs ‘pulse audio volume control’ (pavucontrol) and assign sound for all applications to sound-card-0 or to sound-card-1. You noted a complication with getting pulse audio to work ? < unsure> … Further, even with pulse audio working, in your PC case there is a potential complication. I noted this in the alsa-info.sh:





  1. !!Loaded ALSA modules 
  1. !!------------------- 
  1. snd_hda_intel 
  1. snd_hda_intel 



In that we can see that both HDMI and analog sound use different instances of the same sound driver “snd_hda_intel”. The ‘risk’ here is they could alternately swap between sound-card-0 and sound-card-1 when one boots their PC. That may, or may not happen.

Further, a known ‘yast’ limitation wrt sound cards, is it does not work well in assigning sound-cards to different devices if both devices use the same sound driver (which is your case). ie. I suspect in your PC case ‘yast’ will not help much.

If you are successful to get sound via that one line command proposed by deano_ferrari (ie to hw:1,0) then I see two approaches:

  1. get pulse audio working correctly and use it to redirect sound to sound-card-1, or
  2. edit the /etc/modprobe.d/50-sound.conf file to permanently re-assign sound-card-1 to HDMI and and sound-card-0 to analog sound. I can help there if that is the approach preferred as its a rather specific/detailed edit that is required.

First thou, I am very much interested to learn if you get sound from:

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

deano_ferrari and oldcpu -

Thank you both for your very thorough posts. My reply has been delayed a bit (returning a television set-top box to Verizon this past Thursday, the helpful representative canceled my entire telecomm account, leaving me without Internet or telephone [but I still had running water and electricity]).

Before oldcpu’s post arrived, I went through the steps outlined in deano_ferrari’s post. To again assure myself I was not working with a boat anchor, I booted from the live USB drive and the installer selected the PCH card (card 1, as opposed to card 0, the HDMI card), allowing music to reach the speakers.

I opened alsamixer amd saw that the PCH card was functioning properly, i.e., no muted items. As before, the first test didn’t yield any sound. But the second (“aplay -D plughw:1,0, etc.”) most certainly responded with some glorious composition I was not able to identify.

As this occurred before oldcpu’s post, I then turned to the question of how to reroute the sound to (or from?) the correct card. The alsa website (http://alsa-project.org/wiki/Setting_the_default_device) suggested creating a file named asound.conf in /etc with the following code:

defaults.pcm.card 1
defaults.ctl.card 1

I’m not certain whether this code is fully compatible with Leap 15.1, but it did the trick. No sooner did I save the asound.conf file, I had audio. (There was already a file named asound-pulse.conf in /etc, but it appears to be part of my currently non-functioning pulseaudio.)

I cannot thank you enough for your thorough advice. As I suspected and deano confirmed, codecs were not the issue. Indeed, the VLC player loaded during initial installation apparently doesn’t require any special codecs to play mp3 files.

Thank you again for your time and assistance.

Excellent!

And thankyou for sharing your solution. I was not familiar with that technique for redirecting sound. Instead I use a different method via a different (and much more complex) method via file creation and edits to an /etc/modprobe.d/50-sound.conf file.

Having now learned the method you adopted, I like the method you employed.

It’s great to read of your success with this. There is more than one way to make this work. Well done, and thanks for sharing what you did to make it work as required.

Gentlemen -

Thank you. But I would not have reached this point without your assistance.

Thanks again.