[pulseaudio-tickets] [PulseAudio] #606: [PATCH] pulseaudio systemwide is a pain

PulseAudio trac-noreply at tango.0pointer.de
Tue Jul 14 05:03:46 PDT 2009


#606: [PATCH] pulseaudio systemwide is a pain
---------------------+------------------------------------------------------
  Reporter:  Rudd-O  |       Owner:  lennart
      Type:  defect  |      Status:  new    
 Milestone:          |   Component:  clients
Resolution:          |    Keywords:         
---------------------+------------------------------------------------------

Comment(by Rudd-O):

 I'm afraid you have a deeper misunderstanding of the problem than I
 initially thought.

 ---------------------------------

 You say "What if the system wide client.conf specifies a default server,
 but the users specific one does not? start-pulseaudio-x11 will not be run
 with your patch. It should be."

 That's the point of the patch.  If the system-wide configuration points
 the system to a server, then by default a server should not be run,
 because that's what the administrator has decided system policy should be.

 ---------------------------

 You say "Using the default-server config option as an indicator that
 "system wide" is used (as per the comment in the patch) is an invalid
 assumption."

 That is not exactly the idea behind checking client.conf.  The idea behind
 checking client.conf is to know whether the administrator has set up a
 server specifically for the users.  If a server has been set up
 specifically for the users (whether it's system-wide local to the machine,
 or remote), then the session server should not run.

 ----------------------

 The spirit of the patch is as follows:

 - if a Pulse server has been set up by the administrator (either in the
 PULSE_SERVER environment variable or in a system-wide configuration file
 called client.conf), bail out
 - if a Pulse server is active locally and is running as system-wide, bail
 out
 - if neither of these conditions are true, run the session server

 This is designed to support two scenarios:

 - A local system-wide server is running.  Do not start the session server
 because it might conflict with the system-wide one.  As far as I recall,
 by default, pulse will attempt to connect to the system-wide instance if
 no session server is running, and if that fails, only then it autostarts a
 daemon.
 - The administrator has set a remote server as system policy in
 client.conf or PULSE_SERVER environment variable (terminal server
 machine).  Do not start the session server because it is moronic and
 superfluous to start one server per user if you have 50 logged-in users
 and no sound hardware.

 Since the second scenario can only be detected by checking client.conf,
 there is a check for client.conf's contents.  Whatever the *user* has set
 up for a client has NOTHING to do with the spirit of the patch, which is
 to avoid the startup of the session server if the administrator has
 decided as policy that he is running a system-wide server, or a remote
 server.

 ------------------------------------------------

 It also doesn't matter that padevchooser is obsolete, or that it doesn't
 write to client.conf (according to you) -- all that matters is that, if
 the system administrator has decided on a global server that may be
 remote, or the system administrator has set up a local system-wide server,
 that decision should be followed by default, and session servers should
 not start.

 If we remove the check for client.conf as you suggested, you will produce
 another, different bug.  Namely, that a session server will be started on
 logon even in those cases where no system-wide server is running, but a
 remote server has been set as default in client.conf, which is an
 unnecessary step that wastes RAM in those scenarios, and may introduce
 other unforeseen problems.  That is why the check for client.conf is
 needed besides the check for /var/lib/pulse/pid.

 Oh, and autospawn was broken the last time I checked.

 --------------------------------------

 You may disagree very respectfully with my analysis, but it seems you
 haven't understood the intention of this work very well.

-- 
Ticket URL: <http://pulseaudio.org/ticket/606#comment:4>
PulseAudio <http://pulseaudio.org/>
The PulseAudio Sound Server


More information about the pulseaudio-bugs mailing list