Editing pulseaudio config file fails with "No such file or directory"

OpenSubmitted by Nathan Dehnel.
Details
3 participants
  • Leo Prikler
  • Nathan Dehnel
  • Ricardo Wurmus
Owner
unassigned
Severity
normal
N
N
Nathan Dehnel wrote 7 days ago
(address . bug-guix@gnu.org)
CAEEhgEuYiWkSJg-c8PS3Ka0s=HD1RybTWYWMDg6Mi7o2pXNNCg@mail.gmail.com
Relevant snippet:(define %my-services ;; My very own list of services. (modify-services %desktop-services (pulseaudio-service-type config => (pulseaudio-configuration (inherit config) (script-file"/home/nathan/.config/pulse/default.pa")))))
/home/nathan/guix/config.scm:;; This is an operating system configuration generated;; by the graphical installer.
(use-modules (gnu))(use-service-modules desktop networking ssh xorg);; Import nonfree linux module.(use-modules (nongnu packages linux) (nongnu system linux-initrd))(use-modules (gnu services sound))(use-modules (gnu packages pulseaudio))
(define %my-services ;; My very own list of services. (modify-services %desktop-services (pulseaudio-service-type config => (pulseaudio-configuration (inherit config) (script-file"/home/nathan/.config/pulse/default.pa")))))
(operating-system (kernel linux) (initrd microcode-initrd) (firmware (list linux-firmware)) (locale "en_US.utf8") (timezone "America/Chicago") (keyboard-layout (keyboard-layout "us" "altgr-intl")) (bootloader (bootloader-configuration (bootloader grub-efi-bootloader) (target "/boot/efi") (keyboard-layout keyboard-layout))) (mapped-devices (list (mapped-device (source (uuid "d9ca0501-1dd4-4085-905a-9f0aa1bbd5a1")) (target "cryptroot") (type luks-device-mapping)))) (file-systems (cons* (file-system (mount-point "/boot/efi") (device (uuid "EB48-BC12" 'fat32)) (type "vfat")) (file-system (mount-point "/") (device "/dev/mapper/cryptroot") (type "btrfs") (dependencies mapped-devices)) (file-system (mount-point "/media/store") (device "gentooserver:/") (type "nfs4") (mount? #f) (create-mount-point? #t) (options "rw,_netdev,noauto,user,lazytime,exec,tcp")) %base-file-systems)) (host-name "guixlaptop") (users (cons* (user-account (name "nathan") (comment "Nathan Dehnel") (group "users") (home-directory "/home/nathan") (supplementary-groups '("wheel" "netdev" "audio" "video" "kvm"))) %base-user-accounts)) (packages (append (list (specification->package "openbox") (specification->package "nss-certs")) %base-packages)) (services (append (list (service gnome-desktop-service-type) (service xfce-desktop-service-type) (service tor-service-type) (pam-limits-service (list (pam-limits-entry "@audio" 'both 'rtprio 99) (pam-limits-entry "@audio" 'both 'memlock 'unlimited) (pam-limits-entry "@realtime" 'both 'rtprio 99) (pam-limits-entry "@realtime" 'both 'memlock 'unlimited)))"/home/nathan/.config/pulse/default.pa")))) (set-xorg-configuration (xorg-configuration (keyboard-layout keyboard-layout)))) %my-services)))

