[Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
[Expired for pulseaudio (Ubuntu) because there has been no activity for 60 days.] ** Changed in: pulseaudio (Ubuntu) Status: Incomplete => Expired -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
[Expired for virt-manager (Ubuntu) because there has been no activity for 60 days.] ** Changed in: virt-manager (Ubuntu) Status: Incomplete => Expired -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
[Expired for libvirt (Ubuntu) because there has been no activity for 60 days.] ** Changed in: libvirt (Ubuntu) Status: Incomplete => Expired -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
Thank you for reporting this bug to Ubuntu. Ubuntu 13.10 (saucy) reached end-of-life on July 17, 2014. See this document for currently supported Ubuntu releases: https://wiki.ubuntu.com/Releases We appreciate that this bug may be old and you might not be interested in discussing it any more. But if you are then please upgrade to the latest Ubuntu version and re-test. ** Changed in: pulseaudio (Ubuntu) Status: Confirmed => Incomplete ** Changed in: libvirt (Ubuntu) Status: Confirmed => Incomplete ** Changed in: virt-manager (Ubuntu) Status: Confirmed => Incomplete -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
This bug has been reported on the Ubuntu ISO testing tracker. A list of all reports related to this bug can be found here: http://iso.qa.ubuntu.com/qatracker/reports/bugs/1246929 ** Tags added: iso-testing -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
the emulated HDA works fine in Windows 7 VM using the above, with proviso that I run VM as root, ie. /etc/libvirt/qemu.conf includes (in my case, which works) user = "root" group = "root" cgroup_device_acl = [ "/dev/null", "/dev/full", "/dev/zero", "/dev/random", "/dev/urandom", "/dev/ptmx", "/dev/kvm", "/dev/kqemu", "/dev/rtc","/dev/hpet", "/dev/vfio/vfio", "/dev/vfio/1", "/dev/vfio/14", "/dev/vfio/15", "/dev/vfio/16", "/dev/vfio/17", "/dev/shm", "/root/.config/pulse", "/dev/snd", ] nographics_allow_host_audio = 1 security_require_confined = 0 hugetlbfs_mount = "/dev/hugepages" clear_emulator_capabilities = 0 relaxed_acs_check = 1 If using VNC rather than Spice, you may also need vnc_allow_host_audio = 1 and /etc/apparmor.d/abstractions/libvirt/qemu contains the following additional lines (in my case) /{dev,run}/shm/pulse-shm* rw, @{HOME}/.config/puls** rwk, @{HOME}/** r, /root/.config/puls** rwk, /root/.asoundrc r, /dev/vfio/* rw, This works nicely with a Windows 7 guest using the following xml (where a graphics card is apssed through at 01:00.0 and a USB card is passed at 02:00.0, note that the inbuilt audio device on the graphics card is NOT passed through i'ts still attached to pci-stub) !-- WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE OVERWRITTEN AND LOST. Changes to this xml configuration should be made using: virsh edit ssd-win7 or other application using the libvirt API. --> ssd-win7 92faa169-292a-4086-a398-31df57266eb1 6291456 6291456 2 hvm /mnt/programming_data/virtualisation/bios/bios.bin Haswell destroy restart destroy /usr/bin/qemu-system-x86_64 If you'd rather grant access at the VM level you can update the apparmor entries in /etc/apparmor.d/libvirt/libivrt- What worked best for me was to create a new permissions file based on the "libvirt-.files" entry which was autmatically generated. The new file contains the following # Added by R E to support use of VFIO. "/dev/vfio/*" rw, # Needed for ALSA sound (based on error messages about not having access). "/dev/shm/pulse-shm*" rwk, "/run/shm/pulse-shm*" rwk, "/root/.config/puls**" rwk, "/root/.asoundrc" r, # Rather than specifying individual files, allow the whole directory "/mnt/programming_data/isos/**" r, # don't audit writes to readonly files deny "/mnt/programming_data/isos/**" w, Then add a pointer to that file in the master at "libvirt-" ie. to look like this (see the last entry, the file which i created) # # This profile is for the domain whose UUID matches this file. # #include profile libvirt-c1a86cb2-82b4-4db9-89c2-ced5be57b39e { #include #include #include } For some reason, when I do the same for a Ubuntu Trusty VM it initially worked but now shows a "device busy" error for some reason, which i'm unable to overcome - even though a Windows VM operating in exactly the same manner works fine. Arcane magic involved - sacrifice may be required Both the AC97 and the HDA devices work on Windows ie. go into Control Panel / Sound and select one, run a test and it works fine. Neither of them is a PCI pasthrough card. As it happens I have a separate USB soundcard I can use in Windows because it's attached to the USB controller with is passed through via PCI passthrough, but that's a spearate story. In my situation, the host is Ubuntu Trusty running kvm, qemu, libvirt and virt-manager from the standard repos. The kernel is patched to support VGA passthrough (mostly to deal with Intel graphics poor handling of VGA arbitration) Have you tried this arrangement ? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
AC97 is emulated sound card not any pci passthrough AFAIK, the emulated hda work in Ubuntu 11.10 but no longer work at later versions -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
Libvirt / Virt-Manager and host Alsa based sound == I have battled the same problem ... and managed to get it working on Trusty (1) this is all down to AppArmor (2) In order to run ALSA you will need the following apparmor entries, preferably in ...abstractions/libvirt-qemu # Changes # /{dev,run}/shm/pulse-shm* rw, @{HOME}/.config/puls** rwk, @{HOME}/* r, # Changes # In my case I run libvirt as Root because it is accessing virtio and vga passthrough. I've also added dev/vfio to support vfio based PCI passthrough ie. /dev/vfio/* rw, The VM definition xml contains the following This setup works very nicely with the following (both defined and working, in guest select preferred mode, I prefer the HDA device) I prefer the second (HDA) for quality - Note that I am using the Q35 motherboard. Furthermore Pulseaudio was much easier to get working BUT running system wide (because libvirt runs as root) is not good and it has terrible lag and is not suitable for somepurposes eg. game machines -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: pulseaudio (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
http://git.kernel.org/cgit/virt/kvm/qemu-kvm.git/log/audio/paaudio.c seem paaudio no longer use simple pulseaudio api -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
APLAY List of PLAYBACK Hardware Devices card 0: SB [HDA ATI SB], device 0: ALC892 Analog [ALC892 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: SB [HDA ATI SB], device 3: ALC892 Digital [ALC892 Digital] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2] Subdevices: 1/1 Subdevice #0: subdevice #0 ARECORD List of CAPTURE Hardware Devices card 0: SB [HDA ATI SB], device 0: ALC892 Analog [ALC892 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: SB [HDA ATI SB], device 2: ALC892 Alt Analog [ALC892 Alt Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: C615 [HD Webcam C615], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0 http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/saucy/qemu-kvm/saucy/view/head:/audio/alsaaudio.c .pcm_name_out = "default", .pcm_name_in = "default", pcm.default has been override to use pulse plugin in ubuntu if your pulseaudio is using hdmi and usb webcam for playack and capture export DAC_DEV=hw:0,0 export ADC_DEV=hw:0,0 or if your pulseaudio is using onboard analog for playback and capture hdmi playback export DAC_DEV=hdmi:2,DEV=1 alt analog playback ( specify hint indep_hp=1 in early patching and switch independent headphone control to "enable" export DAC_DEV=hw:0,2 alt analog capture export ADC_DEV=hw:0,2 webcam export ADC_DEV=hw:1,0 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
Re: [Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
Quoting Raymond (1246...@bugs.launchpad.net): > http://libvirt.org/git/?p=libvirt.git;a=commit;h=a216e6487255d3b65d97c7ec1fa5da63dbced902 We're not running with -nographic though. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
Re: [Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
To be clear, the qemu process is launched as my userid and /proc/$$/environ shows QEMU_AUDIO_DRV=pa. The 'outout' file in comment #41 shows the strace output which shows qemu opening some pulse cookies and doing some dbus transactions, presumably related to pulse. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
http://libvirt.org/git/?p=libvirt.git;a=commit;h=a216e6487255d3b65d97c7ec1fa5da63dbced902 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
Re: [Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
@Brian, Well shoot, I can't think what would have caused that. There may be useful info in /var/log/upstart/libvirt-bin.log or /var/log/libvirt/libvirtd.log. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
Re: [Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
Quoting Raymond (1246...@bugs.launchpad.net): > are there any way to select alsa as backend ? Using 'export QEMU_AUDIO_DRV=alsa' in /etc/init/libvirt-bin should switch from pulse to alsa. Still no sound though when I do that. (Sorry if I misunderstood the question) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
are there any way to select alsa as backend ? https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/plain/Documentation/sound/alsa /HD-Audio.txt card 0: SB [HDA ATI SB], device 2: ALC892 Alt Analog [ALC892 Alt Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 for a desktop , you can enable independent headphone by specify hint in early patching to use alt analog device 2 for playback and capture (DAC_DEV=hw:0,2 and ADC_DEV=hw:0,2) - indep_hp (bool): provide the independent headphone PCM stream and the corresponding mixer control, if available -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
Serge I made the changes in comment #40 and the extra change in comment #42 but after reboot when I started Virt-Manager I immediately got a dialog box stating: Unable to connect to libvirt. Verify that: - The 'libvirt-bin' package is installed - The 'libvirtd' daemon has been started - You are member of the 'libvirtd' group Reverting those changes out and Virt-Manager works ok and no dialog box. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
@Brian, if possible, could you please follow the steps in comment #40 and also comment out 'deny capability kill' in /etc/apparmor.d/abstractions /libvirt-qemu, restart libvirt (sudo stop libvirt-bin; sudo start libvirt-bin) or reboot, and see if that works for you? It is possible that my failure is due to a change in 14.04. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
At this point I don't know where the problem lies. When I follow https://wiki.ubuntu.com/PulseAudio/Log I don't see any attemps to connect by qemu. (Should I?) I've disabled seccomp (which I think is disabled by default), allowed all capabilities in the apparmor profile, and checked that /dev/snd/* is allowed by cgroups and the qemu process runs with full capabilities (in /proc/$$/status) as user serge:serge and once as serge:kvm (as a test). I wrapped qemu in a sh script which runs it under strace -f. The strace output is attached here. Note that the EACCES for opening /dev/shm/pulse* is for files owned by root - the files owned by serge were able to be opened. I see an attempt to attach to /var/run/dbus/system_bus_socket which seems to succeed. At this point I don't see why this fails to give me sound, while a manual 'QEMU_AUDIO_DRV=pa kvm -hda x.img -cdrom saucy.iso -m 1024 -vnc :1' succeeds. ** Attachment added: "outout" https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1246929/+attachment/3930398/+files/outout -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
** Changed in: libvirt (Ubuntu) Status: Incomplete => Confirmed ** Changed in: virt-manager (Ubuntu) Status: Incomplete => Confirmed ** Changed in: pulseaudio (Ubuntu) Status: Incomplete => New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
Hi Brian, so the first steps in fixing this are as follows: 1. in /etc/libvirt/qemu.conf add the lines vnc_allow_host_audio = 1 user=bmullan group=bmullan 2. in /etc/init/libvirt-bin.conf, add the line export QEMU_AUDIO_DRV=pa right before the final exec, so 'script' block at the bottom of the file becomes: script [ -r /etc/default/libvirt-bin ] && . /etc/default/libvirt-bin export QEMU_AUDIO_DRV=pa exec /usr/sbin/libvirtd $libvirtd_opts end script 3. Add the following lines to /etc/apparmor.d/abstractions/libvirt-qemu : @{HOME}/.config/pulse/cookie rwk, @{HOME}/.config/pulse/** rwkl, @{HOME}/.config/ r, @{HOME}/.config/pulse/ rw, owner /run/shm/pulse-* rw, /usr/bin/pulseaudio PUx, /etc/pulse/daemon.conf r, /tmp/pulse*/*.lock rwk, /proc/* r, /proc/*/fd/ r, With all this, though I still do *not* have working sound. There may be a pulseaudio server setting I haven't found, or there may be a silent apparmor denial. If we get this working then we can put most of the apparmor lines in the policy, and to put hints in the config files for the rest. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
> I do see >>the QEMU_AUDIO_DRV=none in env variable this mean kvm is using noaudio in backend >dolog ("Run with -audio-help to list available drivers\n"); did you see any avaiable drivers when you use "-audio-help" ? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
any status on this bug? The last note was 11-13-2013 by Serge -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
Re: [Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
> do you mean both alsa or pulseaudio backend were not build in Ubuntu kvm package ? Both are built-in. the driver list is "pa,alsa,dsl,oss" (in order). -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
for always, you can also specify DAC_DEV and ADC_DEV for different sound cards on your real machine or device null if you have more than one vm do you mean both alsa or pulseaudio backend were not build in Ubuntu kvm package ? static struct audio_option alsa_options[] = { { .name= "DAC_SIZE_IN_USEC", .tag = AUD_OPT_BOOL, .valp= &conf.size_in_usec_out, .descr = "DAC period/buffer size in microseconds (otherwise in frames)" }, { .name= "DAC_PERIOD_SIZE", .tag = AUD_OPT_INT, .valp= &conf.period_size_out, .descr = "DAC period size (0 to go with system default)", .overriddenp = &conf.period_size_out_overridden }, { .name= "DAC_BUFFER_SIZE", .tag = AUD_OPT_INT, .valp= &conf.buffer_size_out, .descr = "DAC buffer size (0 to go with system default)", .overriddenp = &conf.buffer_size_out_overridden }, { .name= "ADC_SIZE_IN_USEC", .tag = AUD_OPT_BOOL, .valp= &conf.size_in_usec_in, .descr = "ADC period/buffer size in microseconds (otherwise in frames)" }, { .name= "ADC_PERIOD_SIZE", .tag = AUD_OPT_INT, .valp= &conf.period_size_in, .descr = "ADC period size (0 to go with system default)", .overriddenp = &conf.period_size_in_overridden }, { .name= "ADC_BUFFER_SIZE", .tag = AUD_OPT_INT, .valp= &conf.buffer_size_in, .descr = "ADC buffer size (0 to go with system default)", .overriddenp = &conf.buffer_size_in_overridden }, { .name= "THRESHOLD", .tag = AUD_OPT_INT, .valp= &conf.threshold, .descr = "(undocumented)" }, { .name= "DAC_DEV", .tag = AUD_OPT_STR, .valp= &conf.pcm_name_out, .descr = "DAC device name (for instance dmix)" }, { .name= "ADC_DEV", .tag = AUD_OPT_STR, .valp= &conf.pcm_name_in, .descr = "ADC device name" }, { .name= "VERBOSE", .tag = AUD_OPT_BOOL, .valp= &conf.verbose, .descr = "Behave in a more verbose way" }, { /* End of list */ } }; -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
but pulseaudio backend allow you to change the address of pulseaudio server does this mean that you can send the audio to the remote pa sink and souce even your machine run kvm don't have any real sound card ? pa->s = pa_simple_new ( conf.server, "qemu", PA_STREAM_PLAYBACK, conf.sink, "pcm.playback", &ss, NULL, /* channel map */ &ba,/* buffering attributes */ &error ); struct audio_option qpa_options[] = { { .name = "SAMPLES", .tag = AUD_OPT_INT, .valp = &conf.samples, .descr = "buffer size in samples" }, { .name = "SERVER", .tag = AUD_OPT_STR, .valp = &conf.server, .descr = "server address" }, { .name = "SINK", .tag = AUD_OPT_STR, .valp = &conf.sink, .descr = "sink device name" }, { .name = "SOURCE", .tag = AUD_OPT_STR, .valp = &conf.source, .descr = "source device name" }, { /* End of list */ } }; -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
I suspect we can remove pulseaudio from the list of affected packages, but I'm not 100% certain. It comes down to why the libvirt-qemu user is not allowed to use pulseaudio devices, and where the cofniguration needs to be chagned to allow it. ** Changed in: libvirt (Ubuntu) Importance: Undecided => Medium ** Changed in: libvirt (Ubuntu) Status: New => Incomplete ** Changed in: pulseaudio (Ubuntu) Importance: Undecided => Medium ** Changed in: pulseaudio (Ubuntu) Status: New => Incomplete -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1246929] Re: no audio in KVM virtual machines : cannot select alsa or pa
** Summary changed: - alsa bug in KVM virtual machines + no audio in KVM virtual machines : cannot select alsa or pa -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1246929 Title: no audio in KVM virtual machines : cannot select alsa or pa To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1246929/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs