6.2beta-RC1 OpenELEC/LibreELEC VM Sound


Recommended Posts

Hi Everyone,

 

I'm really at a loss here. Using unraid 6.2.0-rc1, I've attempted to use the LibreELEC/OpenELEC pre-packaged VMs (both do the exact same thing) and I have a Zotac GT730 connected via HDMI to a Samsung TV. The NVIDIA Graphics controller AND NVIDIA Audio device are both passed through. Once Libre/Open boots, and I go into sound settings and pick HDMI 1 (identified by SAMSUNG in Kodi) and return to the menu I immediately get indefinite clicking sounds (much like if you were to hold down an arrow key and continually scroll through the main menu). Oddly enough, if I kill kodi and use speaker-test, I get the expected static out of the L&R speakers. If I use aplay to play a wav file to the same hw port, I get no sound. I've even connected the HDMI cable direct to a different TV to rule that out, with the same result.

 

To make things interesting (and to rule out other possibilities), I installed xubuntu 16.04 using the generic "Linux" template and sound works perfectly both in the OS and Kodi. The only thing that is different is that xubuntu uses pulseaudio, but I'm not overly familiar with pulse, so I'm not sure what relationship that has with alsa.

 

Finally, I also passed through the AMD igpu and associated audio device instead of the nvidia card, and get the exact same result, which leads me to believe it is a VM issue not a Open/Libreelec issue.

 

If anyone has any suggestions, that would be awesome.

 

Here are my specs and logs:

 

Hardware Info

00:00.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Root Complex [1022:1422]
00:00.2 IOMMU [0806]: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) I/O Memory Management Unit [1022:1423]
00:01.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Kaveri [Radeon R7 Graphics] [1002:1313]
00:01.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Kaveri HDMI/DP Audio Controller [1002:1308]
00:02.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1424]
00:02.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:1425]
00:03.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1424]
00:03.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Root Port [1022:1426]
00:04.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1424]
00:10.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller [1022:7814] (rev 09)
00:10.1 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller [1022:7814] (rev 09)
00:11.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] [1022:7801] (rev 40)
00:12.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI Controller [1022:7807] (rev 11)
00:12.2 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller [1022:7808] (rev 11)
00:13.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI Controller [1022:7807] (rev 11)
00:13.2 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller [1022:7808] (rev 11)
00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller [1022:780b] (rev 16)
00:14.2 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller [1022:780d] (rev 01)
00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge [1022:780e] (rev 11)
00:14.4 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] FCH PCI Bridge [1022:780f] (rev 40)
00:14.5 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI Controller [1022:7809] (rev 11)
00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Function 0 [1022:141a]
00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Function 1 [1022:141b]
00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Function 2 [1022:141c]
00:18.3 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Function 3 [1022:141d]
00:18.4 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Function 4 [1022:141e]
00:18.5 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Function 5 [1022:141f]
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK208 [GeForce GT 730] [10de:1287] (rev a1)
01:00.1 Audio device [0403]: NVIDIA Corporation GK208 HDMI/DP Audio Controller [10de:0e0f] (rev a1)
02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 06)

 

lspci on VM:

00:00.0 Host bridge: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller
00:07.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92)
00:1f.0 ISA bridge: Intel Corporation 82801IB (ICH9) LPC Interface Controller (rev 02)
00:1f.2 SATA controller: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] (rev 02)
00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 02)
01:01.0 PCI bridge: Red Hat, Inc. QEMU PCI-PCI bridge
02:01.0 Unclassified device [0002]: Red Hat, Inc Virtio filesystem
02:02.0 Ethernet controller: Red Hat, Inc Virtio network device
02:04.0 SCSI storage controller: Red Hat, Inc Virtio block device
02:05.0 VGA compatible controller: NVIDIA Corporation GK208 [GeForce GT 730] (rev a1)
02:06.0 Audio device: NVIDIA Corporation GK208 HDMI/DP Audio Controller (rev a1)
02:07.0 Unclassified device [00ff]: Red Hat, Inc Virtio memory balloon

 

aplay -l on vm:

**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

 

VM xml:

