Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Trouble shooting ALSA

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Message
Author
User avatar
craigevil
Posts: 5391
Joined: 2006-09-17 03:17
Location: heaven
Has thanked: 28 times
Been thanked: 39 times

Trouble shooting ALSA

#1 Post by craigevil »

First go through the ALSA checklist:
1) add yourself to the 'audio' group (log out and log in again)

Code: Select all

useradd -G audio username
2) use alsamixer and unmute channels and raise levels (also try muting some channels & toggle jack sense)
3) arts or esound stopped?
4) OSS modules unloaded?
5) speakers on?
6) As root

Code: Select all

modprobe snd-pcm-oss 
7) Test your sound with aplay and a wav so codec issues don't confuse the situation. does this work for root:

Code: Select all

aplay  /usr/share/sounds/alsa/Noise.wav
8) Check what soundcards are detected by your system

Code: Select all

cat /proc/asound/cards
9) List the sound module in use

Code: Select all

cat /proc/asound/modules
10) List the sound playback devices on your system

Code: Select all

aplay -l
11) One way to check what ALSA driver you have is

Code: Select all

cat /proc/asound/version
12) Do you have alsa-utils installed? One way to check is to see if you have /etc/init.d/alsa-utils If not found install it by doing

Code: Select all

apt-get update && apt-get install alsa-utils 
This script will give a detailed output of the current alsa setup on your system.
Download this script alsa-info.sh save it as alsa-info.sh
To run and create the info file

Code: Select all

bash ./alsa-info.sh --no-upload <-- without this option it will upload to alsa-project.org
To view the created file

Code: Select all

 less /tmp/alsa-info.txt
Or to paste it to pastebin.ca

Code: Select all

bash ./alsa-info.sh --pastebin
You can also use the HDA Analyzer
The HDA analyzer tool provides a graphical interface to access the raw HD-audio control, based on pyGTK2 binding. The program gives you an easy-to-use GUI stuff for showing the widget information and adjusting the amp values, as well as the proc-compatible output.
This tool can parse also proc files (/proc/asound/card#/codec*) and output from alsa-info.sh script and monitor mode (check --help option).
If none of that works then you need to find the specific audio chipset to add to your /etc/modprobe.d/alsa-base.conf file.

Each combination of audio codec, audio mixer and audio device name requires a very specific configuration in the alsa-base.conf file.

The following string needs to be added to the /etc/modprobe.d/alsa-base.conf file

options snd-hda-intel model=YOUR_MODEL

You can find your codec chip name using this command

Code: Select all

cat /proc/asound/card*/codec* | grep Codec
Then look at https://wiki.ubuntu.com/Gutsy_Intel_HD_Audio_Controller
find your codecs and model and add the appropriiate line to /etc/modprobe.d/alsa-base.conf

Valid model names (that replace YOUR_MODEL) depending on the codec chip, can be found here and here.

Also check to see if there is more than one alsactl executable in your path and remove the wrong/oldest one.

Code: Select all

sudo which alsactl
or su if you do not have sudo setup. It should return something like this:

Code: Select all

# which alsactl
/usr/sbin/alsactl
Having more than one alsactl can cause your sound settings to be muted during every boot.

For release Squeeze or any later release, alsaconf is no longer available in package alsa-utils. So try to configure alsa by running the command 'alsactl init' as root. Just ignore the error message like 'Unknown hardware' (this issue said to be fixed in alsa-utils .20), then reboot and try to test your sound. For more details please see http://forums.debian.net/viewtopic.php?f=6&t=39116

For more info see:
http://wiki.debian.org/ALSA
SoundTroubleshooting - - https://help.ubuntu.com/community/SoundTroubleshooting
HdaIntelSoundHowto - https://help.ubuntu.com/community/HdaIntelSoundHowto
http://alsa.opensrc.org/index.php/.asoundrc
MORE NOTES ON HD-AUDIO DRIVER - http://www.kernel.org/pub/linux/kernel/ ... Audio.html
How can I change the default ALSA device http://alsa.opensrc.org/FAQ026
Alsa-sound-mini-HOWTO http://www.alsa-project.org/~valentyn/#toc5
ALSA Multi-channel Audio mini-HOWTO http://www.cse.ohio-state.edu/~bondhugu/alsamch.shtml

If none of these steps work, either take your computer back to where you bought it or get used to not having sound. Sound is overrated anyway. :)
Raspberry PI 400 Distro: Raspberry Pi OS Base: Debian Sid Kernel: 5.15.69-v8+ aarch64 DE: MATE Ram 4GB
Debian - "If you can't apt install something, it isn't useful or doesn't exist"
My Giant Sources.list

