Pulseaudio is not looking for user configuration

  • Done
  • quality assurance status badge
Details
4 participants
  • Diego Nicola Barbato
  • Ludovic Courtès
  • pkill9
  • raingloom
Owner
unassigned
Submitted by
pkill9
Severity
normal
P
P
pkill9 wrote on 10 Apr 2020 19:20
(address . bug-guix@gnu.org)
20200410182025.0fb30500@runbox.com
Pulseaudio doesn't read my user configuration files according to strace.

Attached is the output of `strace -o /tmp/log.log pulseaudio` - It only
looks for /etc/pulse/daemon.conf.
Attachment: log.log
R
R
raingloom wrote on 11 Apr 2020 22:26
(name . pkill9)(address . pkill9@runbox.com)(address . 40544@debbugs.gnu.org)
20200411222609.1e62239e@riseup.net
On Fri, 10 Apr 2020 18:20:25 +0100
pkill9 <pkill9@runbox.com> wrote:

Toggle quote (6 lines)
> Pulseaudio doesn't read my user configuration files according to
> strace.
>
> Attached is the output of `strace -o /tmp/log.log pulseaudio` - It
> only looks for /etc/pulse/daemon.conf.

Weird, when I put flat_volumes in my user config it fixed things.

Have you tried `strace -f`?
P
P
pkill9 wrote on 16 Apr 2020 01:09
(name . raingloom)(address . raingloom@riseup.net)(address . 40544@debbugs.gnu.org)
20200416000952.7abe5eab@runbox.com
Hi raingloom,

Toggle quote (4 lines)
> Weird, when I put flat_volumes in my user config it fixed things.
>
> Have you tried `strace -f`?

Yep, I just run `strace -fo /tmp/log.log pulseaudio`, i've attached the
logfile. It doesn't try to access the user's pulseaudio config.
Attachment: log.log
D
D
Diego Nicola Barbato wrote on 16 Apr 2020 16:26
(name . pkill9)(address . pkill9@runbox.com)(address . 40544@debbugs.gnu.org)
877dyfik0x.fsf@GlaDOS.home
Hey,

pkill9 <pkill9@runbox.com> writes:

Toggle quote (5 lines)
> Pulseaudio doesn't read my user configuration files according to strace.
>
> Attached is the output of `strace -o /tmp/log.log pulseaudio` - It only
> looks for /etc/pulse/daemon.conf.

That's a known [0] (but AFAIK undocumented) side effect of the
PulseAudio service, which was added to %desktop-services in January [1].
If you want PulseAudio to read your user configuration files you'll have
to remove that service from your system services or unset PULSE_CONFIG
and PULSE_CLIENT_CONFIG in ~/.profile [2].

Regards,

Diego

P
P
pkill9 wrote on 17 Apr 2020 03:27
(name . Diego Nicola Barbato)(address . dnbarbato@posteo.de)(address . 40544@debbugs.gnu.org)
20200417022754.52aa7cbe@runbox.com
Toggle quote (6 lines)
> That's a known [0] (but AFAIK undocumented) side effect of the
> PulseAudio service, which was added to %desktop-services in January
> [1]. If you want PulseAudio to read your user configuration files
> you'll have to remove that service from your system services or unset
> PULSE_CONFIG and PULSE_CLIENT_CONFIG in ~/.profile [2].

Thank you very much for pointing that out, I've solved all my problems
with Pulseaudio now. Glad it was just a trivial misconfiguration and
not a bug.
L
L
Ludovic Courtès wrote on 22 Apr 2020 22:00
(name . Diego Nicola Barbato)(address . dnbarbato@posteo.de)
87h7xbthne.fsf@gnu.org
Hi Diego,

Diego Nicola Barbato <dnbarbato@posteo.de> skribis:

Toggle quote (13 lines)
> pkill9 <pkill9@runbox.com> writes:
>
>> Pulseaudio doesn't read my user configuration files according to strace.
>>
>> Attached is the output of `strace -o /tmp/log.log pulseaudio` - It only
>> looks for /etc/pulse/daemon.conf.
>
> That's a known [0] (but AFAIK undocumented) side effect of the
> PulseAudio service, which was added to %desktop-services in January [1].
> If you want PulseAudio to read your user configuration files you'll have
> to remove that service from your system services or unset PULSE_CONFIG
> and PULSE_CLIENT_CONFIG in ~/.profile [2].

It would be good to document that, right below
‘pulseaudio-service-type’. Would you like to give it a try, Diego?

Or alternately, is there a way we can arrange so that the user’s config
takes precedence over /etc/pulse?

Thanks,
Ludo’.
D
D
Diego Nicola Barbato wrote on 28 Apr 2020 11:58
(name . Ludovic Courtès)(address . ludo@gnu.org)
87368ohqyr.fsf@GlaDOS.home
Hi,

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (20 lines)
> Hi Diego,
>
> Diego Nicola Barbato <dnbarbato@posteo.de> skribis:
>
>> pkill9 <pkill9@runbox.com> writes:
>>
>>> Pulseaudio doesn't read my user configuration files according to strace.
>>>
>>> Attached is the output of `strace -o /tmp/log.log pulseaudio` - It only
>>> looks for /etc/pulse/daemon.conf.
>>
>> That's a known [0] (but AFAIK undocumented) side effect of the
>> PulseAudio service, which was added to %desktop-services in January [1].
>> If you want PulseAudio to read your user configuration files you'll have
>> to remove that service from your system services or unset PULSE_CONFIG
>> and PULSE_CLIENT_CONFIG in ~/.profile [2].
>
> It would be good to document that, right below
> ‘pulseaudio-service-type’. Would you like to give it a try, Diego?

