<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - HDMI output source not remembered"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=100064#c34">Comment # 34</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - HDMI output source not remembered"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=100064">bug 100064</a>
              from <span class="vcard"><a class="email" href="mailto:tanuk@iki.fi" title="Tanu Kaskinen <tanuk@iki.fi>"> <span class="fn">Tanu Kaskinen</span></a>
</span></b>
        <pre>Ok, now we're getting a bit forward. These messages give a clue:

(   0.513|   0.000) D: [pulseaudio] module-card-restore.c: foobar -
alsa_card.pci-0000_01_00.1: e->preferred_output_port = hdmi-output-2
(   0.513|   0.000) D: [pulseaudio] module-card-restore.c: foobar - port not
found

So a port named hdmi-output-2 was not found when trying to restore the
preferred output port. There were problems when probing the card. The first
profile (HDMI 1) worked:

(   0.039|   0.000) D: [pulseaudio] alsa-mixer.c: Looking at profile
output:hdmi-stereo
(   0.039|   0.000) D: [pulseaudio] alsa-mixer.c: Checking for playback on
Digital Stereo (HDMI) (hdmi-stereo)
(   0.039|   0.000) D: [pulseaudio] alsa-util.c: Trying hdmi:1 with
SND_PCM_NO_AUTO_FORMAT ...
(   0.040|   0.000) D: [pulseaudio] alsa-util.c: Managed to open hdmi:1
(   0.040|   0.000) D: [pulseaudio] alsa-util.c: Maximum hw buffer size is
23777 ms
(   0.139|   0.099) D: [pulseaudio] alsa-util.c: Set buffer size first (to 4408
samples), period size second (to 1102 samples).
(   0.139|   0.000) D: [pulseaudio] alsa-mixer.c: Profile output:hdmi-stereo
supported.

The rest of the hdmi profiles fail, however. Here's the output for HDMI 3:

(   0.510|   0.000) D: [pulseaudio] alsa-mixer.c: Looking at profile
output:hdmi-stereo-extra2
(   0.510|   0.000) D: [pulseaudio] alsa-mixer.c: Checking for playback on
Digital Stereo (HDMI 3) (hdmi-stereo-extra2)
(   0.510|   0.000) D: [pulseaudio] alsa-util.c: Trying hdmi:1,2 with
SND_PCM_NO_AUTO_FORMAT ...
(   0.510|   0.000) I: [pulseaudio] (alsa-lib)confmisc.c: cannot find card '1'
(   0.510|   0.000) I: [pulseaudio] (alsa-lib)conf.c: function
snd_func_card_driver returned error: No such file or directory
(   0.510|   0.000) I: [pulseaudio] (alsa-lib)confmisc.c: error evaluating
strings
(   0.510|   0.000) I: [pulseaudio] (alsa-lib)conf.c: function snd_func_concat
returned error: No such file or directory
(   0.510|   0.000) I: [pulseaudio] (alsa-lib)confmisc.c: error evaluating name
(   0.510|   0.000) I: [pulseaudio] (alsa-lib)conf.c: function snd_func_refer
returned error: No such file or directory
(   0.510|   0.000) I: [pulseaudio] (alsa-lib)conf.c: Evaluate error: No such
file or directory
(   0.510|   0.000) I: [pulseaudio] (alsa-lib)pcm.c: Unknown PCM hdmi:1,2
(   0.510|   0.000) I: [pulseaudio] alsa-util.c: Error opening PCM device
hdmi:1,2: No such file or directory
(   0.510|   0.000) D: [pulseaudio] alsa-mixer.c: Caching failure to open
output:hdmi-stereo-extra2

I'm not sure if this a driver bug, or normal behaviour when logging out.

(In reply to Martin Ejdestig from <a href="show_bug.cgi?id=100064#c31">comment #31</a>)
<span class="quote">> But I think systemd correctly restarts pulseaudio after the first instance
> exits since it exits with a non zero exit code (see <a href="show_bug.cgi?id=100064#c12">comment 12</a>) and
> "Restart" is set to "on-failure" in the service file. I have no idea why
> though.</span >

Good observation. Now that I look at the log of the first instance again, the
shutdown sequence is clearly not complete, so it's not a clean shutdown, which
explains the non-zero return value. Is pulseaudio crashing? Or does it get a
kill signal? The journal seems to claim that the process returns exit code 1,
which is not true in case of a crash or kill (AFAIK there's no exit code at all
in those cases). PulseAudio shouldn't call exit(1) by itself. I suspect some of
the X libraries does that.</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>