<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - pulseaudio try to open non-existent /dev/snd/pcm* which hugely increased startup time"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=93651">93651</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>pulseaudio try to open non-existent /dev/snd/pcm* which hugely increased startup time
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>PulseAudio
          </td>
        </tr>

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

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

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

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

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>alsa
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>tom.ty89@gmail.com
          </td>
        </tr>

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

        <tr>
          <th>CC</th>
          <td>lennart@poettering.net
          </td>
        </tr></table>
      <p>
        <div>
        <pre>So I have the following cards:
[tom@localhost ~]$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: STX [Xonar STX], device 0: Multichannel [Multichannel]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: STX [Xonar STX], device 1: Digital [Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

And this is how /dev/snd/ looks like:
[tom@localhost ~]$ ls -l /dev/snd/
total 0
drwxr-xr-x  2 root root       80 Jan 10 21:39 by-path
crw-rw----+ 1 root audio 116,  7 Jan 10 21:39 controlC0
crw-rw----+ 1 root audio 116,  2 Jan 10 21:39 controlC1
crw-rw----+ 1 root audio 116,  6 Jan 10 21:39 hwC1D0
crw-rw----+ 1 root audio 116,  9 Jan 10 21:39 pcmC0D0c
crw-rw----+ 1 root audio 116,  8 Jan 10 21:39 pcmC0D0p
crw-rw----+ 1 root audio 116, 11 Jan 10 21:39 pcmC0D1c
crw-rw----+ 1 root audio 116, 10 Jan 10 21:39 pcmC0D1p
crw-rw----+ 1 root audio 116,  3 Jan 10 21:39 pcmC1D3p
crw-rw----+ 1 root audio 116,  4 Jan 10 21:40 pcmC1D7p
crw-rw----+ 1 root audio 116,  5 Jan 10 21:39 pcmC1D8p
crw-rw----+ 1 root audio 116,  1 Jan 10 21:39 seq
crw-rw----+ 1 root audio 116, 33 Jan 10 21:39 timer

And you can see that the pulseaudio takes much longer (5 seconds!) to start
before I blacklist snd-hda-intel (so that card 1 is gone):

Jan 10 21:31:33 localhost systemd[257]: Starting Sound Service...
Jan 10 21:31:33 localhost systemd[257]: Started D-Bus User Message Bus.
Jan 10 21:31:39 localhost systemd[257]: Started Sound Service.
Jan 10 21:31:39 localhost systemd[257]: Reached target Default.
Jan 10 21:31:39 localhost systemd[257]: Startup finished in 5.830s.

Jan 10 21:32:16 localhost systemd[248]: Starting Sound Service...
Jan 10 21:32:17 localhost systemd[248]: Started D-Bus User Message Bus.
Jan 10 21:32:17 localhost systemd[248]: Started Sound Service.
Jan 10 21:32:17 localhost systemd[248]: Reached target Default.
Jan 10 21:32:17 localhost systemd[248]: Startup finished in 306ms.

(<a href="https://gist.github.com/tomty89/76e9ce98ba85121fc12d/revisions?diff=split">https://gist.github.com/tomty89/76e9ce98ba85121fc12d/revisions?diff=split</a>)

And the reason seems to be somehow pulse tries to open
/dev/snd/pcmC1D{0,1,9-13}p (well also /dev/snd/pcmC1D0c) which does not exist.
Please see my attached logs for details.

P.S. I do NOT file this bug report because it is blocking the login shell from
popping up after I entered my password in the tty, though I think that could be
an issue (of systemd?) too. I file this here merely because I think pulseaudio
is doing something silly for HDMI/DP sound devices. As you can see it's being
random (9-13, but not >=14, 4-6 or 2, or the existing 3, 7 and 8).</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>