Relevant manual page:https://guix.gnu.org/manual/en/html_node/Sound-Services.html
Command:bash-5.0$ sudo guix system reconfigure '/home/nathan/guix/config.scm'Password:guix system: warning: Your Guix installation is 26 days old.guix system: warning: Consider running 'guix pull' followed by'guix system reconfigure' to get up-to-date packages and security updates.
The following derivations will be built: /gnu/store/acq4drfdn27m7ii7bcmzkpixfg9ilzcz-system.drv /gnu/store/86p3i23a8pydllh30wwlg20nh5js52m7-boot.drv /gnu/store/dpkf322d0j98lcwy1ily0d763684ypla-activate.scm.drv /gnu/store/76z6jjyahkivnb0423cpvj6asv7yr4gg-activate-service.scm.drv /gnu/store/j0ma4b6j8ah123sf7pk97c9axh461s1c-etc.drv /gnu/store/3ybxvw8rmn4q7r2zlcrv28qimmk1619v-pulse.drv /gnu/store/715xzqa8cg29p498bsf4c1k27mlpjd4k-grub.cfg.drvbuilding /gnu/store/3ybxvw8rmn4q7r2zlcrv28qimmk1619v-pulse.drv...\builder for `/gnu/store/3ybxvw8rmn4q7r2zlcrv28qimmk1619v-pulse.drv'failed with exit code 1build of /gnu/store/3ybxvw8rmn4q7r2zlcrv28qimmk1619v-pulse.drv failedView build log at'/var/log/guix/drvs/3y/bxvw8rmn4q7r2zlcrv28qimmk1619v-pulse.drv.bz2'.cannot build derivation`/gnu/store/j0ma4b6j8ah123sf7pk97c9axh461s1c-etc.drv': 1 dependenciescouldn't be builtcannot build derivation`/gnu/store/acq4drfdn27m7ii7bcmzkpixfg9ilzcz-system.drv': 1dependencies couldn't be builtguix system: error: build of`/gnu/store/acq4drfdn27m7ii7bcmzkpixfg9ilzcz-system.drv' failed
Log:bash-5.0$ bzip2 -dkc/var/log/guix/drvs/3y/bxvw8rmn4q7r2zlcrv28qimmk1619v-pulse.drv.bz2Backtrace: 2 (primitive-load "/gnu/store/sr5criapbpr4xk168wk3daxd0w4?")In ice-9/eval.scm: 619:8 1 (_ #f)In unknown file: 0 (stat "/home/nathan/.config/pulse/default.pa" #<undefin?>)
ERROR: In procedure stat:In procedure stat: No such file or directory:"/home/nathan/.config/pulse/default.pa"
FIle:bash-5.0$ ls -l /home/nathan/.config/pulse/default.pa-rw-r--r-- 1 nathan users 4811 Jun 26 00:15/home/nathan/.config/pulse/default.pa
L
L
Leo Prikler wrote 7 days ago
(address . ncdehnel@gmail.com)(address . bug-guix@gnu.org)
8bba5017b0c04cb4c92d25a855bf4d70986aa8bd.camel@student.tugraz.at
Hello Nathan,
The snippet you've supplied
Toggle quote (8 lines)> (define %my-services> ;; My very own list of services.> (modify-services %desktop-services> (pulseaudio-service-type config =>> (pulseaudio-configuration> (inherit config)> (script-file> "/home/nathan/.config/pulse/default.pa")))))
can not possibly work. The reason for that, is that "file" does notrefer to an actual file, but to a file-like object as returned by GuixG-Expressions. You probably want to use `mixed-text-file' or somethingsimilar to write your default.pa inside Guix itself. Alternatively,you can unset PULSE_CONFIG and PULSE_CLIENTCONFIG in your .profile (orequivalent for other shells) and Pulseaudio should load your localconfiguration.
Regards, Leo
L
L
Leo Prikler wrote 6 days ago
(name . Nathan Dehnel)(address . ncdehnel@gmail.com)(address . 42118@debbugs.gnu.org)
8104d8d87ddfcd1572dd6e0dd553a2fcaa7483f0.camel@student.tugraz.at
Am Dienstag, den 30.06.2020, 05:22 -0500 schrieb Nathan Dehnel:
Toggle quote (2 lines)> Thanks for the tip. Do I have to put the entire file inside a string> in guix? It's quite long.
mixed-text-file allows you to split the string into multiple parts, butthat is essentially the idea, yes. There are of course other ways ofbuilding it, but it is your task to ensure, that those end up with theresult you want. In my personal opinion, explicit coding tends to bebest suited to accomplish this.
Toggle quote (8 lines)> https://guix.gnu.org/manual/en/html_node/G_002dExpressions.html> > It mentions "local-file" so I did this:> (script-file (local-file> "/home/nathan/.config/pulse/default.pa"))))))> > guix system reconfigure then completed, but pulseaudio does not seem> to reflect the change in settings.
That should work up to a certain extent – what this basically does iscopy your local default.pa into the Guix store and then/etc/pulse/default.pa is a symlink to that file in the Guix store. Depending on the content of default.pa, that may not actually be whatyou want, but unless you're doing very weird things in there, it mayalso be a perfectly valid configuration.Can you check, that /etc/pulse/default.pa is indeed what you want it tobe? IIRC, you may have to reboot for /etc to change.
Regards, Leo
L
L
Leo Prikler wrote 5 days ago
(name . Nathan Dehnel)(address . ncdehnel@gmail.com)(address . 42118@debbugs.gnu.org)
346a83e1452455cbcf58c97cd260f571cd4af278.camel@student.tugraz.at
Am Mittwoch, den 01.07.2020, 01:58 -0500 schrieb Nathan Dehnel:
Toggle quote (13 lines)> There is a file 86cvvgnb03cc11li0m0s3nrl73zf68fm-default.pa with my> changes in it in /gnu/store.> > load-module module-jack-sink> load-module module-jack-source> > Maybe pulse wasn't compiled with support for this feature enabled?> > This setting in /etc/pulse/daemon.conf points somewhere else:> ; default-script-file => /gnu/store/y0lbm4qcxm3i8i7q1msp0ng1pysg8pb9-pulseaudio-> 13.0/etc/pulse/default.pa> I assume guix overrides this somehow?
I don't think so. The relevant code portions are ingnu/services/sound.scm and read among others:
(define pulseaudio-environment (match-lambda (($ <pulseaudio-configuration> client-conf daemon-conf default-script-file) `(("PULSE_CONFIG" . ,(apply mixed-text-file "daemon.conf" "default-script-file = " default-script-file "\n" (map pulseaudio-conf-entry daemon-conf))) ("PULSE_CLIENTCONFIG" . ,(apply mixed-text-file "client.conf" (map pulseaudio-conf-entry client-conf)))))))
Due to a bug with webkit sandboxing, we no longer put daemon.conf into/etc/pulse (my bad), but rather set PULSE_CONFIG to directly point toit. As you can see, `default-script-file' should be set to the fileyou're supplying. I am currently unsure, at which point this variablegets updated (I still think you need to reboot), but I'm prettyconvinced, this would work with a custom script file.
Regards, Leo.
L
L
Leo Prikler wrote 5 days ago
(name . Nathan Dehnel)(address . ncdehnel@gmail.com)(address . 42118@debbugs.gnu.org)
639906b4e6788d7cf645ccd5635132a19ef2e757.camel@student.tugraz.at
Am Mittwoch, den 01.07.2020, 04:33 -0500 schrieb Nathan Dehnel:
Toggle quote (13 lines)> > Due to a bug with webkit sandboxing, we no longer put daemon.conf> > into> /etc/pulse (my bad), but rather set PULSE_CONFIG to directly point to> it.> I meant to say /gnu/store/<pulse package>/etc/pulse/daemon.conf.> > > I am currently unsure, at which point this variable> gets updated (I still think you need to reboot)> > I rebooted and everything seems the same.> > Maybe the problem is pulse uses Jack1 as a dependency and I'm trying> to use Jack2.
That might be an issue, but your $PULSE_CONFIG should at least point tothe right default.pa. It should especially not be the daemon.confshipped with pulseaudio, because we override flat-volumes (which mostdistros agree has an insane default).
Btw. please keep the bug in your reply, so that others can follow. Theeasiest way of doing so is to use "reply to all" in your mail client.
Regards, Leo
N
N
Nathan Dehnel wrote 5 days ago
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)(address . 42118@debbugs.gnu.org)
CAEEhgEsVx-5SwML+JTqzaG9QkpLVLa_bFwM+a-OiLWg41Bam4w@mail.gmail.com
Toggle quote (1 lines)>That might be an issue, but your $PULSE_CONFIG should at least point to
the right default.pa. It should especially not be the daemon.confok $PULSE_CONFIG points to daemon.conf which points to my edited file.
On Wed, Jul 1, 2020 at 5:57 AM Leo Prikler<leo.prikler@student.tugraz.at> wrote:
Toggle quote (25 lines)>> Am Mittwoch, den 01.07.2020, 04:33 -0500 schrieb Nathan Dehnel:> > > Due to a bug with webkit sandboxing, we no longer put daemon.conf> > > into> > /etc/pulse (my bad), but rather set PULSE_CONFIG to directly point to> > it.> > I meant to say /gnu/store/<pulse package>/etc/pulse/daemon.conf.> >> > > I am currently unsure, at which point this variable> > gets updated (I still think you need to reboot)> >> > I rebooted and everything seems the same.> >> > Maybe the problem is pulse uses Jack1 as a dependency and I'm trying> > to use Jack2.> That might be an issue, but your $PULSE_CONFIG should at least point to> the right default.pa. It should especially not be the daemon.conf> shipped with pulseaudio, because we override flat-volumes (which most> distros agree has an insane default).>> Btw. please keep the bug in your reply, so that others can follow. The> easiest way of doing so is to use "reply to all" in your mail client.>> Regards, Leo>
R
R
Ricardo Wurmus wrote 5 days ago
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)
875zb7moko.fsf@elephly.net
Leo Prikler <leo.prikler@student.tugraz.at> writes:
Toggle quote (15 lines)> Am Mittwoch, den 01.07.2020, 04:33 -0500 schrieb Nathan Dehnel:>> > Due to a bug with webkit sandboxing, we no longer put daemon.conf>> > into>> /etc/pulse (my bad), but rather set PULSE_CONFIG to directly point to>> it.>> I meant to say /gnu/store/<pulse package>/etc/pulse/daemon.conf.>> >> > I am currently unsure, at which point this variable>> gets updated (I still think you need to reboot)>> >> I rebooted and everything seems the same.>> >> Maybe the problem is pulse uses Jack1 as a dependency and I'm trying>> to use Jack2.
This should not be a problem. JACK2 only differs for users but not interms of the API when building software. In Guix we only build withJACK1 for consistency.
-- Ricardo
?