fixing dangerous PulseAudio defaults and giving it a record type

  • Done
  • quality assurance status badge
Details
3 participants
  • Leo Prikler
  • Marius Bakke
  • raingloom
Owner
unassigned
Submitted by
raingloom
Severity
normal
R
R
raingloom wrote on 11 Nov 2019 22:09
(address . bug-guix@gnu.org)
20191111220941.09cae111@riseup.net
Discussion from IRC:

Basically it makes volume settings behave in erratic and surprising
ways that are not obvious even to seasoned Linux users, including
sudden loud noises.

The fix is as simple as adding "flat-volumes = no"
to .config/pulse/daemon.conf, but this should really be a system
default.

However, rather than patching it, the consensus seems to be that we
should create a <pulseaudio-configuration> record type.
L
L
Leo Prikler wrote on 12 Nov 2019 12:00
(address . 38172@debbugs.gnu.org)
e90cdf58363f0462005527cc765a02abe481e5ef.camel@student.tugraz.at

From d48594a3e7e02aef0c5ff9fff719c1d0fb45207e Mon Sep 17 00:00:00 2001
From: Leo Prikler <leo.prikler@student.tugraz.at>
Date: Tue, 12 Nov 2019 02:08:40 +0100
Subject: [PATCH] services: Add PulseAudio service

* gnu/services/sound.scm: (<pulseaudio-configuration>): New record type.
(pulseaudio-service-type): New service type.
---
gnu/services/sound.scm | 58 +++++++++++++++++++++++++++++++++++++++++-
1 file changed, 57 insertions(+), 1 deletion(-)

