Welcome!
Important information
-- Spectre and Meltdown vulnerabilities
-- Change in MX sources

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-17.1 Final release info here
-- antiX-17 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

ALSA: Setting the default sound device

Just as the name says, here is where you can post tips and tricks to share with other users of MEPIS.
Post Reply
Message
Author
User avatar
handy
Forum Regular
Forum Regular
Posts: 127
Joined: Mon Apr 23, 2018 2:00 pm

ALSA: Setting the default sound device

#1 Post by handy » Fri Oct 19, 2018 9:15 pm

For those of us that don't use Pulseaudio for whatever reason, we may on occasion find that we don't get sound. Digging into why we don't get sound, we often find that the reason is that the wrong sound card is being chosen. Following is a simple & permanent fix to this problem:


If your system keeps on using the wrong device (HDMI instead of PCH or vica versa, or some other problem), then use one of the following two methods to identify the device's number & then instruct your system to use that number/device:

Run alsamixer - if you have it installed, just enter:

Code: Select all

alsamixer
at the terminal prompt.

In alsamixer hit the F6 function key, then you'll see the devices listed in a little box, with their numbers in front of them.

OR

Enter the following into a terminal:

Code: Select all

cat /proc/asound/cards

Choose the number of the sound device that you want to use.
Then using your text editor of choice, put the following into /etc/asound.conf (You will most likely have to create /etc/asound.conf ).

Code: Select all

defaults.pcm.card 1
defaults.ctl.card 1
Change the number from 1 to 0 , 2 or whatever?

Save the file & play a movie or listen to a tune.

I can imagine that if you had need to change between two sound devices from time to time, you could write a simple script that quickly swapped from one /etc/asound.conf file to another. All it would have to do is change/swap the file extensions from asound.conf.bak to asound.conf & visa versa when desired. ;)


The core information in this page came from the ALSA Project:

https://www.alsa-project.org/main/index.php/Main_Page

For those that need a fix for the same problem & they are running Pulseaudio, this page has a solution:

https://forum.manjaro.org/t/pulseaudio- ... vice/36562
Clevo N'book (2014): P150SM-A
CPU: i7-4810MQ (Haswell) Speed: 2800/3800 MHz
RAM: 16 GiB 1600 MHz DDR3
GPU-1: i915
GPU-2: NVIDIA GK104M [GeForce GTX 880M] vRAM: 8GB 2500 Mhz DDR5
Storage: TOSHIBA 931.51 GiB. HGST 931.51 GiB. Crucial 223.57 GiB (M.2 SSD)

User avatar
Jerry3904
Forum Veteran
Forum Veteran
Posts: 22644
Joined: Wed Jul 19, 2006 6:13 am

Re: ALSA: Setting the default sound device

#2 Post by Jerry3904 » Fri Oct 19, 2018 9:30 pm

Have you looked at MX Select Sound, which puts this in GUI form?
Production: 4.15.0-1-amd64, MX-17.1, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 8 GB, Kingston SSD 120 GB and WesternDigital 1TB
Testing: AAO 722: 4.15.0-1-386. MX-17.1, AMD C-60 APU, 4 GB

User avatar
KoO
Forum Regular
Forum Regular
Posts: 306
Joined: Fri Feb 10, 2017 1:21 am

Re: ALSA: Setting the default sound device

#3 Post by KoO » Fri Oct 19, 2018 11:30 pm

@handy
Good information for those of us who don,t use pulseaudio...
AntiX 17.2 (4.18.7) i3 ,Windows8.1 , Intel Xeon E3-1241 v3 , 16gb HyperX , Samsung EVO 860 500 GB , Samsung EVO 860 500 GB , GTX 970
Lenovo T430 AntiX17.2 (4.18.7) i3 ,MX17 ,Windows8.1 , i5 +4000 , 8gb , Samsung EVO 860 500 GB , 1TB HGST

User avatar
handy
Forum Regular
Forum Regular
Posts: 127
Joined: Mon Apr 23, 2018 2:00 pm

Re: ALSA: Setting the default sound device

#4 Post by handy » Fri Oct 19, 2018 11:51 pm

Jerry3904 wrote:
Fri Oct 19, 2018 9:30 pm
Have you looked at MX Select Sound, which puts this in GUI form?
Jerry I don't use the standard MX setup. So all of those GUI tools don't exist in the system that I use.

I know that there are a LOT of really cool & popular tools that both antiX & MX bring to the table for their respective communities. I'm just bit more CLI & config file oriented (though I'm not a terminal freek). ;)
Clevo N'book (2014): P150SM-A
CPU: i7-4810MQ (Haswell) Speed: 2800/3800 MHz
RAM: 16 GiB 1600 MHz DDR3
GPU-1: i915
GPU-2: NVIDIA GK104M [GeForce GTX 880M] vRAM: 8GB 2500 Mhz DDR5
Storage: TOSHIBA 931.51 GiB. HGST 931.51 GiB. Crucial 223.57 GiB (M.2 SSD)

User avatar
handy
Forum Regular
Forum Regular
Posts: 127
Joined: Mon Apr 23, 2018 2:00 pm

Re: ALSA: Setting the default sound device

#5 Post by handy » Fri Oct 19, 2018 11:52 pm

KoO wrote:
Fri Oct 19, 2018 11:30 pm
@handy
Good information for those of us who don,t use pulseaudio...
Thanks KoO. :)

Though, as jerry says, there looks to be a GUI way of doing this built into MX/(maybe antiX too?).
Clevo N'book (2014): P150SM-A
CPU: i7-4810MQ (Haswell) Speed: 2800/3800 MHz
RAM: 16 GiB 1600 MHz DDR3
GPU-1: i915
GPU-2: NVIDIA GK104M [GeForce GTX 880M] vRAM: 8GB 2500 Mhz DDR5
Storage: TOSHIBA 931.51 GiB. HGST 931.51 GiB. Crucial 223.57 GiB (M.2 SSD)

User avatar
KoO
Forum Regular
Forum Regular
Posts: 306
Joined: Fri Feb 10, 2017 1:21 am

Re: ALSA: Setting the default sound device

#6 Post by KoO » Fri Oct 26, 2018 12:19 am

------------------Set Default Sound Card AntiX--------------------

Terminal = antiX-cli-cc press enter > Audio/Visual menu > alsa-set-default-card > enter number (Use your arrow keys to move around)

antix Control Centre > Set Default Sound Card > pick your card > click ok

AlsaMixer > F6 or s > pick your card > exit (just to make sure the settings are saved after you pick your card run this command) = sudo alsactl store

Some sound card commands
aplay -l
aplay -L

For sound modules
cat /proc/asound/modules
AntiX 17.2 (4.18.7) i3 ,Windows8.1 , Intel Xeon E3-1241 v3 , 16gb HyperX , Samsung EVO 860 500 GB , Samsung EVO 860 500 GB , GTX 970
Lenovo T430 AntiX17.2 (4.18.7) i3 ,MX17 ,Windows8.1 , i5 +4000 , 8gb , Samsung EVO 860 500 GB , 1TB HGST

Post Reply

Return to “Tips&Tricks”