rayburn
Posts: 24
Joined: 2008-05-29 18:56
Location: UK

Re: Trouble shooting ALSA

#2 Post by rayburn »

Thanks for posting this, I don't need it now, but surely will at some time. It is great to have a thread with all those possible solutions all together in one place.

Lou
Posts: 1739
Joined: 2006-05-08 02:15

Re: Trouble shooting ALSA

#3 Post by Lou »

Good job craigevil, been boxing with an old Compaq, my neighbor wanted Squeeze, this did the trick:

Code: Select all

For release Squeeze or any later release, alsaconf is no longer available in package alsa-utils. So try to configure alsa by running the command 'alsactl init' as root. Just ignore the error message like 'Unknown hardware' (this issue said to be fixed in alsa-utils .20), then reboot and try to test your sound. For more details please see viewtopic.php?f=6&t=39116
Devuan Jessie - IceWM - vimperator - no DM
KISS - Keep It Simple, Stupid

rogon3
Posts: 35
Joined: 2010-11-02 11:46

Re: Trouble shooting ALSA

#4 Post by rogon3 »

Thankyou, big help for me.

User avatar
lbm
Posts: 494
Joined: 2009-05-16 09:24
Location: Denmark

Re: Trouble shooting ALSA

#5 Post by lbm »

Thanks man, this worked for me.
craigevil wrote:For release Squeeze or any later release, alsaconf is no longer available in package alsa-utils. So try to configure alsa by running the command 'alsactl init' as root

User avatar
Llewton
Posts: 155
Joined: 2010-08-11 13:14

Re: Trouble shooting ALSA

#6 Post by Llewton »

craigevil wrote:options snd-hda-intel model=YOUR_MODEL
This mutes my notebook's internal speakers when I plugin external ones or headphones, but: when I put just "model" (fujitsu in my case), it didn't work. I had to google and find I should put fujitsu-pi2515. And that's not the exact model I've got, not even close.

What I'm saying is, if someone tries this workaround and it fails, they should perhaps search for alternatives to just adding "model" of their computer to that line.

sej7278
Posts: 225
Joined: 2011-06-11 17:03

Re: Trouble shooting ALSA

#7 Post by sej7278 »

this link doesn't exist (anymore?): https://wiki.ubuntu.com/Gutsy_Intel_HD_Audio_Controller

also, does anyone know why there seems to be no info regarding the Realtek ALC892 chipset which must be the most common audio chipset on any motherboard made in the last year or more lol!

my Gigabyte GA-P55-USB3 (rev 2.0) has developed terrible static/whitenoise on the mic input recently, its not pulseaudio or kernel, its alsa it seems.

dtl131
Posts: 449
Joined: 2011-07-11 19:56

Re: Trouble shooting ALSA

#8 Post by dtl131 »

Yeah, it should really point to the git list http://git.alsa-project.org/?p=alsa-ker ... xt;hb=HEAD

rulet
Posts: 63
Joined: 2011-11-25 18:54

Re: Trouble shooting ALSA

#9 Post by rulet »

How to save alsa volume configuration on reboot? It's always muted, nothing works.
Any ideas?
Debian 10, 64 bit, Gnome 3.30.2, Intel Core i3-6100 CPU 3.70GHz, 8GB RAM.

MountainRider
Posts: 2
Joined: 2012-11-25 16:39

Re: Trouble shooting ALSA

#10 Post by MountainRider »

