<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Pulseaudio not recognize active session correctly under some circumstance"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=76672">76672</a>
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>lennart@poettering.net
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>pulseaudio-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Pulseaudio not recognize active session correctly under some circumstance
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>pulseaudio-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>kawing.chiu.sysu@gmail.com
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>core
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>PulseAudio
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I get no sound in my desktop when using the following (a bit usual) way to
start the desktop:

from a virtual terminal, say vt2, run:

(setsid startx -- vt7 &).

That is, startx in a virtual terminal other than the current one. The "setsid"
is not relevant here, without it, (startx -- vt7 &) don't work, either. 

But, if I play something in the desktop and then SWITCH BACK to vt2, the sound
comes. If I log into another virtual terminal, for example, vt1, the sound
comes, too. Just as long as I switch back to desktop on vt7, the sound stops.

I guess this is because pulseaudio fails to recognise the active session: if I
run `pacmd list-sinks` in the desktop(vt7), it shows that the status of the
active sink is "SUSPENDED" and the suspend cause is "SESSION" while running the
same command in vt2 shows the status is "RUNNING".

Also, `loginctl user-status` shows that, all processes of my desktop(vt7) and
vt2 belong to the same session (in systemd's notion).

And if I start X by: 

(setsid startx -- vt2 &)

that is, in the same virtual terminal, then all problems are gone, pulseaudio
works perfectly.

I'm using arch linux, mate desktop(1.8.0), pulseaudio(5.0), all packages are
from arch's official repository.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>