<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - pulseaudio hangs when rtkit cannot start"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99356#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - pulseaudio hangs when rtkit cannot start"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99356">bug 99356</a>
              from <span class="vcard"><a class="email" href="mailto:fsateler@gmail.com" title="Felipe Sateler <fsateler@gmail.com>"> <span class="fn">Felipe Sateler</span></a>
</span></b>
        <pre>I think I have traced the problem.

Rtkit fails to start because PrivateTmp= conflicts with symlinks in /var. This
is a bug in systemd (but I have not filed it yet).

DBus apparently never stops trying to start it, until the timeout is reached
(by default 25 seconds). Thus, one would expect to have pulseaudio have a
delayed start of 25 seconds. Not so, because pa_raise_priority:

    if (set_nice(nice_level) >= 0) {
        pa_log_info("Successfully gained nice level %i.", nice_level);
        return 0;
    }

    for (n = nice_level+1; n < 0; n++)
        if (set_nice(n) >= 0) {
            pa_log_info("Successfully acquired nice level %i, which is lower
than the requested %i.", n, nice_level);
            return 0;
        }

If set_nice fails, pulseaudio will try successively higher nice levels until it
reaches 0 (probably assuming it was started with 0 niceness). nice_level is by
default -11, so there would be 11 calls to set_nice => 11*25 = 4:35 minutes.

BogDan Vatra, if you wait more than 5 minutes, does pulseaudio eventually
start? If this hypothesis is confirmed, then the solution would be to either:

1. Lower the timeout
2. detect that rtkit did not work the first time because dbus could not start
rtkit, and do not try to contact it again in successive retries.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>