all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#42118: Editing pulseaudio config file fails with "No such file or directory"
@ 2020-06-29  7:34 Nathan Dehnel
  2020-06-29 10:27 ` Leo Prikler
  0 siblings, 1 reply; 9+ messages in thread
From: Nathan Dehnel @ 2020-06-29  7:34 UTC (permalink / raw)
  To: 42118

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.drv
building /gnu/store/3ybxvw8rmn4q7r2zlcrv28qimmk1619v-pulse.drv...
\builder for `/gnu/store/3ybxvw8rmn4q7r2zlcrv28qimmk1619v-pulse.drv'
failed with exit code 1
build of /gnu/store/3ybxvw8rmn4q7r2zlcrv28qimmk1619v-pulse.drv failed
View build log at
'/var/log/guix/drvs/3y/bxvw8rmn4q7r2zlcrv28qimmk1619v-pulse.drv.bz2'.
cannot build derivation
`/gnu/store/j0ma4b6j8ah123sf7pk97c9axh461s1c-etc.drv': 1 dependencies
couldn't be built
cannot build derivation
`/gnu/store/acq4drfdn27m7ii7bcmzkpixfg9ilzcz-system.drv': 1
dependencies couldn't be built
guix system: error: build of
`/gnu/store/acq4drfdn27m7ii7bcmzkpixfg9ilzcz-system.drv' failed

Log:
bash-5.0$ bzip2 -dkc
/var/log/guix/drvs/3y/bxvw8rmn4q7r2zlcrv28qimmk1619v-pulse.drv.bz2
Backtrace:
           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




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#42118: Editing pulseaudio config file fails with "No such file or directory"
  2020-06-29  7:34 bug#42118: Editing pulseaudio config file fails with "No such file or directory" Nathan Dehnel
@ 2020-06-29 10:27 ` Leo Prikler
       [not found]   ` <CAEEhgEsW4VTRPXMkspfE9vcP5DNZCBV-7h2cxcbJFgEoY7pk6Q@mail.gmail.com>
  0 siblings, 1 reply; 9+ messages in thread
From: Leo Prikler @ 2020-06-29 10:27 UTC (permalink / raw)
  To: ncdehnel; +Cc: 42118

Hello Nathan,

The snippet you've supplied
> (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 not
refer to an actual file, but to a file-like object as returned by Guix
G-Expressions.  You probably want to use `mixed-text-file' or something
similar to write your default.pa inside Guix itself.  Alternatively,
you can unset PULSE_CONFIG and PULSE_CLIENTCONFIG in your .profile (or
equivalent for other shells) and Pulseaudio should load your local
configuration.

Regards, Leo





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#42118: Editing pulseaudio config file fails with "No such file or directory"
       [not found]   ` <CAEEhgEsW4VTRPXMkspfE9vcP5DNZCBV-7h2cxcbJFgEoY7pk6Q@mail.gmail.com>
@ 2020-06-30 10:43     ` Leo Prikler
       [not found]       ` <CAEEhgEttgmXiegOkxptmPDGPSmuXJRDPpvmDkJPgUWzkn_-kXA@mail.gmail.com>
  0 siblings, 1 reply; 9+ messages in thread
From: Leo Prikler @ 2020-06-30 10:43 UTC (permalink / raw)
  To: Nathan Dehnel; +Cc: 42118

Am Dienstag, den 30.06.2020, 05:22 -0500 schrieb Nathan Dehnel:
> 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, but
that is essentially the idea, yes.  There are of course other ways of
building it, but it is your task to ensure, that those end up with the
result you want.  In my personal opinion, explicit coding tends to be
best suited to accomplish this.

> 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 is
copy 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 what
you want, but unless you're doing very weird things in there, it may
also be a perfectly valid configuration.
Can you check, that /etc/pulse/default.pa is indeed what you want it to
be?  IIRC, you may have to reboot for /etc to change.

Regards, Leo





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#42118: Editing pulseaudio config file fails with "No such file or directory"
       [not found]       ` <CAEEhgEttgmXiegOkxptmPDGPSmuXJRDPpvmDkJPgUWzkn_-kXA@mail.gmail.com>
@ 2020-07-01  8:15         ` Leo Prikler
       [not found]           ` <CAEEhgEvV5CFpE6aG9fnKopDd1MeXCMHZ_0bt_3DevNfNA4eJiQ@mail.gmail.com>
  0 siblings, 1 reply; 9+ messages in thread
From: Leo Prikler @ 2020-07-01  8:15 UTC (permalink / raw)
  To: Nathan Dehnel; +Cc: 42118

Am Mittwoch, den 01.07.2020, 01:58 -0500 schrieb Nathan Dehnel:
> 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 in
gnu/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 to
it.  As you can see, `default-script-file' should be set to the file
you're supplying.  I am currently unsure, at which point this variable
gets updated (I still think you need to reboot), but I'm pretty
convinced, this would work with a custom script file.

Regards, 
Leo.






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#42118: Editing pulseaudio config file fails with "No such file or directory"
       [not found]           ` <CAEEhgEvV5CFpE6aG9fnKopDd1MeXCMHZ_0bt_3DevNfNA4eJiQ@mail.gmail.com>
