Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 401283

Summary: media-sound/pulseaudio doesn't remember previous mixer settings (see comment #8)
Product: Gentoo Linux Reporter: Tolga Dalman <tdalman>
Component: [OLD] GNOMEAssignee: Arun Raghavan (RETIRED) <ford_prefect>
Status: RESOLVED INVALID    
Severity: normal CC: flaschenkopp, gnome, sound
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: pulseaudio-ignore_pcm_volume.patch

Description Tolga Dalman 2012-01-29 10:52:15 UTC
Probably this is a misconception on my side, but I have not been able to properly set up my audio mixer.
Before (Gnome2, no pulseaudio) I had 35% Master volume and 35% PCM volume. Now Gnome3 only stores the Master volume and leaves PCM on 100%. Setting and saving the mixer settings with alsa-mixer doesn't work.

And, btw, I cannot start alsa-mixer as user in the X session. This is due to the following bug I think: http://lists.freedesktop.org/archives/xcb/2012-January/007547.html

Though I don't know, if these issues are related to each other.

Any help is appreciated. Thanks in advance!

Reproducible: Always
Comment 1 Pacho Ramos gentoo-dev 2012-01-29 10:58:18 UTC
This also affects to gnome2+pulseaudio, looks like pulse is forcing PCM to be at 100%
Comment 2 Rafał Mużyło 2012-01-29 15:05:51 UTC
(In reply to comment #1)
> This also affects to gnome2+pulseaudio, looks like pulse is forcing PCM to be
> at 100%

You know, there's something funny here:
http://git.alsa-project.org/?p=alsa-utils.git;a=shortlog;h=4c09aaa5c13c2260fea57a89c47f88252da8a692 shows the commit that's supposed to fix the mentioned freedesktop bug, but I don't see this commit on http://git.alsa-project.org/?p=alsa-utils.git;a=shortlog. On the other hand, http://git.alsa-project.org/?p=alsa-utils.git;a=history;f=alsamixer shows that commit.

I wonder if that's a known bug of this git frontend.

Back on topic: here upon 'amixer':
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 65536
  Mono:
  Front Left: Playback 55667 [85%] [on]
  Front Right: Playback 55667 [85%] [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch cswitch-joined penum
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 65536
  Front Left: Capture 65535 [100%] [on]
  Front Right: Capture 65535 [100%] [on]

upon 'amixer -c 0':
...
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [0.00dB] [on]
  Front Right: Playback 31 [100%] [0.00dB] [on]
...
Simple mixer control 'PCM',0
  Capabilities: pvolume pswitch pswitch-joined penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 28 [90%] [7.50dB] [on]
  Front Right: Playback 28 [90%] [7.50dB] [on]
...

so it seems it's the opposite of your experience.
Mind though I'm not using Gnome (or any other global solution (other than pulseaudio, of course)).
Comment 3 Pacho Ramos gentoo-dev 2012-01-30 09:23:23 UTC
In my case I experience the following:
- I open alsamixer and turn down PCM to, for example, 50%
- As soon as I turn up my volume from any gnome control, PCM jumps to 100% again

That would explain why you don't experience this issue, as it seems caused by gnome-pulseaudio interaction
Comment 4 labor_ratte 2012-04-19 12:53:17 UTC
Created attachment 309507 [details, diff]
pulseaudio-ignore_pcm_volume.patch
Comment 5 labor_ratte 2012-04-19 12:54:50 UTC
(In reply to comment #3)
I always had to modify the config file to circumvent this behaviour.
See attached patch. Found this somewhere in the *buntu forums long ago.
Comment 6 Pacho Ramos gentoo-dev 2012-04-19 19:53:45 UTC
This should be handled at pulseaudio side then
Comment 7 Arun Raghavan (RETIRED) gentoo-dev 2012-05-11 11:40:35 UTC
This is expected behaviour: http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/PulseAudioStoleMyVolumes

The idea is that PulseAudio takes your target volume and automatically figures out the best mixer setting to match that (starting from the control closest to the hardware and then working backwards).
Comment 8 Tolga Dalman 2012-05-12 08:50:49 UTC
Yes, I thought that it must have been intentionally. In fact, I don't care much about actual PCM or Master volumes, but rather to the total volume as described in the link you sent. To repeat myself: pulseaudio doesn't respect ALSA Mixer settings. I have to adjust my volumes every startup, and that's quite annoying.

In particular, wrt PCM and Master settings, the optimal volumes I used before were 32% Master and 30% PCM. Now, pulseaudio sets 9% Master and 100% PCM volumes. To get approximately the same volume as before, I need to set 13% Master and 100% PCM. Every time.
Oh, and btw: the problem persists with the freshly released pulseaudio 2.0.

Thanks.
Comment 9 Pacho Ramos gentoo-dev 2012-05-12 08:57:38 UTC
Probably you shouldn't set your preferred settings from alsamixer, you should use volume controls for pulse (like gnome one)
Comment 10 Tolga Dalman 2012-05-12 09:28:25 UTC
You mean, I should use my computer like a Windows PC with a nice and polished GUI tool instead of my favorite shiny console alsamixer ? *g*

Seriously, is this recognized as a bug in upstream, or just "intended behavior, RTFM, go away" ? Arun ?
Comment 11 Pacho Ramos gentoo-dev 2012-05-12 09:35:40 UTC
I think it's expected, maybe:
https://wiki.archlinux.org/index.php/PulseAudio#Pulse_overwrites_ALSA_settings

can help you. But better way for Arun's opinion as he's the pulseaudio expert ;)
Comment 12 Pacho Ramos gentoo-dev 2012-05-12 09:36:26 UTC
(In reply to comment #11)
> I think it's expected, maybe:
> https://wiki.archlinux.org/index.php/
> PulseAudio#Pulse_overwrites_ALSA_settings
> 
> can help you. But better way for Arun's opinion as he's the pulseaudio
> expert ;)

way -> wait
Comment 13 Arun Raghavan (RETIRED) gentoo-dev 2012-05-12 09:40:24 UTC
(In reply to comment #10)
> You mean, I should use my computer like a Windows PC with a nice and
> polished GUI tool instead of my favorite shiny console alsamixer ? *g*
> 
> Seriously, is this recognized as a bug in upstream, or just "intended
> behavior, RTFM, go away" ? Arun ?

We wouldn't tell you to go away without at least trying to resolve your problem. :)

With recent PA, alsa-lib, and alsa-plugins, your default ALSA device should go via the ALSA pulse plugin, in which case alsamixer will give you a single volume mixer to set the PA volume. That make things work the way you want without any of this new-fangled GUI business. ;)
Comment 14 Pacho Ramos gentoo-dev 2012-05-12 09:47:13 UTC
What is preventing PDEPEND on alsa-plugins[pulseaudio] from testing versions to enter stable tree too? Some days ago I needed to re-emerge it because it got depcleaned and I started to get adobe-flash blocking sound device again :(

Thanks for the info :)
Comment 15 Arun Raghavan (RETIRED) gentoo-dev 2012-05-12 09:48:54 UTC
(In reply to comment #14)
> What is preventing PDEPEND on alsa-plugins[pulseaudio] from testing versions
> to enter stable tree too? Some days ago I needed to re-emerge it because it
> got depcleaned and I started to get adobe-flash blocking sound device again
> :(
> 
> Thanks for the info :)

There's a PDEPEND with 2.0. :)
Comment 16 Tolga Dalman 2012-05-12 11:20:35 UTC
First of all thanks for your help. alsa-plugins[pulseaudio] is already installed here, and I can adjust the single PA volume (which is equivalent to the Master volume). Still, these settings are not stored when rebooting. What am I doing wrong ? I thought, the volumes were saved on shutdown with /etc/init.d/alsasound ...