kwilinsi

Members
  • Posts

    4
  • Joined

  • Last visited

kwilinsi's Achievements

Noob

Noob (1/14)

1

Reputation

  1. Components: CPU: AMD Ryzen 5 5600G Motherboard: MSI B550-A Pro GPU: AMD Radeon RX 560 I'm trying to pass through an AMD GPU to an Ubuntu desktop VM. The VM works fine in VNC, but when using GPU passthrough, I get this error in the libvirt log: 2022-03-25 21:42:07.299+0000: 19863: error : qemuMonitorIO:578 : internal error: End of file from qemu monitor It also shows "tainted: high-privileges" and "tainted: host-cpu". I have also tried creating a Windows VM, and I get exactly the same error message. I have also tried passing it through with and without the sound card on the GPU. At one point I actually managed to get the passthrough to work, with the Ubuntu login screen appearing on the monitor. But when I rebooted to add a keyboard, it didn't work anymore, and I have not been able to replicate that (even deleting the VM and recreating the same settings). Note that I have PCIe ACS override disabled, as it was not needed for separately IOMMU groups. The graphics and sound components of the card are by themselves in IOMMU group 9: [1002:67ff] 10:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Baffin [Radeon RX 550 640SP / RX 560/560X] (rev cf) [1002:aae0] 10:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Baffin HDMI/DP Audio [Radeon RX 550 640SP / RX 560/560X]
  2. I'm trying to run an Ubuntu 20.04 VM in Unraid as my main computer. I'm coming from 6 months of successful VM experience with Windows 10, but I've decided to move to Ubuntu. Motherboard: ASRock X399 Taichi CPU: Ryzen Threadripper 1920X 12-core GPU: Nvidia GeForce GTX 1050 Ti (using a vbios that worked great in Windows 10) Alternate GPU: Old AMD Radeon HD 6950 that I don't/haven't used for anything right now but is in the machine I installed Ubuntu yesterday and everything has worked smoothly except for audio. When I tried playing music on speakers using motherboard audio with Spotify, my computer immediately froze. The mouse could still move, but all windows were completely inoperable and the keyboard unusable. The only option was to connect to Unraid dashboard from laptop and force shut it down. I tried again and got a minute or two of crackling audio coming out my headphones (CoolerMaster MH752: they're usb with their own sound card) before the same freezing. I did some googling and stumbled upon this stackexchange post, where the "pci=nomsi" solution got me a few minutes of solid playback through speakers. Headphones didn't work though and switching to an hdmi audio source crashed the computer. I do not know if this is an Unraid or Ubuntu problem, but I just switched my Lenovo laptop to Ubuntu as well and it's been working fine (aside from the fingerprint sensor, but that's a different question). It's worth mentioning that I was having some audio problems in Windows before I switched. When I first set up my computer all the passthrough worked just fine, but my random inexplicable audio issues in Windows have increased slowly for the past two months. First my audio would freeze only occasionally, then break whenever I merely opened the audio settings (???), and near the end all output would fail mysteriously in zoom every half hour or so until I restarted programs. At this point I would just like to be able to use Ubuntu with audio that works consistently. I would prefer that my headphones, motherboard audio, and graphics card hdmi audio all worked, but I could settle for the first two or even just the headphones plus buying a cheap USB sound card. As far as logs go, I haven't seen any errors in Unraid. In Ubuntu I tried leaving system logs open during a crash (on the "important" tab) but I got nothing. I would assume the computer video freezing meant it didn't update the log display.
  3. Finally managed to get it to work by (mostly) following this guide. First, unrelated to the guide, we reverted from UEFI to Legacy boot. Went to the Unraid GUI Main tab, clicked on "Flash" in the list of drives, scrolled to the bottom, and unchecked the UEFI checkbox thing. We also connected to the flash drive share from another computer and copied all the contents as a backup, and after that renamed the "EFI-" folder to just "EFI" (simply removing the hyphen). Then we shut down Unraid, went to BIOS, and using the manual found every setting related to UEFI and set it to the Legacy option. Then we boot Unraid and checked to make sure it had boot in Legacy mode (by going to the Main page, clicking "Flash", and scrolling to the bottom). Now we made a new virtual machine and went through the configuration, which I'll copy with slight modification from the guide linked earlier. Machine: latest Q35 option BIOS: OVMF Same ISO and VirtIO ISO we've clicked maybe forty times today Used 100G as disk size. VNC graphics with no sound card. Unlike the tutorial we were following (but as a way of avoiding using RDP since we don't have Windows 10 Pro) we enabled every single USB device we planned on using in the final setup. Unchecked "Start VM after creation" and created it. Then edited the VM and went to XML. Under the <apic/> tag added <ioapic driver='kvm'/> Left hyperv just like it was except we changed the vender_id value to `1234567890ab` as in the tutorial. Also added a <kvm> tag under it such that all the changes together looked like <ioapic driver='kvm'/> <hyperv> <relaxed state='on'/> <vapic state='on'/> <spinlocks state='on' retries='8191'/> <vendor_id state='on' value='1234567890ab'/> </hyperv> <kvm> <hidden state='on'/> </kvm> Then at the bottom of the XML before the closing </domain> tag but after the </devices> tag we added this XML: <qemu:commandline> <qemu:arg value='-cpu'/> <qemu:arg value='host,kvm=off,hv_vendor_id=null'/> <qemu:arg value='-machine'/> <qemu:arg value='q35,kernel_irqchip=on'/> </qemu:commandline> There was alternative XML here but it seemed to be for ryzen and we have an Intel CPU and GTX 1060 GPU. Clicked update, started the VM, and quickly opened VNC and pressed a key. I assume you're familiar with SpaceInvader One's tutorial on configuring a Windows 10 VM if you're reading this, and if not you should follow his video first. Then we selected a Windows 10 version (Home in our case) and went through the self explanatory setup. The one thing different than usual was after selecting the drive we clicked browse again and went to NetKVM>win10>amd64 to get the network ethernet adapter. Normally this was done within Windows in the Device Manager, but we wanted to follow the source tutorial closely. Went through the rest of setup. On the Windows 10 Desktop, we opened Device Manager and fixed the two devices without drivers. Unlike SpaceInvader One, we did NOT fix the display driver. At this point we skipped all the parts of the tutorial regarding RDP because this is Windows 10 Home. We did install Teamviewer as an alterative, but it proved unnecessary later since we had enabled the usb keyboard and mouse. We shut down the VM, went into edit mode, and added the GPU and associated vbios, along with the audio controller. Clicked apply, and then edited the VM again in XML mode. We made all the same changes as before (interestingly the kvm part was still there), and additionally removed all the <graphics> and <video> tags related to VNC. We also followed SpaceInvader One's advanced GPU passthrough tutorial and adjusted the bus and slot of the audio controller to match the graphics card. We saved the XML and started the VM, and magically everything was working. At this point the tutorial we were following said to install the gpu driver 399.24, but we didn't do that. Or well, we started to, but magically about 2 minutes into the download everything just suddenly worked. The screen resolution fixed and all the other monitors started up. It worked! I still have absolutely no idea why since we didn't change any drivers, but it just worked. I'd suggest waiting like 1 to 10 minutes, who knows. We messed something up in the XML later and repeated this entire process, and sure enough the same thing happened again. After two minutes the display worked. Note that we never installed any drivers from Nvidia; it just worked. Went from code 43 to no error at all. If you repeat this, make sure that you never ever boot your VM without the XML edits made. Every time you change something in the regular form view, you need to click "Update" and then go back into the edit page of the VM in XML mode and confirm that the changes are still there. In my experience everything around the kvm section works fine, but the gpu and soundcard and the qemu part at the end get reset.
  4. Motherboard: Z390-A Pro CPU: Intel Core i7-9700K GPU: EVGA GeForce GTX 1060 3GB Background I'm helping a friend set up a fresh Unraid install with a Windows 10 VM as a daily driver. He's using the beta Unraid 6.9 because of the ability to create pools without depending on plugins. I've been following a host of SpaceInvader One tutorials and we set up the virtual machine completely through VNC. However, when we switched to the graphics card we couldn't get an image on the screen. It turns out that the vbios from techpowerup was the problem. We booted with VNC as the main graphics card and the GPU as the secondary one (with no vbios provided), and from there we were able to install GPU-Z and dump a vbios manually. After removing the header with help from SpaceInvader One, we successfully got the computer to boot with the GPU as the main and only graphics card. However, at this point the screen resolution was incorrect and we only had an image on 1 of 4 monitors. There were no errors in device manager, so we installed an Nvidia driver (without GeForce Experience) and suddenly we had a Code 43 error in device manager. As I understand it, this means that Nvidia knows we're running in a VM and doesn't like that. Things we've tried We tried changing random settings in the VM and recreating it a few times to no avail. After deciding to write this post, we carefully created two VMs and logged the configuration here. We currently have two virtual machines that are almost identical except one is on Q35 and one is on i440fx machine. They both have • All 8 cpu threads • 24 gb ram on Q35 and 16 gb of ram on 1440fx • OVMF bios • No Hyper-V (since I've seen that mentioned in a number of forum posts) • USB 2.0 controller • The same install ISO and VirtIO driver • The ISO and VirtIO driver busses are SATA for the Q35 machine and IDE for the 1440fx machine. These were the default options and I didn't change them because I don't know what they mean. • The Q35 has a 150 gb vdisk and the other (due to a typo) only has 100 gb • And were initially set up with VNC • And after initial setup, we turned them off and changed the graphics to the GPU with vbios and nothing else. Before booting we also edited the XML to follow SpaceInvader One's suggestion of putting the video and sound part of the gpu on the same virtual bus slot. • The i440fx machine has a keyboard and mouse that were attached after a successful boot to allow us to sign in and install the NVidia driver If we try booting the Q35 machine nothing happens on the screen and we have to force stop. We were able to successfully boot the i440fx machine with no errors in device manager. Then we ran an Nvidia game ready driver for the GPU, and after it finished installing we had a code 43 error in device manager. Other random info Unraid is booting in UEFI mode (is this changeable without losing Unraid config and all that? Is it worth trying to change? Does the motherboard even support non UEFI?) IOMMU groups are enabled. Due to not knowing much about bios configurations, we haven't touched anything aside from VT-d. We did find the Motherboard/BIOS manual though. According to the XML the GPU is physically plugged into domain 0x0000, bus 0x01, slot 0x00 on the motherboard and virtually plugged in to bus 0x00, slot 0x05, and function 0x00 for the video and 0x01 for the audio. This is the same on both VMs. Logs In the i440fx machine we have a whole bunch of nearly identical log entries (each with a different region). Not sure exactly when they appeared though in the boot process or if they happened at the same time as installing the Nvidia driver. 2021-01-08T19:35:25.371451Z qemu-system-x86_64: vfio_region_write(0000:01:00.0:region3+0x16f2f, 0x0,1) failed: Device or resource busy In the Q35 machine we don't get an error log when it boots despite not getting a picture on the screen. However there is one error message (but I'm not sure if the timestamp is from during a VNC boot or a GPU boot) 2021-01-08T19:07:20.362580Z qemu-system-x86_64: -device vfio-pci,host=0000:01:00.0,id=hostdev0,bus=pci.4,multifunction=on,addr=0x0,romfile=/mnt/cache/isos/gtx1060.rom: Failed to mmap 0000:01:00.0 BAR 3. Performance may be slow