@ 2020-07-01 10:57             ` Leo Prikler
  2020-07-01 11:52               ` Nathan Dehnel
  2020-07-01 12:01               ` Ricardo Wurmus
  0 siblings, 2 replies; 9+ messages in thread
From: Leo Prikler @ 2020-07-01 10:57 UTC (permalink / raw)
  To: Nathan Dehnel; +Cc: 42118

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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#42118: Editing pulseaudio config file fails with "No such file or directory"
  2020-07-01 10:57             ` Leo Prikler
@ 2020-07-01 11:52               ` Nathan Dehnel
  2020-07-01 12:01               ` Ricardo Wurmus
  1 sibling, 0 replies; 9+ messages in thread
From: Nathan Dehnel @ 2020-07-01 11:52 UTC (permalink / raw)
  To: Leo Prikler; +Cc: 42118

>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
ok $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:
>
> 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
>




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#42118: Editing pulseaudio config file fails with "No such file or directory"
  2020-07-01 10:57             ` Leo Prikler
  2020-07-01 11:52               ` Nathan Dehnel
@ 2020-07-01 12:01               ` Ricardo Wurmus
  2020-07-07  2:59                 ` Nathan Dehnel
  1 sibling, 1 reply; 9+ messages in thread
From: Ricardo Wurmus @ 2020-07-01 12:01 UTC (permalink / raw)
  To: Leo Prikler; +Cc: Nathan Dehnel, 42118


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

> 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 in
terms of the API when building software.  In Guix we only build with
JACK1 for consistency.

-- 
Ricardo




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#42118: Editing pulseaudio config file fails with "No such file or directory"
  2020-07-01 12:01               ` Ricardo Wurmus
@ 2020-07-07  2:59                 ` Nathan Dehnel
  2022-09-29  0:39                   ` Maxim Cournoyer
  0 siblings, 1 reply; 9+ messages in thread
From: Nathan Dehnel @ 2020-07-07  2:59 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Leo Prikler, 42118

So if I disable pulseaudio autostart, and start it from bash, I get these errors

bash-5.0$ pulseaudio
E: [pulseaudio] module-jack-sink.c: jack_client_open() failed.
E: [pulseaudio] module.c: Failed to load module "module-jack-sink"
(argument: ""): initialization failed.
E: [pulseaudio] module-jack-source.c: jack_client_open() failed.
E: [pulseaudio] module.c: Failed to load module "module-jack-source"
(argument: ""): initialization failed.

So pulseaudio is seeing my settings correctly, but some other problem
is preventing it from working.

On Wed, Jul 1, 2020 at 7:01 AM Ricardo Wurmus <rekado@elephly.net> wrote:
>
>
> Leo Prikler <leo.prikler@student.tugraz.at> writes:
>
> > 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 in
> terms of the API when building software.  In Guix we only build with
> JACK1 for consistency.
>
> --
> Ricardo




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#42118: Editing pulseaudio config file fails with "No such file or directory"
  2020-07-07  2:59                 ` Nathan Dehnel
@ 2022-09-29  0:39                   ` Maxim Cournoyer
  0 siblings, 0 replies; 9+ messages in thread
From: Maxim Cournoyer @ 2022-09-29  0:39 UTC (permalink / raw)
  To: Nathan Dehnel; +Cc: Ricardo Wurmus, 42118-done, Leo Prikler

Hello,

Nathan Dehnel <ncdehnel@gmail.com> writes:

> So if I disable pulseaudio autostart, and start it from bash, I get these errors
>
> bash-5.0$ pulseaudio
> E: [pulseaudio] module-jack-sink.c: jack_client_open() failed.
> E: [pulseaudio] module.c: Failed to load module "module-jack-sink"
> (argument: ""): initialization failed.
> E: [pulseaudio] module-jack-source.c: jack_client_open() failed.
> E: [pulseaudio] module.c: Failed to load module "module-jack-source"
> (argument: ""): initialization failed.
>
> So pulseaudio is seeing my settings correctly, but some other problem
> is preventing it from working.

Seems the original issue got understood, but you still have some
configuration problem to tackle.

Closing this old forgotten issue, although note that the recently
introduce 'extra-script-files' field of the pulseaudio-configuration may
be useful to what you are/were trying to achieve.

Thanks,

Maxim




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-09-29  0:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-29  7:34 bug#42118: Editing pulseaudio config file fails with "No such file or directory" Nathan Dehnel
2020-06-29 10:27 ` Leo Prikler
     [not found]   ` <CAEEhgEsW4VTRPXMkspfE9vcP5DNZCBV-7h2cxcbJFgEoY7pk6Q@mail.gmail.com>
2020-06-30 10:43     ` Leo Prikler
     [not found]       ` <CAEEhgEttgmXiegOkxptmPDGPSmuXJRDPpvmDkJPgUWzkn_-kXA@mail.gmail.com>
2020-07-01  8:15         ` Leo Prikler
     [not found]           ` <CAEEhgEvV5CFpE6aG9fnKopDd1MeXCMHZ_0bt_3DevNfNA4eJiQ@mail.gmail.com>
2020-07-01 10:57             ` Leo Prikler
2020-07-01 11:52               ` Nathan Dehnel
2020-07-01 12:01               ` Ricardo Wurmus
2020-07-07  2:59                 ` Nathan Dehnel
2022-09-29  0:39                   ` Maxim Cournoyer

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.