I've attached a patch, which adds a warning to the documentation.

Toggle quote (3 lines)
> Or alternately, is there a way we can arrange so that the user’s config
> takes precedence over /etc/pulse?

We can't configure PulseAudio with "--sysconfdir=/etc" because it would
break without the service (e.g. on foreign distributions).[0]

We could patch PulseAudio to make the sysconfdir configurable at runtime
using an environment variable. The service could set this environment
variable to /etc instead of setting ‘PULSE_CONFIG’ and
‘PULSE_CLIENT_CONFIG’. That way the user's config would take precedence
over /etc/pulse (PulseAudio's normal behaviour). Without the service
(and with the environment variable unset) it would fall back to the
sysconfdir configured at build time so it wouldn't break on foreign
distributions. Although I doubt that the slight improvement in user
experience would justify the increased maintenance burden.

Regards,

Diego

From a33a10102f555454d9025b0693edf8d539f6a7af Mon Sep 17 00:00:00 2001
From: Diego Nicola Barbato <dnbarbato@posteo.de>
Date: Sat, 25 Apr 2020 11:32:07 +0200
Subject: [PATCH] doc: Mention that PulseAudio service overrides user
configuration.

* doc/guix.texi (Sound Services): Add a warning that 'pulseaudio-service-type'
overrides per-user configuration files in '~/.config/pulse'.
---
doc/guix.texi | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

Toggle diff (29 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index 19094c4b70..683c40b476 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -63,7 +63,7 @@ Copyright @copyright{} 2018, 2019 Florian Pelz@*
Copyright @copyright{} 2018 Laura Lazzati@*
Copyright @copyright{} 2018 Alex Vong@*
Copyright @copyright{} 2019 Josh Holland@*
-Copyright @copyright{} 2019 Diego Nicola Barbato@*
+Copyright @copyright{} 2019, 2020 Diego Nicola Barbato@*
Copyright @copyright{} 2019 Ivan Petkov@*
Copyright @copyright{} 2019 Jakob L. Kreuze@*
Copyright @copyright{} 2019 Kyle Andrews@*
@@ -16288,6 +16288,13 @@ This is the type for the @uref{https://www.pulseaudio.org/, PulseAudio}
sound server. It exists to allow system overrides of the default settings
via @code{pulseaudio-configuration}, see below.
+@quotation Warning
+This service overrides per-user configuration files. If you want
+PulseAudio to honor configuraton files in @file{~/.config/pulse} you
+have to unset the environment variables @code{PULSE_CONFIG} and
+@code{PULSE_CLIENTCONFIG} in your @file{~/.bash_profile}.
+@end quotation
+
@quotation Warning
This service on its own does not ensure, that the @code{pulseaudio} package
exists on your machine. It merely adds configuration files for it, as
--
2.26.0
L
L
Ludovic Courtès wrote on 28 Apr 2020 22:49
(name . Diego Nicola Barbato)(address . dnbarbato@posteo.de)
87lfmftjwr.fsf@gnu.org
Hi Diego,

Diego Nicola Barbato <dnbarbato@posteo.de> skribis:

Toggle quote (17 lines)
>>> That's a known [0] (but AFAIK undocumented) side effect of the
>>> PulseAudio service, which was added to %desktop-services in January [1].
>>> If you want PulseAudio to read your user configuration files you'll have
>>> to remove that service from your system services or unset PULSE_CONFIG
>>> and PULSE_CLIENT_CONFIG in ~/.profile [2].
>>
>> It would be good to document that, right below
>> ‘pulseaudio-service-type’. Would you like to give it a try, Diego?
>
> I've attached a patch, which adds a warning to the documentation.
>
>> Or alternately, is there a way we can arrange so that the user’s config
>> takes precedence over /etc/pulse?
>
> We can't configure PulseAudio with "--sysconfdir=/etc" because it would
> break without the service (e.g. on foreign distributions).[0]

OK.

Toggle quote (10 lines)
> We could patch PulseAudio to make the sysconfdir configurable at runtime
> using an environment variable. The service could set this environment
> variable to /etc instead of setting ‘PULSE_CONFIG’ and
> ‘PULSE_CLIENT_CONFIG’. That way the user's config would take precedence
> over /etc/pulse (PulseAudio's normal behaviour). Without the service
> (and with the environment variable unset) it would fall back to the
> sysconfdir configured at build time so it wouldn't break on foreign
> distributions. Although I doubt that the slight improvement in user
> experience would justify the increased maintenance burden.

Yeah, plus I’d rather use existing mechanism than patch PulseAudio.

But anyway, we can revisit this later if documenting the issue turns out
to be insufficient.

Toggle quote (9 lines)
> From a33a10102f555454d9025b0693edf8d539f6a7af Mon Sep 17 00:00:00 2001
> From: Diego Nicola Barbato <dnbarbato@posteo.de>
> Date: Sat, 25 Apr 2020 11:32:07 +0200
> Subject: [PATCH] doc: Mention that PulseAudio service overrides user
> configuration.
>
> * doc/guix.texi (Sound Services): Add a warning that 'pulseaudio-service-type'
> overrides per-user configuration files in '~/.config/pulse'.

Applied, thank you!

Ludo’.
Closed
?