<domain type='kvm' id='28'>
  <name>LibreELEC</name>
  <uuid>155ce985-0987-ed1c-9045-26e1c29ed71a</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="LibreELEC" icon="libreelec.png" libreelec="7.0.1_1"/>
  </metadata>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>1</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='2'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-2.5'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/155ce985-0987-ed1c-9045-26e1c29ed71a_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='1' threads='1'/>
  </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/cache/appdata/vms/LibreELEC/LibreELEC-unRAID.x86_64-7.0.1_1.img'/>
      <backingStore/>
      <target dev='hdc' bus='virtio'/>
      <readonly/>
      <boot order='1'/>
      <alias name='virtio-disk2'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>
    </disk>
    <controller type='usb' index='0' model='nec-xhci'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </controller>
    <controller type='sata' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'>
      <alias name='pcie.0'/>
    </controller>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
      <model name='i82801b11-bridge'/>
      <alias name='pci.1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <model name='pci-bridge'/>
      <target chassisNr='2'/>
      <alias name='pci.2'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
    </controller>
    <filesystem type='mount' accessmode='passthrough'>
      <source dir='/mnt/cache/appdata/LibreELEC/'/>
      <target dir='appconfig'/>
      <alias name='fs0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
    </filesystem>
    <interface type='bridge'>
      <mac address='52:54:00:ee:46:88'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/>
    </interface>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/>
      </source>
      <alias name='hostdev1'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x06' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x04f2'/>
        <product id='0x0963'/>
        <address bus='4' device='2'/>
      </source>
      <alias name='hostdev2'/>
    </hostdev>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x07' function='0x0'/>
    </memballoon>
  </devices>
</domain>

 

 

 

 

 

 

Link to comment

For OE you have to do the following:

create file in config folder of OE

 

.config/modprobe.d/sound.conf

and put line

options snd-hda-intel enable_msi=1

 

That should fix the audio stutter right away (reboot after change).

I thought this was supposed to be done automatically WAY back in 6.1 days, I guess not.  ;)

  • Upvote 1
Link to comment

Hi bungee91,

I do have the same problem with the lastest unraid version and nvidia gpu

I did the config file and restart the vm nothing happen

The sound like in the menu and no sound when you play anything

I do have my own post on that https://lime-technology.com/forum/index.php?topic=50267.0

And i hope we can fix it

And it seems the problem not only with OpenELEC & LibreELEC

I did see it in Win 10

I have Steam os It did work amazing and some time you do get no sound at boot after that its working with no problem

 

Link to comment

Just want to make sure you did the config file exactly as posted, using nano or vi to edit/create the file using ssh?

This has always solved the OE (and I suppose now LE) issues for Nvidia cards.

I believe I also had to set passthrough to on for all supported formats, but perfect after that.

 

As described I would get the "indefinite clicking sounds (much like if you were to hold down an arrow key and continually scroll through the main menu)", but this solved it.

The last time I went to set one of these up (OE VM) I had issues with the Nvidia driver not being installed and I had to follow steps outlined in this thread https://lime-technology.com/forum/index.php?topic=47550.msg458389#msg458389 to get the Nvidia drivers installed, however this is not either of your issues.

Link to comment

Hi bungee91,

I do have the same problem with the lastest unraid version and nvidia gpu

I did the config file and restart the vm nothing happen

The sound like in the menu and no sound when you play anything

I do have my own post on that https://lime-technology.com/forum/index.php?topic=50267.0

And i hope we can fix it

And it seems the problem not only with OpenELEC & LibreELEC

I did see it in Win 10

I have Steam os It did work amazing and some time you do get no sound at boot after that its working with no problem

 

One more thing, many Nvidia cards in Windows need the MSI interrupt set. There is a utility here to do this for you, if not you'll eventually get "demonic audio".

Searching............: Thread is here https://lime-technology.com/forum/index.php?topic=47089.msg453669#msg453669

I have noticed when upgrading drivers this gets set back to off, so you may have to complete this again if you update.

Link to comment

You, my friend, are a genius. This worked perfectly.

 

It's funny, after hours of google searching I came across a devel bug tracker that talked about the MSI setting, and noticed mine was off. Next step was to figure out how to force it on. You saved me another few hours of google searching. :)

 

Thanks!!

 

create file in config folder of OE

 

.config/modprobe.d/sound.conf

and put line

options snd-hda-intel enable_msi=1

Link to comment

To expand on this further for those that may have the same problem, there is an easy way to check.

 

Use lspci to find the ID of your device

root@mediaserver:~# lspci