rulet wrote:How to save alsa volume configuration on reboot? It's always muted, nothing works.
Any ideas?
Have you tried "sudo alsactl save"?

rulet
Posts: 63
Joined: 2011-11-25 18:54

Re: Trouble shooting ALSA

#11 Post by rulet »

Yes, I've tried, but it was on Debian squeeze.
Debian 10, 64 bit, Gnome 3.30.2, Intel Core i3-6100 CPU 3.70GHz, 8GB RAM.

Lou
Posts: 1739
Joined: 2006-05-08 02:15

Re: Trouble shooting ALSA

#12 Post by Lou »

I think it is 'alsa store' as root and reboot.
Devuan Jessie - IceWM - vimperator - no DM
KISS - Keep It Simple, Stupid

Lou
Posts: 1739
Joined: 2006-05-08 02:15

Re: Trouble shooting ALSA

#13 Post by Lou »

My bad.

I man alsactl and the correct command is:

Code: Select all

alsactl store
Devuan Jessie - IceWM - vimperator - no DM
KISS - Keep It Simple, Stupid

rulet
Posts: 63
Joined: 2011-11-25 18:54

Re: Trouble shooting ALSA

#14 Post by rulet »

Yes, I've did it from root. Doesn't helped.
Debian 10, 64 bit, Gnome 3.30.2, Intel Core i3-6100 CPU 3.70GHz, 8GB RAM.

User avatar
llivv
Posts: 5340
Joined: 2007-02-14 18:10
Location: cold storage

Re: Trouble shooting ALSA

#15 Post by llivv »

Please start your own thread in the Desktop and Multimedia section.
rulet wrote:Yes, I've did it from root. Doesn't helped.
Post.
what commands you are using and any error messages from those commands

also post which mixer you've tried

and if those mixers settings have changed after rebooting.
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.

sterconero
Posts: 1
Joined: 2013-06-05 07:35

Re: Trouble shooting ALSA

#16 Post by sterconero »

craigevil wrote: This script will give a detailed output of the current alsa setup on your system.
Download this script alsa-info.sh save it as alsa-info.sh
To run and create the info file

Code: Select all

bash ./alsa-info.sh --no-upload <-- without this option it will upload to alsa-project.org
alsa-info.sh is no longer there.

I get 404 - Cannot find file

Can you please reupload it?

User avatar
llivv
Posts: 5340
Joined: 2007-02-14 18:10
Location: cold storage

Re: Trouble shooting ALSA

#17 Post by llivv »

In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.

stevesr0
Posts: 159
Joined: 2012-05-05 03:32

Re: Trouble shooting ALSA

#18 Post by stevesr0 »

Have tried to get the internal microphone working on my Fujitsu T4220 convertible laptop since I purchased it three or four years ago. Running Debian Linux the past 2-3 years.

Have fussed with ALSA and read numerous webpages about configuring ALSA to do so.

(Have also heard that internal laptop microphones are problematic.)

The sound card is an Intel 9 series card.

Today, I took another look and saw this thread. Noticed the comment about configuring using the alsactl init command, and one respondent saying that it worked.

Tried it just now and for the first time, with no other adjustments, the internal microphone works.

I launched alsamixer and noted that it seemed to have fewer settings than before I issued the command. (On boot today, I realized that there is a long string of alsactl error messages about not finding files; not sure if that is part of the problem, or that my previous manipulations caused problems or that alsa can't find the files until after the system is fully booted up.)

Anyhow, thanks much craig(-notso-)evil, for the HOWTO.

I will see if the microphone works after rebooting and if not, if repeating the alsactl init command restores it to working order and if my memory allows, I will report back.

stevesr0
Posts: 159
Joined: 2012-05-05 03:32

Re: Trouble shooting ALSA

#19 Post by stevesr0 »

Addendum:

I am running Debian Wheezy (3.2-4 kernel) with ALSA 1.025.

Juniore45
Posts: 2
Joined: 2013-09-03 08:40

Re: Trouble shooting ALSA

#20 Post by Juniore45 »

Thanks for your tips. They are very useful for me.

Post Reply