Spice for graphic, pulseaudio for sound

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












When we use Spice in a virtual machine under KVM/qemu/libvirt, the QEMU_AUDIO_DRV is set to spice by default.

My host (debian-Stretch) use a good sound card (Xonar DX) and a better sound driver (pulseaudio,alsa).

How to use in a virtual machine spice for the graphic aspect and pulseaudio or alsa for the sound aspect (whatever the guest OS) ?



Note 1: in the domain.xml, I added:



<qemu:commandline>
<qemu:env name='QEMU_AUDIO_DRV' value='pa'/>
<qemu:env name='QEMU_PA_SERVER' value='/run/user/1000/pulse/native'/>
</qemu:commandline>


Now, in domain.log, I see:



QEMU_AUDIO_DRV=pa QEMU_PA_SERVER=/run/user/1000/pulse/native


Well but I don't know if my guest uses pulseaudio or not because domain.xml has the following section:



<sound model='ich6'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</sound>


Note 2: other try:



<qemu:commandline>
<qemu:env name='QEMU_AUDIO_DRV' value='alsa'/>
</qemu:commandline>


No sound.







share|improve this question


























    up vote
    0
    down vote

    favorite












    When we use Spice in a virtual machine under KVM/qemu/libvirt, the QEMU_AUDIO_DRV is set to spice by default.

    My host (debian-Stretch) use a good sound card (Xonar DX) and a better sound driver (pulseaudio,alsa).

    How to use in a virtual machine spice for the graphic aspect and pulseaudio or alsa for the sound aspect (whatever the guest OS) ?



    Note 1: in the domain.xml, I added:



    <qemu:commandline>
    <qemu:env name='QEMU_AUDIO_DRV' value='pa'/>
    <qemu:env name='QEMU_PA_SERVER' value='/run/user/1000/pulse/native'/>
    </qemu:commandline>


    Now, in domain.log, I see:



    QEMU_AUDIO_DRV=pa QEMU_PA_SERVER=/run/user/1000/pulse/native


    Well but I don't know if my guest uses pulseaudio or not because domain.xml has the following section:



    <sound model='ich6'>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </sound>


    Note 2: other try:



    <qemu:commandline>
    <qemu:env name='QEMU_AUDIO_DRV' value='alsa'/>
    </qemu:commandline>


    No sound.







    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      When we use Spice in a virtual machine under KVM/qemu/libvirt, the QEMU_AUDIO_DRV is set to spice by default.

      My host (debian-Stretch) use a good sound card (Xonar DX) and a better sound driver (pulseaudio,alsa).

      How to use in a virtual machine spice for the graphic aspect and pulseaudio or alsa for the sound aspect (whatever the guest OS) ?



      Note 1: in the domain.xml, I added:



      <qemu:commandline>
      <qemu:env name='QEMU_AUDIO_DRV' value='pa'/>
      <qemu:env name='QEMU_PA_SERVER' value='/run/user/1000/pulse/native'/>
      </qemu:commandline>


      Now, in domain.log, I see:



      QEMU_AUDIO_DRV=pa QEMU_PA_SERVER=/run/user/1000/pulse/native


      Well but I don't know if my guest uses pulseaudio or not because domain.xml has the following section:



      <sound model='ich6'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
      </sound>


      Note 2: other try:



      <qemu:commandline>
      <qemu:env name='QEMU_AUDIO_DRV' value='alsa'/>
      </qemu:commandline>


      No sound.







      share|improve this question














      When we use Spice in a virtual machine under KVM/qemu/libvirt, the QEMU_AUDIO_DRV is set to spice by default.

      My host (debian-Stretch) use a good sound card (Xonar DX) and a better sound driver (pulseaudio,alsa).

      How to use in a virtual machine spice for the graphic aspect and pulseaudio or alsa for the sound aspect (whatever the guest OS) ?



      Note 1: in the domain.xml, I added:



      <qemu:commandline>
      <qemu:env name='QEMU_AUDIO_DRV' value='pa'/>
      <qemu:env name='QEMU_PA_SERVER' value='/run/user/1000/pulse/native'/>
      </qemu:commandline>


      Now, in domain.log, I see:



      QEMU_AUDIO_DRV=pa QEMU_PA_SERVER=/run/user/1000/pulse/native


      Well but I don't know if my guest uses pulseaudio or not because domain.xml has the following section:



      <sound model='ich6'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
      </sound>


      Note 2: other try:



      <qemu:commandline>
      <qemu:env name='QEMU_AUDIO_DRV' value='alsa'/>
      </qemu:commandline>


      No sound.









      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 26 at 22:47

























      asked Jan 21 at 22:58









      Bertaud

      135110




      135110




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          PulseAudio normally accepts only a connection from one user. To mitigate this you could either



          1. run QEMU as user 1000 - Edit /etc/libvirt/qemu.conf and add/change user = "<user>" or

          2. allow PulseAudio to accept anonymous connections.





          share|improve this answer




















          • My solution works for pulseaudio (with the 1000 user) but not with alsa. Shall I also remove the ich6 section ?
            – Bertaud
            Feb 1 at 17:46










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f418708%2fspice-for-graphic-pulseaudio-for-sound%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          PulseAudio normally accepts only a connection from one user. To mitigate this you could either



          1. run QEMU as user 1000 - Edit /etc/libvirt/qemu.conf and add/change user = "<user>" or

          2. allow PulseAudio to accept anonymous connections.





          share|improve this answer




















          • My solution works for pulseaudio (with the 1000 user) but not with alsa. Shall I also remove the ich6 section ?
            – Bertaud
            Feb 1 at 17:46














          up vote
          0
          down vote













          PulseAudio normally accepts only a connection from one user. To mitigate this you could either



          1. run QEMU as user 1000 - Edit /etc/libvirt/qemu.conf and add/change user = "<user>" or

          2. allow PulseAudio to accept anonymous connections.





          share|improve this answer




















          • My solution works for pulseaudio (with the 1000 user) but not with alsa. Shall I also remove the ich6 section ?
            – Bertaud
            Feb 1 at 17:46












          up vote
          0
          down vote










          up vote
          0
          down vote









          PulseAudio normally accepts only a connection from one user. To mitigate this you could either



          1. run QEMU as user 1000 - Edit /etc/libvirt/qemu.conf and add/change user = "<user>" or

          2. allow PulseAudio to accept anonymous connections.





          share|improve this answer












          PulseAudio normally accepts only a connection from one user. To mitigate this you could either



          1. run QEMU as user 1000 - Edit /etc/libvirt/qemu.conf and add/change user = "<user>" or

          2. allow PulseAudio to accept anonymous connections.






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 29 at 16:01









          Stefan

          18517




          18517











          • My solution works for pulseaudio (with the 1000 user) but not with alsa. Shall I also remove the ich6 section ?
            – Bertaud
            Feb 1 at 17:46
















          • My solution works for pulseaudio (with the 1000 user) but not with alsa. Shall I also remove the ich6 section ?
            – Bertaud
            Feb 1 at 17:46















          My solution works for pulseaudio (with the 1000 user) but not with alsa. Shall I also remove the ich6 section ?
          – Bertaud
          Feb 1 at 17:46




          My solution works for pulseaudio (with the 1000 user) but not with alsa. Shall I also remove the ich6 section ?
          – Bertaud
          Feb 1 at 17:46












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f418708%2fspice-for-graphic-pulseaudio-for-sound%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?