SDB:AudioTroubleshooting
From openSUSE
Version: openSUSE-10.1 to 11.0
Symptom
General openSUSE Basic Troubleshooting Sound Overview
This guide is intended to help provide basic sound to openSUSE users whose sound does not work at all after a new openSUSE install. This guide is not intended to show how to install codecs.
Please note, not all of the steps in this troubleshooting guide will be necessary. Just work your way from STEP-1 to the end, stopping when your audio starts to work.
Cause
After openSUSE installation, in some cases it is necessary to adjust audio mixer settings in order to get sound. For some sound codecs, the RPM "alsa-firmware" (which is not installed by default) is needed to provide sound functionality. In some other cases, where the audio hardware is newer, a more up-to-date version of ALSA is required. In other cases (due to the very large numbers of audio cards on the market), YaST is not able to configure the card manually, and hence manual configuration is necessary.
Solution
ALSA Overview
Note that the openSUSE sound driver comes with an application called “alsa” (advanced linux sound architecture). That is installed by default, and users are given a chance to configure this during the openSUSE installation.
Installing alsa-firmware on openSUSE-10.3
Starting with openSUSE-10.3, some of the older sound cards also require the application “alsa-firmware”, in addition to “alsa” and “alsa-utils”, so before proceeding, ensure that you have “alsa”, “alsa-utils”, and “alsa-firmware” installed. Based on the alsa-firmware rpm, it appears installing alsa-firmware may help users with: asihpi (dspxxxx), ea (gina, indigo, layla, mona), emagic (emi), ess (maestro), mixart, multiface, pcxhr, sb16, vx, yamaha, and some other chipsets
If you are an openSUSE-10.3 user, to see if you have alsa-firmware installed, type in a konsole/xterm:
rpm -q alsa alsa-utils alsa-firmware
and if you get:
alsa-1.0.14-31.2
alsa-utils-1.0.14-27
package alsa-firmware is not installed
then clearly alsa-firmware is not installed, and it is useful for openSUSE-10.3 users (and possibly essential for some hardware codecs under openSUSE-10.3) that you install it now.
In openSUSE-10.3, to install alsa-firmware, in a konsole/xterm, type "su" (without quotes) followed by root password to get root permissions in that konsole/xterm, and then to install alsa-firmware type:
zypper install alsa-firmware
After alsa-firmware is installed, restart your PC (to restart alsa) and check your sound (see STEP-1 below).
STEP-1: How To Test Your Sound
A simple test to see if your sound works, is to open a konsole or xterm, and type (it may be easier to copy and paste this into your konsole/xterm):
speaker-test -Dplug:front -c2 -l5 -twav
Note Linux is case sensitive, and “D” is not the same as “d”. To stop the above test, while the konsole/xterm has the mouse focus, press <CTRL><C> on the keyboard. Note you should check your mixer settings (kmix if using KDE, and alsamixer if using Gnome) to ensure that PCM and Master Volume are set around 75%. Note the test for surround sound is different.
If there is no sound from the test when using a konsole as a regular user, try as user root. ie type "su" (no quotes, and enter root password when prompted) and then try the test line. If you get sound with root permissions, but you got no sound as a regular user, then you probably have a permissions problem. See below in Step-6 for how to deal with that. Assuming you have no sound at all, go to step-2 below.
STEP-2: Trying YaST &/or ALSACONF to configure ones sound
- Try to configure your sound with YaST. (Note as soon as you have sound, do not go to the next item, but rather exit and enjoy your sound). To configure your sound go to:
-
YAST > HARDWARE > SOUND > OTHER > TESTand test your sound. If you have no sound then, -
YAST > HARDWARE > SOUND > OTHER > VOLUMEand move your PCM and Master Volume up to about 75% and test your sound. If you have no sound then, -
YAST > HARDWARE > SOUNDand select your audio card and delete it (which deletes the configuration, not the card). Then add the card, and configure the card. Test your sound. If you have no sound then close YaST and - in a konsole/xterm with root permissions (type "
su" (no quotes) followed by root password to get root permissions) type:
alsaconf
and configure your sound. After configuring test your sound, and don't forget to check your mixers (kmix or alsamixer as appropriate).
If still no sound, go to step-3.
STEP-3: Checking your audio setup for detailed information
It is often useful to find out more about your sound configuration before proceeding.
Basic Konsole/xterm commands
To find your alsa version, in a konsole/xterm type:
cat /proc/asound/version
To find what sound module(s) you have loaded, in a konsole/xterm type:
cat /proc/asound/modules
To determine the audio codec used by your sound card (and this is important), in a konsole/xterm, type:
cat /proc/asound/cards
and look for you audio codec. For example, if you obtained:
0 [nForce2 ]: NFORCE - NVidia nForce2
NVidia nForce2 with ALC650F at irq 18
Then for this example, we are interested in the ALC650.
Scripts to run to obtain detailed information
If that does not provide the codec, then another approach to obtain more information on your hardware and your sound configuration, is to run either (or both) of the following two scripts.
First script
The first script is the one created by user wishie from IRC #alsa. For users with the latest 1.0.17 of alsa, it is included with alsa. To run, copy and past the line below:
/usr/sbin/alsa-info.sh
Keep a record of the URL provided by the script as it can come in useful for passing to other's who are trying to assist you (on one of the forums, or on an IRC channel). Then go to the next step of this guide.
Alternatively, for users with alsa 1.0.16 or older, you need to download and run the script. Do this by copying and paste the line below into a gnome-terminal/konsole) and run:
wget http://www.alsa-project.org/alsa-info.sh
then run the script alsa-info.sh (copy and paste this into a gnome-terminal/konsole):
bash alsa-info.sh
Keep a record of the URL provided by the script as it can come in useful for passing to other's who are trying to assist you (on one of the forums, or on an IRC channel).
Second script
The second script, was created by IRC #alsa user gnubien. ... To download (copy and paste this into a konsole/xterm) and run:
wget http://home.cfl.rr.com/infofiles/tsalsa
then run the script tsalsa from a konsole (root permissions are needed) by copying and pasting this into the konsole/xterm:
bash tsalsa
Again keep a record of the URL provided by the script as it can come in useful for passing to other's who are trying to assist you (on one of the forums, or on an IRC channel). Also, for any question in that script that you don't understand, simply select "NO".
Now take a good look at those script pages, and try to determine what audio codec your PC sound hardware has. For example, it might be an ALC650, or an ALC268, AD1986A, STAC9220, etc ...
Alternative Method to run scripts
For those who find the above instructions on running the two diagnostic scripts too challenging, then as a regular user try copying and pasting each of the two lines below (one at a time) into an xterm/konsole to both download and run the scripts. Copy the COMPLETE line. The second one (tsalsa) will prompt for root password.
alsa-info.sh
wget -O alsa-info.sh http://www.alsa-project.org/alsa-info.sh && bash alsa-info.sh
tsalsa
wget http://home.cfl.rr.com/infofiles/tsalsa && su -c 'bash ./tsalsa'
.
Search the alsa site for codec info
Now, armed with that codec information, go to the alsa web site, and do a search to see if there is any relevant information on that codec:
http://www.alsa-project.org/main/index.php/Main_Page
There is a search box on the left hand side of that page (part way down). Lets say your audio codec was ALC268. Then a search for that might indicate:
http://www.alsa-project.org/main/index.php/Special:Search?search=ALC268&go=Go
If, for example, your openSUSE has alsa-1.0.14, from that one can see that there were many updates to the ALC268 between alsa-1.0.14 and alsa-1.0.15, which is relevant in this example case. There may be further updates in alsa-1.0.16.
You can confirm that further by going to the detailed release note for alsa-1.0.15 here: http://www.alsa-project.org/main/index.php/Changes_v1.0.14_v1.0.15_detail or by looking at the alsa-1.0.16 release note: http://www.alsa-project.org/main/index.php/Changes_v1.0.15_v1.0.16_detail
Doing a search on that page will indicate many changes with this new alsa version for ALC268. In that case, one should consider updating to alsa-1.0.16 (see below for hints on updating to alsa-1.0.16).
If after doing those searches, it appears that alsa-1.0.14 (or what ever alsa version your openSUSE has) appears adequate, then it is possible you need to do a custom hand edit to your /etc/modprobe.d/sound file and add a model specification (and jump to Step-5 below). But if update to alsa-1.0.14 appears useful, then go to Step-4 below:
STEP-4: Updating alsa in openSUSE
If updating alsa is deemed necessary, then this can be done either via rpm or via a tarball. As always, the average openSUSE user should typically try updating via an rpm first, prior to trying via a tarball.
Updating alsa via rpm
For openSUSE, one can find “cutting edge” alsa rpms here: http://download.opensuse.org/repositories/multimedia:/audio/
Install alsa, alsa-utils, alsa-tools, and alsa-firmware. Note alsa-firmware is in the “noarch” section of that rpm URL.
In addition, there are ALSA driver kernel modules to update. These packages are found in the different URL below: http://download.opensuse.org/repositories/multimedia:/audio:/KMP/
Install alsa-driver-kmp-default (or any matching one with your running kernel) from here.
It is often easiest to add the URL of the repository noted above to one's package manager, and install the rpm applications through one's package manager.
RPM commands to update alsa for openSUSE-10.1 to 11.0 (various kernels)
Specific examples for various openSUSE versions, and for various kernel versions, with specific zypper commands for openSUSE-10.2 and 10.3 are provided here: http://en.opensuse.org/Alsa-update
Note - the examples in the above URL are important, PLEASE check out that link to see the exact rpm/zypper installation commands you need to use. Again, this is IMPORTANT.
Selected openSUSE-10.3 example (latest kernel)
Please check out the above section, and do NOT blindly adopt the following example. The above section provides a link to exact commands for various openSUSE and various kernel versions.
Now, as an example, for openSUSE-10.3 if you have the latest updated kernel provided by Novell/SuSE, in a konsole/xterm, with root permissions (ie after typing "su" (without quotes) and root password) type:
zypper ar http://download.opensuse.org/repositories/multimedia:/audio/openSUSE_10.3/ multimedia-audio
which adds the repository. Then if you have a regular kernel (not a bigsmp) install the updated alsa rpms with:
zypper install alsa alsa-utils alsa-tools alsa-firmware libasound2
The above commands update the ALSA user-space stuff that isn't directly related with the kernel. For updating the ALSA kernel modules, run the following command sequence:
zypper ar http://download.opensuse.org/repositories/multimedia:/audio:/KMP/openSUSE_10.3_Update/ alsa-driver
zypper install alsa-driver-kmp-default
As you can see, this URL has "openSUSE_10.3_Update" instead of "openSUSE_10.3". The latter is built for the original 10.3 kernel while the former is for the latest updated 10.3 kernel.
Note the above 10.3 example will NOT work if you have not kept your kernel up to date. Also, if you have a "bigsmp" kernel, then you will need to install "alsa-driver-kmp-bigsmp" instead of "alsa-driver-kmp-default". But its most likely you have "alsa-driver-kmp-default" - still, if in doubt, you can check your kernel (before running the above zypper command) by typing:
uname -a
Also note, for these "cutting edge" alsa v.1.0.16 rpms to install without dependency problems, you should ensure you have updated to the latest kernel for your openSUSE provided by, and recommended by Novell/SuSE-GmbH. If you chose not to update to the latest kernel, then you will need to modify the zypper commands, making reference to a different repository directory, that supports your PC's older (original) openSUSE-10.3 kernel.
For all openSUSE users, after installing this latest alsa, its easiest to reboot (to reload this updated alsa driver) then again go through all of the previous steps in this page, to see if you can get your sound working under the new alsa. Note one may still not have sound, and you may need to edit your /etc/modprobe.d/sound file (see STEP-5 below), and add a model specification. Also, if the above alsa update restores your sound, then be careful about applying further updates of alsa. The v.1.0.16 alsa rpms on this web site are very "cutting edge", they are built regularly, and they could have recently introduced bugs that have not been fixed yet. Hence once you get your sound working, you may wish to remove this "cutting edge" multimedia repository (while still keeping the installed rpms). In the case of openSUSE-10.3 users, you can do this removal of the multimedia repository by typing in a konsole/xterm with root permissions:
zypper rr multimedia-audio
and
zypper rr alsa-driver
Updating alsa via tarball
One can also custom compile alsa for their PC by going to the URL below and downloading the alsa tarballs alsa-driver, alsa-firmware, alsa-lib, alsa-utils, and alsa-tools: http://www.alsa-project.org/main/index.php/Download
The readme.txt and install.txt provide instructions for compiling. In addition, custom installation instructions can also be found on the alsa web site. In our case, for the ALC268, the kernel sound module for this is the: snd-hda-intel (which we learned above when typing: cat /proc/asound/modules ). Searching the alsa site for snd-hda-intel gives this page which provides custom instructions for compiling alsa:
http://www.alsa-project.org/main/index.php/Matrix:Module-hda-intel
The same is true for most sound modules. Once alsa is compiled and installed, restart one's PC to load the sound module, then again go through all of the previous steps in this page, to see if you can get your sound working under the new alsa. Note one may still not have sound, and one may wish to modify their /etc/modprobe.d/sound file per the recommendations of the alsa page, or one may wish to try and edit to their /etc/modprobe.d/sound file (by adding a model specification) as noted below.
STEP-5: Add “model” to /etc/modprobe.d/sound file
To specify the model of your sound card in the /etc/modprobe.d/sound file, you first need to determine what model specification to apply. There is an ALSA-Configuration.txt file on your PC that you can examine (in a directory something like the following, dependent on your kernel version):
/usr/src/linux-2.6.22.13-0.3/Documentation/sound/alsa/ALSA-Configuration.txt
There is also an up to date ALSA-Configuration.txt file here: http://hg.alsa-project.org/alsa-kernel/raw-file/5082de4abb26/Documentation/ALSA-Configuration.txt
There is an excellent example how to do this manual configuration here: SDB:Intel-HDA_sound_problems
In our example of the ALC268, you will see:
ALC268
3stack 3-stack model
toshiba Toshiba A205
acer Acer laptops
dell Dell OEM laptops (Vostro 1200)
zepto Zepto laptops
test for testing/debugging purpose, almost all controls can
adjusted. Appearing only when compiled with
$CONFIG_SND_DEBUG=y
auto auto-config reading BIOS (default)
Now go into your /etc/modprobe.d/sound file and look for a line that looks something like:
"options snd-hda-intel enable=1 index=0"
and add a model specification on the end of that line. If you last attempted to configure your sound with "alsaconf", its possible there will be no line at all like that, in which case you will need to add a line similar to the example below. For the ALC268 codec, if you clearly have an “acer” or “toshiba” laptop computer, then the choice as to what you can try first is clear. But its still possible one of those will work with your audio, even if your hardware is not that of an “acer” nor “toshiba” and you should iteratively still try those models.
So for example (to use the toshiba model option) change the line to:
options snd-hda-intel enable=1 index=0 model=toshiba
Save the file, and restart your alsa driver, by typing in a konsole/xterm, with root permissions:
rcalsasound restart
Then test your sound with the sound test provided at the start of this web page. Don't forget to check your mixer is not muting nor blocking the sound.
If that doesn't work, then edit your /etc/modprobe.d/sound file again, trying the different options (ie “acer” and “3stack”) being certain to restart your alsa between each edit.
In some of the more complex hardware codec examples, for example the ALC880:
ALC880
3stack 3-jack in back and a headphone out
3stack-digout 3-jack in back, a HP out and a SPDIF out
5stack 5-jack in back, 2-jack in front
5stack-digout 5-jack in back, 2-jack in front, a SPDIF out
6stack 6-jack in back, 2-jack in front
6stack-digout 6-jack with a SPDIF out
w810 3-jack
z71v 3-jack (HP shared SPDIF)
asus 3-jack (ASUS Mobo)
asus-w1v ASUS W1V
asus-dig ASUS with SPDIF out
asus-dig2 ASUS with SPDIF out (using GPIO2)
uniwill 3-jack
fujitsu Fujitsu Laptops (Pi1536)
F1734 2-jack
lg LG laptop (m1 express dual)
lg-lw LG LW20/LW25 laptop
tcl TCL S700
clevo Clevo laptops (m520G, m665n)
test for testing/debugging purpose, almost all controls can be
adjusted. Appearing only when compiled with
$CONFIG_SND_DEBUG=y
auto auto-config reading BIOS (default)
You need to determine how many jacks your hardware has (take a look) to see if it is applicable to try the 3-stack, or the 5stack, or the 6-stack, or an S/PDIF output interface ... then you may be able to narrow down what options you try, to find the optimal setting earlier.
And then try each of the model options by adding "model= ...... " to the /etc/modprobe.d/sound file. Don't forget to restart alsa after each attempt.
STEP-6: How To Fix a Permissions Problem
In some cases user root will have sound, but a regular user will not have sound. Typically this is due to a permissions problem being experienced by the regular user. One way that sometimes works to address this, is to add the regular user to group "audio". This can be done by:
YAST >> Security and Users >> User Management >> "select your user" >> Edit >> Details >> Groups >> check "audio" and then click on "ACCEPT".
Note you must log out and log back in as a regular user (ie typically restart X window (ie restart KDE or Gnome or Xfce ... )) in order for this permission change to have an effect.
STEP-7: Pulse Audio Problems
Commencing with openSUSE-11.0, Pulse Audio was introduced in openSUSE. This initial Pulse Audio introduction, created some problems with Gnome users and KDE4 users (KDE-3.5.9 users were mostly unaffected). For guidance on how to deal with some Pulse Audio problems, please refer to http://en.opensuse.org/Pulseaudio
STEP-8: KDE4 Phonon Audio Problems
Phonon was introduced on openSUSE-11.0 with KDE4, and it can on occasion cause problems. For guidance in dealing audio problems related to Phonon, please refer to the kde.org phonon audio troubleshooting page: http://phonon.kde.org/cms/1032
Links
- openSUSE concepts: http://en.opensuse.org/Concepts
- openSUSE sound concepts: http://en.opensuse.org/Sound-concepts
- updating alsa via rpm on openSUSE: http://en.opensuse.org/Alsa-update
- ALSA project main page: http://www.alsa-project.org/main/index.php/Main_Page
- ALSA-Configuration.txt http://hg.alsa-project.org/alsa-kernel/raw-file/5082de4abb26/Documentation/ALSA-Configuration.txt
- ALSA opensource wiki: http://alsa.opensrc.org/index.php/Main_Page
- Linux Journal: Troubleshooting Linux Audio Part-1: http://www.linuxjournal.com/node/1000244
- Linux Journal: Troubleshooting Linux Audio Part-2: http://www.linuxjournal.com/node/1000254
- Linux Journal: Troubleshooting Linux Audio Part-3a: http://www.linuxjournal.com/node/1000262
- Linux Journal: Troubleshooting Linux Audio Part-3b: http://www.linuxjournal.com/node/1000295
- SDB:Intel-HDA_sound_problems
- AlsaMixers reference: http://alsa.opensrc.org/index.php/AlsaMixers
- PulseAudio on openSUSE: http://en.opensuse.org/Pulseaudio

