wacko37 Posted February 6, 2023 Share Posted February 6, 2023 Hi All, So after 2 days straight of searching & trying to get my LibreELEC VM to work, I have no choice but to ask for help so I hope this makes sense as I'm pretty new to all this. I've manged to get both the Video & Audio passthrough to work from my Gigabyte z590 MB & i7 11700k CPU but the problem I'm having is that there is NO option within LibreELEC / Kodi to select a HDMI audio output. The only audio options that are working is via the i/o panel on the rear. I have tried multiple VM setups from Q35 / i440fx / OVMF / seabios but to no avail. Originally I could not get video to passthrough but a simple syslinux config input of "video=efifb:off" fixed that and stubbed Unraid from hogging the display port. Is it possible that unraid is hogging the HDMI Audio also? Can someone please point me in the right direction or is it even possible without some sort of driver? Quote Link to comment
wacko37 Posted February 8, 2023 Author Share Posted February 8, 2023 (edited) Still no joy on this at all, worth mentioning I've tried builds "LibreELEC-Generic.x86_64-10.95.0.img" & "LibreELEC-Generic.x86_64-11.0-nightly-20230204-7beffea.img" but to no avail. Sadly the Stable build "LibreELEC-Generic.x86_64-10.0.4.img.gz" is not compable with the 11th Gen CPU/iGPU. When I run the command: aplay -l **** List of PLAYBACK Hardware Devices **** card 0: PCH [HDA Intel PCH], device 0: ALC1220 Analog [ALC1220 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 1: ALC1220 Digital [ALC1220 Digital] Subdevices: 1/1 Subdevice #0: subdevice #0 Its as if the HDMI audio device is not being loaded/recognized at all, I can confirm that the iGPU HDMI audio is working correctly by running Windows 11 via USB and indeed sound workings via the HDMI. please can someone shed some light on this! UPDATE: Ok thanks to someone over at Libreelec, it was suggested to test an install of LE outside of Unraid, once tested everything worked 100% Sadly this now points to Unraid and how it is passing through audio to the VM. Edited February 8, 2023 by wacko37 Quote Link to comment
ghost82 Posted February 9, 2023 Share Posted February 9, 2023 (edited) Post a diagnostics file so I can check the vm configuration. q35 machine type should be a better option. It could depend on the layout you set for the video and audio and how the driver interacts: in a bare metal machine you have the video at 00:02.0, so vga is on bus 0, slot 2, this is specific for built-in gpu, and audio is on 00:1f.5, so also the audio is built-in. If the target addresses of both video and audio are wrong in the vm, the driver could not work properly. Edited February 9, 2023 by ghost82 Quote Link to comment
wacko37 Posted February 9, 2023 Author Share Posted February 9, 2023 Thanks for the reply @ghost82 your help is much appreciated. Anyhow, please find attached a diagnostics zip as requested, also just to confirm audio is 00:1f.5 or .3? or have I picked that up wrong? wacko-unraid-diagnostics-20230209-1844.zip Quote Link to comment
ghost82 Posted February 9, 2023 Share Posted February 9, 2023 Sorry, my error, yes it's on .3. Currently your hdmi is on bus 4, connected to a pcie-to-pci-bridge, which doesn't sound correct to me. Without changing anything else, try this: <!-- 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 Libreelec or other application using the libvirt API. --> <domain type='kvm'> <name>Libreelec</name> <uuid>95170484-4711-898d-d1da-8da9fe928b9d</uuid> <metadata> <vmtemplate xmlns="unraid" name="Linux" icon="linux.png" os="linux"/> </metadata> <memory unit='KiB'>1048576</memory> <currentMemory unit='KiB'>1048576</currentMemory> <memoryBacking> <nosharepages/> </memoryBacking> <vcpu placement='static'>4</vcpu> <cputune> <vcpupin vcpu='0' cpuset='0'/> <vcpupin vcpu='1' cpuset='8'/> <vcpupin vcpu='2' cpuset='2'/> <vcpupin vcpu='3' cpuset='10'/> </cputune> <os> <type arch='x86_64' machine='pc-q35-7.1'>hvm</type> <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader> <nvram>/etc/libvirt/qemu/nvram/95170484-4711-898d-d1da-8da9fe928b9d_VARS-pure-efi.fd</nvram> <boot dev='hd'/> </os> <features> <acpi/> <apic/> </features> <cpu mode='host-passthrough' check='none' migratable='on'> <topology sockets='1' dies='1' cores='2' threads='2'/> <cache mode='passthrough'/> </cpu> <clock offset='utc'> <timer name='rtc' tickpolicy='catchup'/> <timer name='pit' tickpolicy='delay'/> <timer name='hpet' present='no'/> </clock> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/local/sbin/qemu</emulator> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='writeback'/> <source file='/mnt/user/domains/Libreelec/vdisk2.img'/> <target dev='hdc' bus='sata'/> <address type='drive' controller='0' bus='0' target='0' unit='2'/> </disk> <controller type='usb' index='0' model='ich9-ehci1'> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/> </controller> <controller type='usb' index='0' model='ich9-uhci2'> <master startport='2'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/> </controller> <controller type='usb' index='0' model='ich9-uhci3'> <master startport='4'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/> </controller> <controller type='pci' index='4' model='pcie-to-pci-bridge'> <model name='pcie-pci-bridge'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </controller> <controller type='pci' index='5' model='pcie-root-port'> <model name='pcie-root-port'/> <target chassis='5' port='0xb'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/> </controller> <controller type='virtio-serial' index='0'> <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> </controller> <controller type='sata' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </controller> <controller type='pci' index='0' model='pcie-root'/> <controller type='pci' index='1' model='pcie-root-port'> <model name='pcie-root-port'/> <target chassis='1' port='0x8'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/> </controller> <controller type='pci' index='2' model='pcie-root-port'> <model name='pcie-root-port'/> <target chassis='2' port='0x9'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <controller type='pci' index='3' model='pcie-root-port'> <model name='pcie-root-port'/> <target chassis='3' port='0xa'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <interface type='bridge'> <mac address='52:54:00:d6:d9:4f'/> <source bridge='br0'/> <model type='virtio-net'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> </interface> <serial type='pty'> <target type='isa-serial' port='0'> <model name='isa-serial'/> </target> </serial> <console type='pty'> <target type='serial' port='0'/> </console> <channel type='unix'> <target type='virtio' name='org.qemu.guest_agent.0'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </hostdev> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x00' slot='0x1f' function='0x3'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </hostdev> <hostdev mode='subsystem' type='usb' managed='no'> <source> <vendor id='0x046d'/> <product id='0xc52b'/> </source> <address type='usb' bus='0' port='1'/> </hostdev> <memballoon model='none'/> </devices> </domain> Do not pass to the vm the serial bus controller, but keep it bound to vfio, as it is now. Let me know if something changes. Quote Link to comment
wacko37 Posted February 9, 2023 Author Share Posted February 9, 2023 (edited) Ok, copied xml over, updated and started VM. Sadly no hdmi, outputs are the same as in image above, I can also confirm serial bus was not passed-through but still bound to vfio Edited February 9, 2023 by wacko37 Quote Link to comment
ghost82 Posted February 9, 2023 Share Posted February 9, 2023 Can you try to add these to your syslinux configuration to blacklist i2c? modprobe.blacklist=i2c_i801,i2c_smbus It should be something like this for the append line: append modprobe.blacklist=i2c_i801,i2c_smbus video=efifb:off initrd=/bzroot Reboot the server after changes Quote Link to comment
wacko37 Posted February 9, 2023 Author Share Posted February 9, 2023 Ok, i'll try this now with your VM xml config and let you know the results also the "video=efifb:off" is already in my syslinux as this was the only way I could get video on the the VM as Unraid had utilised the igpu from boot and this code prevents that. Please correct me if I'm wrong in my understanding. Quote Link to comment
ghost82 Posted February 9, 2023 Share Posted February 9, 2023 Correct, efifb is a must to have video output in your case. Quote Link to comment
wacko37 Posted February 9, 2023 Author Share Posted February 9, 2023 (edited) Sadly no change mate still no HDMI options, normally after reboot I like to check system logs for any errors and found these, is that related to the syslinux code? Edited February 9, 2023 by wacko37 Quote Link to comment
ghost82 Posted February 9, 2023 Share Posted February 9, 2023 (edited) Can you check in the vm if the hdmi is detected at all from command line? Run this in the libreelec terminal: lspci -v 29 minutes ago, wacko37 said: is that related to the syslinux code? Don't know, I think no. There was a report here: https://forums.unraid.net/bug-reports/prereleases/hardware-error-r1676/ Edited February 9, 2023 by ghost82 Quote Link to comment
wacko37 Posted February 9, 2023 Author Share Posted February 9, 2023 (edited) Sorry for the delayed response got totally sucked into that error above, thanks for the link to the other thead, I have followed it up there. Please see attached log for the Ispci -v cmd Also searched the log and there is no mention of HDMI. libreelec Ispci -v log.txt Edited February 9, 2023 by wacko37 Quote Link to comment
ghost82 Posted February 9, 2023 Share Posted February 9, 2023 Yes, there is, but it's on bus 2 slot 1, instead of bus 0 slot 3.. did you apply my changes to the xml?Recheck xml Quote Link to comment
wacko37 Posted February 9, 2023 Author Share Posted February 9, 2023 (edited) My bad, I undid all the changes I have done over the last few days to see if i could clear that error, but to no avail. Doing so must have reset the XML? Anyhow as of now my system devices is binded as in the original photo above, my syslinux configurations is : "append modprobe.blacklist=i2c_i801,i2c_smbus video=efifb:off initrd=/bzroot" and I have added your amended xml Attached is new log for Ispci -v cmd, sadly still no hdmi audio output. libreelec Ispci -v log (2).txt Edited February 9, 2023 by wacko37 Quote Link to comment
ghost82 Posted February 9, 2023 Share Posted February 9, 2023 (edited) Last chance..try to put the audio on bus 0 slot 1f: qemu should already had that defined as multifunction: <domain type='kvm'> <name>Libreelec</name> <uuid>95170484-4711-898d-d1da-8da9fe928b9d</uuid> <metadata> <vmtemplate xmlns="unraid" name="Linux" icon="linux.png" os="linux"/> </metadata> <memory unit='KiB'>1048576</memory> <currentMemory unit='KiB'>1048576</currentMemory> <memoryBacking> <nosharepages/> </memoryBacking> <vcpu placement='static'>4</vcpu> <cputune> <vcpupin vcpu='0' cpuset='0'/> <vcpupin vcpu='1' cpuset='8'/> <vcpupin vcpu='2' cpuset='2'/> <vcpupin vcpu='3' cpuset='10'/> </cputune> <os> <type arch='x86_64' machine='pc-q35-7.1'>hvm</type> <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader> <nvram>/etc/libvirt/qemu/nvram/95170484-4711-898d-d1da-8da9fe928b9d_VARS-pure-efi.fd</nvram> <boot dev='hd'/> </os> <features> <acpi/> <apic/> </features> <cpu mode='host-passthrough' check='none' migratable='on'> <topology sockets='1' dies='1' cores='2' threads='2'/> <cache mode='passthrough'/> </cpu> <clock offset='utc'> <timer name='rtc' tickpolicy='catchup'/> <timer name='pit' tickpolicy='delay'/> <timer name='hpet' present='no'/> </clock> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/local/sbin/qemu</emulator> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='writeback'/> <source file='/mnt/user/domains/Libreelec/vdisk2.img'/> <target dev='hdc' bus='sata'/> <address type='drive' controller='0' bus='0' target='0' unit='2'/> </disk> <controller type='usb' index='0' model='ich9-ehci1'> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/> </controller> <controller type='usb' index='0' model='ich9-uhci2'> <master startport='2'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/> </controller> <controller type='usb' index='0' model='ich9-uhci3'> <master startport='4'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/> </controller> <controller type='pci' index='4' model='pcie-to-pci-bridge'> <model name='pcie-pci-bridge'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </controller> <controller type='pci' index='5' model='pcie-root-port'> <model name='pcie-root-port'/> <target chassis='5' port='0xb'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/> </controller> <controller type='virtio-serial' index='0'> <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> </controller> <controller type='sata' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </controller> <controller type='pci' index='0' model='pcie-root'/> <controller type='pci' index='1' model='pcie-root-port'> <model name='pcie-root-port'/> <target chassis='1' port='0x8'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/> </controller> <controller type='pci' index='2' model='pcie-root-port'> <model name='pcie-root-port'/> <target chassis='2' port='0x9'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <controller type='pci' index='3' model='pcie-root-port'> <model name='pcie-root-port'/> <target chassis='3' port='0xa'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <interface type='bridge'> <mac address='52:54:00:d6:d9:4f'/> <source bridge='br0'/> <model type='virtio-net'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> </interface> <serial type='pty'> <target type='isa-serial' port='0'> <model name='isa-serial'/> </target> </serial> <console type='pty'> <target type='serial' port='0'/> </console> <channel type='unix'> <target type='virtio' name='org.qemu.guest_agent.0'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <audio id='1' type='none'/> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </hostdev> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x00' slot='0x1f' function='0x3'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x5'/> </hostdev> <hostdev mode='subsystem' type='usb' managed='no'> <source> <vendor id='0x046d'/> <product id='0xc52b'/> </source> <address type='usb' bus='0' port='1'/> </hostdev> <memballoon model='none'/> </devices> </domain> If you can save this xml without error and if you are able to boot the vm check with lspci -v in the vm that the audio is on bus 0, slot 1f function 5. However in all the other cases the audio controller is recognized by the linux kernel and the correct driver for it is loaded, snd_hda_intel. I would blame (if I have to blame something) libreelec implementation for this issue, since both qemu and libvirt are passing through correctly the audio device and the linux kernel is loading properly the audio driver. You could try also this: https://forum.libreelec.tv/thread/5555-audio-issues/ ..if you can understand what they mean at the end of the discussion... You could also try, without restarting the vm, to exit kodi and start again and see if the audio shows: https://www.getdroidtips.com/how-to-fix-kodi-no-sound-error-in-2-minutes/#Method-2-8211-Restart-Kodi Check the paragraph "use the exit command" Edited February 9, 2023 by ghost82 Quote Link to comment
wacko37 Posted February 9, 2023 Author Share Posted February 9, 2023 @ghost82 firstly thankyou kindly for all your help and expertise, sadly still no HDMI audio I'm afraid, see log attached. I just tried to exit Kodi, but I don't have that options within the Librelec/Kodi, but I did reboot kodi without rebooting the VM using a power menu from another skin but to no avail. I'll have a look at the other forum that you have mentioned and see what I can come up with. If I manage to fix this issue I'll be sure to post my findings back here. Cheers! libreelec Ispci -v log (3).txt 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.