Toggle diff (76 lines)
diff --git a/gnu/services/sound.scm b/gnu/services/sound.scm
index f2dd24402f..2aedc03c75 100644
--- a/gnu/services/sound.scm
+++ b/gnu/services/sound.scm
@@ -30,7 +30,9 @@
#:use-module (gnu packages pulseaudio)
#:use-module (ice-9 match)
#:export (alsa-configuration
- alsa-service-type))
+ alsa-service-type
+ pulseaudio-configuration
+ pulseaudio-service-type))
;;; Commentary:
;;;
@@ -97,4 +99,58 @@ ctl.!default {
(default-value (alsa-configuration))
(description "Configure low-level Linux sound support, ALSA.")))
+
+;;;
+;;; PulseAudio
+;;;
+
+(define-record-type* <pulseaudio-configuration>
+ pulseaudio-configuration make-pulseaudio-configuration
+ pulseaudio-configuration?
+ (package pulseaudio-package (default pulseaudio))
+ (client-conf pulseaudio-client-conf (default '()))
+ (daemon-conf pulseaudio-daemon-conf (default '((flat-volumes no))))
+ (default-script pulseaudio-default-script (default #f))
+ (system-script pulseaudio-system-script (default #f)))
+
+(define (pulseaudio-conf-entry arg)
+ (match arg
+ ((key value)
+ (format #f "~a = ~a~%" key value))
+ ((? string? _)
+ (string-append arg "\n"))))
+
+(define pulseaudio-etc-service
+ (match-lambda
+ (($ <pulseaudio-configuration> package client-conf daemon-conf
+ default-script system-script)
+ (let ((default.pa (if default-script
+ (apply mixed-text-file "default.pa"
+ default-script)
+ (file-append package "/etc/pulse/default.pa"))))
+ `(("pulse"
+ ,(file-union
+ "pulse"
+ `(("client.conf"
+ ,(apply mixed-text-file "client.conf"
+ (map pulseaudio-conf-entry client-conf)))
+ ("daemon.conf"
+ ,(apply mixed-text-file "daemon.conf"
+ "default-script-file = " default.pa "\n"
+ (map pulseaudio-conf-entry daemon-conf)))
+ ("default.pa" ,default.pa)
+ ("system.pa"
+ ,(if default-script
+ (apply mixed-text-file "system.pa"
+ system-script)
+ (file-append package "/etc/pulse/system.pa")))))))))))
+
+(define pulseaudio-service-type
+ (service-type
+ (name 'pulseaudio)
+ (extensions
+ (list (service-extension etc-service-type pulseaudio-etc-service)))
+ (default-value (pulseaudio-configuration))
+ (description "Configure PulseAudio.")))
+
;;; sound.scm ends here
--
2.24.0
R
R
raingloom wrote on 7 Jan 2020 07:07
Re: WebkitGTK-based browsers: System volume suddenly maxed out when playing audio or video
(address . 38172@debbugs.gnu.org)
54496e7bbfd36f00b982bcdfe0557864d1f7938b.camel@riseup.net
On Mon, 2020-01-06 at 18:02 +0000, Alek Zikon wrote:
Toggle quote (38 lines)
> Everytime audio or video starts playing on WebkitGTK-based browsers
> (epiphany, next), the system volume is maxed out. This happens when
> you start the audio or video by clicking on the play button and also
> when audio or videos are played automatically (in a playlist, or ad
> videos, for example).
>
> This issue has been reported before upstream, but epiphany people say
> the source of the problem is in pulsaudio defaults on distros (
> https://gitlab.gnome.org/GNOME/epiphany/issues/73):
>
> Thanks for reporting this issue. You'll need to ask Debian to
> disable
> PulseAudio's flat volumes feature, as is done by all other major
> distributions (Ubuntu, Arch, Fedora, openSUSE, probably more),
> since we're not going to make any changes here.
>
> I found that there is a related pulsaudio bug reported on Guix (
> https://issues.guix.gnu.org/issue/38172). Unfortunately, this issue
> is still open.
>
> Epiphany people say you, as a user, can work around the issue by
> setting "flat-volumes = no in your /etc/pulse/daemon.conf." What's
> the correct way to this on the Guix System?
>
>
> I'm using this software:
>
> epiphany 3.30.4
> WebKitGTK+ 2.26.1
> GNOME 3.30.2
>
> $ guix describe
> Generation 16 Jan 03 2020 14:36:37 (current)
> guix 7158fe4
> repository URL: https://git.savannah.gnu.org/git/guix.git
> branch: master
> commit: 7158fe4ded47a599ceb8d556132ba83fcc686962
>
L
L
Leo Prikler wrote on 9 Jan 2020 02:22
bug#38172: WebkitGTK-based browsers: System volume suddenly maxed out when playing audio or video
(address . raingloom@riseup.net)(address . 38172@debbugs.gnu.org)
1e5ef8c196053fbeada65e8f525520fb6483530f.camel@student.tugraz.at
Hi Guix,

After looking at my older patch (which no longer cleanly applies), I've
noticed, that pulseaudio doesn't even read the files from /etc. This
is troublesome in multiple ways. For one, pulseaudio causes >500
rebuilds (with >900 dependent packages) and is therefore staging
material, for the other, hardcoding /etc in such a way breaks
pulseaudio without the service.

So far, I've only tested containers via `guix environment --container`,
but from what I can gather with strace, the config file is indeed read
and hence flat-volumes are eliminated. Other ways of making pulseaudio
accept /etc are very welcome. Looking at Nix, they configure
pulseaudio with "--sysconfdir=/etc", but then override sysconfdir and
pulseconfdir during install. I'm not quite sure which solution is
"better", but neither is going to read the config shipped with the
package.

Note: before this can be applied on staging,
a66ee82a05d8ff1ef7c5ff9ac7723cb32fc4e22a needs to be applied.

Regards,
Leo
From bf4708923d14356c87daec69209b30aa0427d64f Mon Sep 17 00:00:00 2001
From: Leo Prikler <leo.prikler@student.tugraz.at>
Date: Wed, 8 Jan 2020 19:50:51 +0100
Subject: [PATCH 1/3] services: Add pulseaudio-configuration.

* gnu/services/sound (<pulseaudio-configuration>): New record.
(pulseaudio-etc): New procedure.
(pulseaudio-service-type): Update accordingly.
---
gnu/services/sound.scm | 47 ++++++++++++++++++++++++++++++++++++++++--
1 file changed, 45 insertions(+), 2 deletions(-)

Toggle diff (78 lines)
diff --git a/gnu/services/sound.scm b/gnu/services/sound.scm
index aaca733729..f01d958ce7 100644
--- a/gnu/services/sound.scm
+++ b/gnu/services/sound.scm
@@ -34,6 +34,7 @@
#:export (alsa-configuration
alsa-service-type
+ pulseaudio-configuration
pulseaudio-service-type))
;;; Commentary:
@@ -106,19 +107,61 @@ ctl.!default {
;;; PulseAudio
;;;
+(define-record-type* <pulseaudio-configuration>
+ pulseaudio-configuration make-pulseaudio-configuration
+ pulseaudio-configuration?
+ (package pulseaudio-package (default pulseaudio))
+ (client-conf pulseaudio-client-conf (default '()))
+ (daemon-conf pulseaudio-daemon-conf (default '((flat-volumes no))))
+ (default-script pulseaudio-default-script (default #f))
+ (system-script pulseaudio-system-script (default #f)))
+
(define (pulseaudio-environment config)
;; Define this variable in the global environment such that
;; pulseaudio swh-plugins works.
`(("LADSPA_PATH"
. ,(file-append swh-plugins "/lib/ladspa"))))
+(define (pulseaudio-conf-entry arg)
+ (match arg
+ ((key value)
+ (format #f "~a = ~s~%" key value))
+ ((? string? _)
+ (string-append arg "\n"))))
+
+(define pulseaudio-etc
+ (match-lambda
+ (($ <pulseaudio-configuration> package client-conf daemon-conf
+ default-script system-script)
+ (let ((default.pa (if default-script
+ (apply mixed-text-file "default.pa"
+ default-script)
+ (file-append package "/etc/pulse/default.pa"))))
+ `(("pulse"
+ ,(file-union
+ "pulse"
+ `(("client.conf"
+ ,(apply mixed-text-file "client.conf"
+ (map pulseaudio-conf-entry client-conf)))
+ ("daemon.conf"
+ ,(apply mixed-text-file "daemon.conf"
+ "default-script-file = " default.pa "\n"
+ (map pulseaudio-conf-entry daemon-conf)))
+ ("default.pa" ,default.pa)
+ ("system.pa"
+ ,(if system-script
+ (apply mixed-text-file "system.pa"
+ system-script)
+ (file-append package "/etc/pulse/system.pa")))))))))))
+
(define pulseaudio-service-type
(service-type
(name 'pulseaudio)
(extensions
(list (service-extension session-environment-service-type
- pulseaudio-environment)))
- (default-value #f)
+ pulseaudio-environment)
+ (service-extension etc-service-type pulseaudio-etc)))
+ (default-value (pulseaudio-configuration))
(description "Configure PulseAudio sound support.")))
;;; sound.scm ends here
--
2.24.1
From 843d3968db990b5b7ff3f618db5847f83b999cb8 Mon Sep 17 00:00:00 2001
From: Leo Prikler <leo.prikler@student.tugraz.at>
Date: Thu, 9 Jan 2020 01:24:09 +0100
Subject: [PATCH 2/3] gnu: pulseaudio: Honor /etc.

* gnu/packages/pulseaudio.scm (pulseaudio) [phases]:
Set PA_DEFAULT_CONFIG_DIR to "/etc/pulse".
---
gnu/packages/pulseaudio.scm | 5 +++++
1 file changed, 5 insertions(+)

Toggle diff (18 lines)
diff --git a/gnu/packages/pulseaudio.scm b/gnu/packages/pulseaudio.scm
index 671dcd1563..1fb5a2f578 100644
--- a/gnu/packages/pulseaudio.scm
+++ b/gnu/packages/pulseaudio.scm
@@ -161,6 +161,11 @@ rates.")
(assoc-ref %outputs "out")
"/lib/udev/rules.d"))
#:phases (modify-phases %standard-phases
+ (add-after 'configure 'hardcode-default-config-dir
+ (lambda _
+ (substitute* "config.h"
+ (("(#define PA_DEFAULT_CONFIG_DIR).*$" all prefix)
+ (string-append prefix " \"/etc/pulse\"")))))
(add-before 'check 'pre-check
(lambda _
;; 'tests/lock-autospawn-test.c' wants to create a file
--
2.24.1
From e24016f9a44a113847dd937ac47ab4bdb960236d Mon Sep 17 00:00:00 2001
From: Leo Prikler <leo.prikler@student.tugraz.at>
Date: Thu, 9 Jan 2020 01:29:13 +0100
Subject: [PATCH 3/3] services: Add pulseaudio to %desktop-services.

* gnu/services/desktop.scm (%desktop-services): Add pulseaudio service.
---
gnu/services/desktop.scm | 1 +
1 file changed, 1 insertion(+)

Toggle diff (14 lines)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index b40622a637..1be05fda4e 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -1183,6 +1183,7 @@ or setting its password with passwd.")))
x11-socket-directory-service
+ (service pulseaudio-service-type)
(service alsa-service-type)
%base-services))
--
2.24.1
M
M
Marius Bakke wrote on 9 Jan 2020 21:48
87eew81hmb.fsf@devup.no
Leo,

Leo Prikler <leo.prikler@student.tugraz.at> writes:

Toggle quote (21 lines)
> Hi Guix,
>
> After looking at my older patch (which no longer cleanly applies), I've
> noticed, that pulseaudio doesn't even read the files from /etc. This
> is troublesome in multiple ways. For one, pulseaudio causes >500
> rebuilds (with >900 dependent packages) and is therefore staging
> material, for the other, hardcoding /etc in such a way breaks
> pulseaudio without the service.
>
> So far, I've only tested containers via `guix environment --container`,
> but from what I can gather with strace, the config file is indeed read
> and hence flat-volumes are eliminated. Other ways of making pulseaudio
> accept /etc are very welcome. Looking at Nix, they configure
> pulseaudio with "--sysconfdir=/etc", but then override sysconfdir and
> pulseconfdir during install. I'm not quite sure which solution is
> "better", but neither is going to read the config shipped with the
> package.
>
> Note: before this can be applied on staging,
> a66ee82a05d8ff1ef7c5ff9ac7723cb32fc4e22a needs to be applied.

Thank you for these patches. Overall it LGTM.

[...]

Toggle quote (9 lines)
> From bf4708923d14356c87daec69209b30aa0427d64f Mon Sep 17 00:00:00 2001
> From: Leo Prikler <leo.prikler@student.tugraz.at>
> Date: Wed, 8 Jan 2020 19:50:51 +0100
> Subject: [PATCH 1/3] services: Add pulseaudio-configuration.
>
> * gnu/services/sound (<pulseaudio-configuration>): New record.
> (pulseaudio-etc): New procedure.
> (pulseaudio-service-type): Update accordingly.

[...]

Toggle quote (7 lines)
> +(define-record-type* <pulseaudio-configuration>
> + pulseaudio-configuration make-pulseaudio-configuration
> + pulseaudio-configuration?
> + (package pulseaudio-package (default pulseaudio))
> + (client-conf pulseaudio-client-conf (default '()))
> + (daemon-conf pulseaudio-daemon-conf (default '((flat-volumes no))))

I have a preference for making this field empty initially to have a 1:1
compatibility with the current PA client and daemon configuration
(i.e. nothing). Then a follow-up patch can add this new configuration,
perhaps with an explaining comment.

Toggle quote (42 lines)
> + (default-script pulseaudio-default-script (default #f))
> + (system-script pulseaudio-system-script (default #f)))
> +
> (define (pulseaudio-environment config)
> ;; Define this variable in the global environment such that
> ;; pulseaudio swh-plugins works.
> `(("LADSPA_PATH"
> . ,(file-append swh-plugins "/lib/ladspa"))))
>
> +(define (pulseaudio-conf-entry arg)
> + (match arg
> + ((key value)
> + (format #f "~a = ~s~%" key value))
> + ((? string? _)
> + (string-append arg "\n"))))
> +
> +(define pulseaudio-etc
> + (match-lambda
> + (($ <pulseaudio-configuration> package client-conf daemon-conf
> + default-script system-script)
> + (let ((default.pa (if default-script
> + (apply mixed-text-file "default.pa"
> + default-script)
> + (file-append package "/etc/pulse/default.pa"))))
> + `(("pulse"
> + ,(file-union
> + "pulse"
> + `(("client.conf"
> + ,(apply mixed-text-file "client.conf"
> + (map pulseaudio-conf-entry client-conf)))
> + ("daemon.conf"
> + ,(apply mixed-text-file "daemon.conf"
> + "default-script-file = " default.pa "\n"
> + (map pulseaudio-conf-entry daemon-conf)))
> + ("default.pa" ,default.pa)
> + ("system.pa"
> + ,(if system-script
> + (apply mixed-text-file "system.pa"
> + system-script)
> + (file-append package "/etc/pulse/system.pa")))))))))))
> +

Does it make sense to have default-script and system-script default to
(file-append pulseaudio "...") and avoid the conditional altogether?

[...]

Toggle quote (8 lines)
> From 843d3968db990b5b7ff3f618db5847f83b999cb8 Mon Sep 17 00:00:00 2001
> From: Leo Prikler <leo.prikler@student.tugraz.at>
> Date: Thu, 9 Jan 2020 01:24:09 +0100
> Subject: [PATCH 2/3] gnu: pulseaudio: Honor /etc.
>
> * gnu/packages/pulseaudio.scm (pulseaudio) [phases]:
> Set PA_DEFAULT_CONFIG_DIR to "/etc/pulse".

This means pulseaudio will start looking in /etc/pulse for configuration
files on foreign distributions too, right?

I wonder if there is better way to give it configuration files. Perhaps
by patching the D-Bus service files? Not a blocker for this series, but
something to consider in case /etc/pulse causes trouble.

[...]

Toggle quote (6 lines)
> + (add-after 'configure 'hardcode-default-config-dir
> + (lambda _
> + (substitute* "config.h"
> + (("(#define PA_DEFAULT_CONFIG_DIR).*$" all prefix)
> + (string-append prefix " \"/etc/pulse\"")))))

End on #t.

[...]

Toggle quote (7 lines)
> From e24016f9a44a113847dd937ac47ab4bdb960236d Mon Sep 17 00:00:00 2001
> From: Leo Prikler <leo.prikler@student.tugraz.at>
> Date: Thu, 9 Jan 2020 01:29:13 +0100
> Subject: [PATCH 3/3] services: Add pulseaudio to %desktop-services.
>
> * gnu/services/desktop.scm (%desktop-services): Add pulseaudio service.

This will pull in "swh-plugins" which was the original intention behind
pulseaudio-service before this patch series. Before adding it to
%desktop-services, I would prefer if the pulseaudio environment
configuration could be made modular, so that there are no configuration
differences for end users, i.e. they'd have to actively enable the
LADSPA plugin.

I'm not sure what the best approach would be though. Ideas, Oleg?

As a final note, can you also update doc/guix.texi accordingly?

TIA,
Marius
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl4XkYwACgkQoqBt8qM6
VPpMOggAhQjnPB9HENH3Mungf7xFhAsTL0vJ3tG049uniYXaQgENtqZiLjPjK8tA
aZ1oZctzVkTSndK1xq5JrH0MPa6k9q9h7fRbOrAupM9CS7KTLfQfskWC6YLSYNW+
KQfHe+2R+jDOS2eUbtKDY00eH9dfLT8gFv5Wh8kRwuzxxk1zWG7I5YfA15ZJbydd
/3wWY3TlrnqJaDwQF5Dv5F8Ay9N+bm1ADJ4Jn+lSgS0VvcadiLuq1173AWqFoyu0
I/9yWH3QGFLyfLWSqPrtawkQCpCcB8LJwcWjq4d+eU7e9WL0yzAPypnMbopFmiAb
IDmWVcun+HLnvPQ/GpT8Ejcmr3epgg==
=uqg/
-----END PGP SIGNATURE-----

L
L
Leo Prikler wrote on 9 Jan 2020 23:49
dce4781f6aed35b80d0a2e566ffb2a676fa29917.camel@student.tugraz.at
Am Donnerstag, den 09.01.2020, 21:48 +0100 schrieb Marius Bakke:
Toggle quote (7 lines)
>
> I have a preference for making this field empty initially to have a
> 1:1
> compatibility with the current PA client and daemon configuration
> (i.e. nothing). Then a follow-up patch can add this new
> configuration,
> perhaps with an explaining comment.
Fair enough. This would mean I'd have to split 0001 into two, but
okay.

Toggle quote (3 lines)
> Does it make sense to have default-script and system-script default
> to
> (file-append pulseaudio "...") and avoid the conditional altogether?
The idea behind it was to have the script itself in the code rather
than asking users to construct a mixed-text-file, but I'm fine either
way.

Toggle quote (9 lines)
> This means pulseaudio will start looking in /etc/pulse for
> configuration
> files on foreign distributions too, right?
>
> I wonder if there is better way to give it configuration
> files. Perhaps
> by patching the D-Bus service files? Not a blocker for this series,
> but
> something to consider in case /etc/pulse causes trouble.
This is already addressed by the renewed series I sent to guix-patches.
I know you already found that, but I'd like to repeat it for those who
thus far have only read this thread.

Toggle quote (1 lines)
> End on #t.
As above, but thanks for the hint, I missed the warning it seems.

Toggle quote (19 lines)
> [...]
>
> > From e24016f9a44a113847dd937ac47ab4bdb960236d Mon Sep 17 00:00:00
> > 2001
> > From: Leo Prikler <leo.prikler@student.tugraz.at>
> > Date: Thu, 9 Jan 2020 01:29:13 +0100
> > Subject: [PATCH 3/3] services: Add pulseaudio to %desktop-services.
> >
> > * gnu/services/desktop.scm (%desktop-services): Add pulseaudio
> > service.
>
> This will pull in "swh-plugins" which was the original intention
> behind
> pulseaudio-service before this patch series. Before adding it to
> %desktop-services, I would prefer if the pulseaudio environment
> configuration could be made modular, so that there are no
> configuration
> differences for end users, i.e. they'd have to actively enable the
> LADSPA plugin.
I think adding a field ladspa-plugins, which accepts a list of packages
and adds their "lib/ladspa" would be the right approach here, but I
also feel, that this perhaps deserves its own service unrelated to
pulseaudio. WDYT?
Either way, I agree on the "having to actively enable" part.

Toggle quote (1 lines)
> As a final note, can you also update doc/guix.texi accordingly?
I will once I've figured out how to best handle these fields.

Regards,
Leo
M
M
Marius Bakke wrote on 11 Jan 2020 17:48
87zheuym66.fsf@devup.no
Leo Prikler <leo.prikler@student.tugraz.at> writes:

Toggle quote (11 lines)
> Am Donnerstag, den 09.01.2020, 21:48 +0100 schrieb Marius Bakke:
>>
>> I have a preference for making this field empty initially to have a
>> 1:1
>> compatibility with the current PA client and daemon configuration
>> (i.e. nothing). Then a follow-up patch can add this new
>> configuration,
>> perhaps with an explaining comment.
> Fair enough. This would mean I'd have to split 0001 into two, but
> okay.

Excellent. :-)

Toggle quote (7 lines)
>> Does it make sense to have default-script and system-script default
>> to
>> (file-append pulseaudio "...") and avoid the conditional altogether?
> The idea behind it was to have the script itself in the code rather
> than asking users to construct a mixed-text-file, but I'm fine either
> way.

Right. I just have a preference for the default being "up-front",
instead of magic hiding behind an #f. :-)

There's also LOCAL-FILE and PLAIN-FILE, which are more "obvious" than
MIXED-TEXT-FILE.

It could be useful to support plain strings for users who don't wish to
much about with G-expressions though, hopefully users will send a bug
report if they find it limiting.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl4Z/EIACgkQoqBt8qM6
VPrpuwgAndmxjxcRd/XSMcazQbXIS4/1YqiayLEzn5WkmYxOJlTZFJEp7XApoLcw
JWNQ65SYbQ0QPoDE6DSs/YVa+fzHYk33aqhSwOF1GZrR0DyYMyv+281q0a27QBNn
QG/nHq+HXjf4tpraYf9Xe6+oYp1kFIy7vYlQu+DxGaELvzVrUYNveC/uzPpz+Bdz
keK/tw4n8Q/RT5IzTCMF8+HaUai/jOKsR/+i1KYx5IHAdx5DDnm6bTGejtqGUP0x
J5Pibe12khiu9IQN3Y8CQweEbNG0F94GAaRxzb8OixehGUSZTyHlrcM0t8XqZtpp
+WDPxy1V9xtekHrmksDexTl+ISpd0g==
=RHYI
-----END PGP SIGNATURE-----

M
M
Marius Bakke wrote on 11 Jan 2020 18:23
Re: [bug#39053] [PATCH] Add pulseaudio configuration and fix volume bugs
(address . 38172-done@debbugs.gnu.org)
87ftglzz3l.fsf@devup.no
Leo Prikler <leo.prikler@student.tugraz.at> writes:

Toggle quote (4 lines)
> This series of patches adds a configuration type for pulseaudio and also fixes
> a bug, where various applications would inadvertently max out the system volume
> (see e.g. #38172).

Thanks! I've pushed the patches with mentioned tweaks in
2c7511fb6..71e33e32f.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl4aBI4ACgkQoqBt8qM6
VPoSbgf+KsPlYkYTZ1jwXDq7hDv5QpbEnbcvKR8tHjb1EX3NSZPIfMrogNj28IAc
amPXpxMDc+fMrpBpREnSQ4sNvq9Ii5tKcZt2Rw9X+8ZqmGIIhKKopEMC/DknrhaB
wtKSL0VuL/s5sXqBrJme3njLhXo0PSp3Ka0fyfg7NgoQW/hDt7+4cQ86wTrfkHKV
I0su/St6SHYkf7GsSUVrtd+5SQQ/HDhPhjXo6r6l9nI+KMzaycoDklrU+nS64YoK
HGiglS0r9U3zJNjJmREXFS8yh+0gfJIwVY3KncvjdRPN09OZkO2oGXA2wDWoDnvh
Hj2YcjWeVpOj3a5628L7AKChtHVACA==
=SXCg
-----END PGP SIGNATURE-----

Closed
L
L
Leo Prikler wrote on 11 Jan 2020 19:37
(address . 38172-done@debbugs.gnu.org)
d17731158ca344803f624bc6c08e5490065f9c40.camel@student.tugraz.at
Am Samstag, den 11.01.2020, 18:23 +0100 schrieb Marius Bakke:
Toggle quote (10 lines)
> Leo Prikler <leo.prikler@student.tugraz.at> writes:
>
> > This series of patches adds a configuration type for pulseaudio and
> > also fixes
> > a bug, where various applications would inadvertently max out the
> > system volume
> > (see e.g. #38172).
>
> Thanks! I've pushed the patches with mentioned tweaks in
> 2c7511fb6..71e33e32f.
Thanks! Also, I'm sorry about accidentally opening like 10 bugs due to
my misconfiguration there. I only noticed after the fact, that merely
CC'ing the original bug does nothing, when the mail is still sent to
guix-patches as well. I've learned my lesson and will be more careful
in the future.

I do still have some open questions, though.
Toggle quote (11 lines)
> > +In addition to the above, @code{default-script-file} will be set to
> > the
> > +value of @code{script-file}. By default, @var{flat-volumes} is
> > set
> > to
> > +``no'', so as to avoid bugs related to this feature.
> >
> The first sentence of this paragraph is obsolete, no? The second is
> rather vague, so I opted to remove the whole thing. Let me know if
> you
> think something should be added!
I'm not quite sure about the first sentence. While everyone can read
the code and the output files produced from it, I think we should
document, that we actually always insert this line into
@file{daemon.conf}.
For instance, if you don't supply your own @file{default.pa}, the first
line of @file{daemon.conf} will be
Toggle snippet (3 lines)
default-script-file = /gnu/store/<hash>-pulseaudio-
<version>/etc/pulse/default.pa
What are your thoughts on this?

Toggle quote (2 lines)
> I added a (default: ...) on these two and removed the related
> sentences.
I was hesitant to do that due to the line limits. Do those not count
for documentation or are such exceptions allowed?

Thanks again for your help and also thanks for your feedback.

Regards,
Leo
Closed
?