01:00.0 VGA compatible controller: NVIDIA Corporation GK208 [GeForce GT 730] (rev a1)

01:00.1 Audio device: NVIDIA Corporation GK208 HDMI/DP Audio Controller (rev a1)

02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)

 

Use lspci again to see the details:

root@mediaserver:~# lspci -v -s 1:00.1

01:00.1 Audio device: NVIDIA Corporation GK208 HDMI/DP Audio Controller (rev a1)

        Subsystem: ZOTAC International (MCO) Ltd. GK208 HDMI/DP Audio Controller

        Flags: bus master, fast devsel, latency 0, IRQ 49

        Memory at fe080000 (32-bit, non-prefetchable)

        Capabilities: [60] Power Management version 3

        Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+

        Capabilities: [78] Express Endpoint, MSI 00

        Kernel driver in use: vfio-pci

 

If it says "MSI: Enable-" like mine did before using bungee91's fix, and you have that weird audio, that is probably what your problem is.

 

 

Link to comment

Just want to make sure you did the config file exactly as posted, using nano or vi to edit/create the file using ssh?

This has always solved the OE (and I suppose now LE) issues for Nvidia cards.

I believe I also had to set passthrough to on for all supported formats, but perfect after that.

 

As described I would get the "indefinite clicking sounds (much like if you were to hold down an arrow key and continually scroll through the main menu)", but this solved it.

The last time I went to set one of these up (OE VM) I had issues with the Nvidia driver not being installed and I had to follow steps outlined in this thread https://lime-technology.com/forum/index.php?topic=47550.msg458389#msg458389 to get the Nvidia drivers installed, however this is not either of your issues.

 

Hi bungee91,

I did create the file in my mac by text editor and copy it to oe in the network and past it

If this wrong Can you please guide as i am newbie LOL

I think amd is the best in unraid no problems i hope i will buy cheap amd card

And i want to run this built if i can https://forum.libreelec.tv/thread-302.html

Can i run it ?

 

Thanks a lot

Link to comment

Hi bungee91,

I did create the file in my mac by text editor and copy it to oe in the network and past it

If this wrong Can you please guide as i am newbie LOL

I think amd is the best in unraid no problems i hope i will buy cheap amd card

And i want to run this built if i can https://forum.libreelec.tv/thread-302.html

Can i run it ?

 

Thanks a lot

 

I think that's probably well enough, but can't say for sure.

I'm by no means great at using a console based text editor, but it is basically:

At the command line when in the directory for your OE/LE VM (such as /mnt/cache/VMs/OE/) type:

nano .config/modprobe.d/sound.conf

 

I can't recall if the folders are there or not by default, if not you may have to make the folders first

A directory location you could be in at the shell is (as an example)  /mnt/cache/VMs/OE/ type:

mkdir .config

now when in the .config folder that you just created (/mnt/cache/VMs/OE/.config/) type:

mkdir modprobe.d

 

Now that we have the needed folders:

nano .config/modprobe.d/sound.conf

Type:

options snd-hda-intel enable_msi=1

into the nano file editor, exactly as written.

 

Exit nano

CTRL + X

When asked to save the modified file, say yes.

Boot or restart your OE/LE VM.

 

There's likely a much easier way to do this, I had to look that up to give directions..  :D

 

 

Also, Nvidia is the recommended GPU from Limetech and others on the Vfio forums. AMD is a bit more hit or miss with some cards.

Link to comment

Hi bungee91,

I did create the file in my mac by text editor and copy it to oe in the network and past it

If this wrong Can you please guide as i am newbie LOL

I think amd is the best in unraid no problems i hope i will buy cheap amd card

And i want to run this built if i can https://forum.libreelec.tv/thread-302.html

Can i run it ?

 

Thanks a lot

 

I think that's probably well enough, but can't say for sure.

I'm by no means great at using a console based text editor, but it is basically:

At the command line when in the directory for your OE/LE VM (such as /mnt/cache/VMs/OE/) type:

nano .config/modprobe.d/sound.conf

 

I can't recall if the folders are there or not by default, if not you may have to make the folders first

A directory location you could be in at the shell is (as an example)  /mnt/cache/VMs/OE/ type:

mkdir .config

now when in the .config folder that you just created (/mnt/cache/VMs/OE/.config/) type:

mkdir modprobe.d

 

Now that we have the needed folders:

nano .config/modprobe.d/sound.conf

Type:

options snd-hda-intel enable_msi=1

into the nano file editor, exactly as written.

 

Exit nano

CTRL + X

When asked to save the modified file, say yes.

Boot or restart your OE/LE VM.

 

There's likely a much easier way to do this, I had to look that up to give directions..  :D

 

 

Also, Nvidia is the recommended GPU from Limetech and others on the Vfio forums. AMD is a bit more hit or miss with some cards.

 

Hi bungee91 ,

I did your win 10 fix and its working Thanks

Now when i want to connect to the folder of my m i get

-bash: /mnt/disks/kvm/domains/OpenELEC: Is a directory

I have my vms folder in Unassigned Devices

And i should connect to it but i cant !

I really need help i cant connect to the vms folder

Because when i try to go through the steps i get  [ Error writing .config/modprobe.d/sound.conf: No such file or directory ]

 

Link to comment

Hi bungee91 ,

I did your win 10 fix and its working Thanks

Now when i want to connect to the folder of my m i get

-bash: /mnt/disks/kvm/domains/OpenELEC: Is a directory

I have my vms folder in Unassigned Devices

And i should connect to it but i cant !

I really need help i cant connect to the vms folder

Because when i try to go through the steps i get  [ Error writing .config/modprobe.d/sound.conf: No such file or directory ]

 

Hi Sniper, really hoping someone other than me reads this and gives you direction (sorry, command line is a when I need to, not a cause I like to kind of thing)  :D

 

It sounds as if your OE VM is located at " /mnt/disks/kvm/domains/OpenELEC"

At the bash prompt type

cd  /mnt/disks/kvm/domains/OpenELEC

this should get you into the directory, then you can make the folders, and create the needed file using nano.

Link to comment

Hi bungee91 ,

I did your win 10 fix and its working Thanks

Now when i want to connect to the folder of my m i get

-bash: /mnt/disks/kvm/domains/OpenELEC: Is a directory

I have my vms folder in Unassigned Devices

And i should connect to it but i cant !

I really need help i cant connect to the vms folder

Because when i try to go through the steps i get  [ Error writing .config/modprobe.d/sound.conf: No such file or directory ]

 

Hi Sniper, really hoping someone other than me reads this and gives you direction (sorry, command line is a when I need to, not a cause I like to kind of thing)  :D

 

It sounds as if your OE VM is located at " /mnt/disks/kvm/domains/OpenELEC"

At the bash prompt type

cd  /mnt/disks/kvm/domains/OpenELEC

this should get you into the directory, then you can make the folders, and create the needed file using nano.

 

I did get to the folder now but when i save it i get [ Error writing .config/modprobe.d/sound.conf: No such file or directory ]

this is wired !!

 

Link to comment

Hi bungee91 ,

I did your win 10 fix and its working Thanks

Now when i want to connect to the folder of my m i get

-bash: /mnt/disks/kvm/domains/OpenELEC: Is a directory

I have my vms folder in Unassigned Devices

And i should connect to it but i cant !

I really need help i cant connect to the vms folder

Because when i try to go through the steps i get  [ Error writing .config/modprobe.d/sound.conf: No such file or directory ]

 

Hi Sniper, really hoping someone other than me reads this and gives you direction (sorry, command line is a when I need to, not a cause I like to kind of thing)  :D

 

It sounds as if your OE VM is located at " /mnt/disks/kvm/domains/OpenELEC"

At the bash prompt type

cd  /mnt/disks/kvm/domains/OpenELEC

this should get you into the directory, then you can make the folders, and create the needed file using nano.

 

I did get to the folder now but when i save it i get [ Error writing .config/modprobe.d/sound.conf: No such file or directory ]

this is wired !!

I don't remember if the config is in the appdata on this install guide or it's stored inside the vdisk. But if you have an appdata folder for the OE VM, you have to create the file there. If it's inside the VM, you have to ssh into it and do exactly as bungee wrote.

Link to comment
  • 10 months later...
On 2016-7-11 at 1:37 PM, bungee91 said:

For OE you have to do the following:

 

 

That should fix the audio stutter right away (reboot after change).

I thought this was supposed to be done automatically WAY back in 6.1 days, I guess not.  ;-)

 

errr does this mean Linux VMs also suffer Demonic sound like Windows ones can?

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.