How to fix volume control (ALSA problem)

Write tutorials here
There are more tutorials here
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
Level 1
Level 1
Posts: 3
Joined: Wed Jan 04, 2012 5:20 pm

How to fix volume control (ALSA problem)

Postby wagalaweia » Thu Jan 12, 2012 4:41 am

This How To is for those people who have trouble with the gnome volume control:

Problem: whenever I change the volume, it does not affect the speaker's loudness at all - just mute (or volume 0) is recognized, but whenever the volume is at some level above 0, the speaker's seem to have full volume.

Possible reason: the new gnome volume control solely controls the pulseaudio sound driver, while several tools still use the alsa sound driver (for me this was even banshee, vlc, ...). For some PCs the forwarding of the volume change in pulseaudio is not correctly forwarded to alsa: the volume change *is* forwarded to the alsa's 'Master' channel, but this is not correct for some PCs - there it has to be the 'PCM' channel.

Check if you have this problem: open a terminal and run 'alsamixer', which is a text-based volume control for all alsa-channels. Therein, you should at least see the channels 'Master', 'Speaker' and 'PCM'. Playback some music and use the arrow keys to change the alsa volumes directly. You might recognize that the PCM volume is the correct one for your needs, while the Master has no effect. Now change the volume using gnome's volume control: you see a simultaneous change of the 'Master' volume bar in the alsamixer, while PCM is always rised to full power. Thus, the problem is that the gnome volume control should control the PCM channel, while it does control the Master channel.

Solution for this problem: tell pulseaudio to let its master volume not steer the alsa 'Master', but the alsa 'PCM' channel. Open and edit with root rights the following file:

Code: Select all

sudo nano /usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common

Therein, you will find the following element:

Code: Select all

[Element PCM]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right

Since no 'Master' element is in this file, it seems as if the Master is the preferred slave for the volume control, and although PCM is set to 'merge' (thus, it is another volume slave), it takes not the desired effect. So, just insert the following block before the PCM-block:

Code: Select all

[Element Master]
switch = mute
volume = ignore

Then, the Master channel should be ignored, while the PCM channels gets affected correctly. You have to reboot your PC to let these changes take effect!

Open problem: at my PC, the headphones are steered by the alsa 'Speaker' channel, which is left to maximum volume (however, fortunately my headphones have their own analog volume control). For now, I didn't find a configuration to let multiple alsa volume channels get steered simultaneously, although it should be possible according to the comments in the above file. I think the best configuration would be to let the gnome volume control steer the 'Speaker' and the 'PCM' channel, but I was not able to configure this. The perfect solution would be to fix the 'volume = merge' or 'volume = <number>' attribute for alsa, so that it is possible to build a simultaneously working volume slave group in alsa. Any further help on this is appreciated! Finally, I think the main problem is that alsa does not use its 'Master' channel as it should, namely, as the master volume for all of its playback channels. If alsa would, then this problem would not exist at all.

Level 1
Level 1
Posts: 21
Joined: Wed Mar 19, 2014 11:07 am

Re: How to fix volume control (ALSA problem)

Postby JBB217 » Thu Mar 16, 2017 8:45 pm

Tried this and didn't work. My vol. keeps going down every song on playlist. Very annoying.

Level 1
Level 1
Posts: 1
Joined: Wed Oct 25, 2017 6:45 am

Re: How to fix volume control (ALSA problem)

Postby tronowski » Wed Oct 25, 2017 6:47 am

Thanks! It solved ALSA issue for me

Return to “Tutorials”