FYI: This will break if Windows (or you) decides to run chkdsk on the NTFS drive. Proton uses characters in dirs that are invalid for Windows, so Windows tries to repair them by either renaming or removing them.
More info: https://github.com/ValveSoftware/Proton/issues/82#issuecomment-415099440
FYI: It may be handy to add libvirt to the IgnorePKG list so you don't accidentally update it until it is properly resolved
It is possible, through a combination of USB pass-through, multiple GPUs and software like Barrier.
Another possible solution (if you don't need GPU horsepower), might be to install debian w/gui, then Proxmox, then set up the Triple Monitor SPICE displays on the right VMs.
At least few years ago you could use Synergy for free, alas without some features like encryption. Now you have a direct fork of Synergy - Barrier(https://github.com/debauchee/barrier).
Yeah, kernel interface documentation is a bit difficult to search if you don't already kinda know what's going on. For this, see the top few entries of https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-pci
tl;dr, as you've found, for dynamic stuff it probably doesn't work if you don't also use remove_id
after starting the VM, because the next write to new_id
doesn't actually add a new id so the probing probably doesn't happen.
Personally I use bind/unbind exclusively, only adding the device ID at boot time (well, really, at module load time) once.
No problem. It seems likely there are further issues with GoW4 since other games worked acceptably for you before. I had a quick look at PCGW but there doesn't seem to be anything useful for your problem, but it could well be that these issues occur on native Windows for some people as well, so I'd investigate that.
To generate the header file with your ROM, you can use xxd
with the -i
option (xxd
is shipped with vim on most distros). You'll then need to edit this file and change the name of the two variables (the byte array containing the ROM, and the int containing the length of said array) to match the variable names in Arne's OVMF patch. This will give you vrom.h
.
For the AML file, you can use this ASL source (this is the same one Arne provided, originally derived from my one, with a trivial further modification so that it compiles cleanly). You will need to amend the RVBS field (line 37) to match the size of your ROM file (this will be present in the header file you generated above).
Once you have the compiled ACPI table (an AML file), use Arne's build table script to strip the header out of this table (as the header is contained in the OVMF patch itself) to generate the final vrom_table.h
Once you have both header files, put these in the same directory as the patched QemuFwCfgAcpi.c
in the EDK2 source tree OvmfPkg/AcpiPlatformDxe
and you should be able to build it :)
The resulting OVMF blob is standalone - you don't need to (and should not) provide an -acpitable
option to Qemu, nor use a patched Qemu. You just need to have Qemu use this OVMF blob instead of your distro provided one. With libvirt, it's just a matter of updating the <loader>
element in the domain XML:
<loader readonly='yes' type='pflash'>/home/jack/src/edk2/Build/OvmfX64/DEBUG_GCC5/FV/OVMF_CODE.fd</loader>
> I've already accepted that the end result won't be as great as what others here have pulled off
It's not rocket surgery, for a start you gotta find out if baseline performance it fine, I'm not talking about squeezing every bit possible.
There's no harm running something like https://novabench.com/download#personal in both modes and finding the difference, is there?
> I suspect that my hardware isn't ideal for getting the best performance through VM
What gives you that impression?
Nevermind. You can launch the VM from shell just the same, libvirt or qemu/kvm. But that's probably not the way to go for you.
If you weren't new to Linux I'd recommend NixOS. I don't think Arch is a good choice for a newcomer though.
> ... this would only be used on the local network for which it seems RDP is the best?
No, RDP is far from good enough when it comes to gaming (or even video editing). Try Parsec. It's free unless you need multiple monitors.
That said, you have not mentioned any reason why you want to virtualize the gaming VM. If you're not gonna use the host for anything else than gaming, why not just install directly on the machine and then install Parsec (and not worry about passthrough'ing anything)?
The best one I found was this one. Capable of . The problem is that most dummy plugs out there are HDMI 1.3 or DP1.2. I have been in contact with the manufacturer to see if it's possible to edit the EDID of the dummy plug, and they said it wasn't, but they were working on higher end dummy plugs.
This was a while ago, and I've since moved on from my VFIO setup, so I never explored this further.
For USB, you should find a device using the Renesas uPD720201 chipset as it is known to work with hot reset properly, unlike most others on the market. I use this one and it's flawless.
Otherwise, you should know about the architectural quirks of Threadripper that result in some limitations on how you can assign its resources, which I discussed here.
PCI passthrough support has been dropped from VirtualBox, you need to use some other VM software:
>Linux host: Drop PCI passthrough, the current code is too incomplete (cannot handle PCIe devices at all), i.e. not useful enough
To use debugfs
, you'll have to mount it first.
Note: you should only use root
to list/cat files, no other user can access debugfs
There is a similar issue on virtualbox:
https://www.virtualbox.org/ticket/10842
Maybe it is due to the fact 16.04.3 is running Unity, while 17.10 is running Gnome? But that doesn't explain the reason why it is working if I upgrade from 16.04.3 to 17.04 to 17.10, while a fresh install doesn't. And more importantly, how we can get it to work on a fresh install. Anyone else with any ideas?
I didn't know about ScreenBright but I found an autohotkey script and adapted it.
Source
https://hastebin.com/raw/ufadoputav
It also does the putty connection with plink (command line version of putty) without showing a window opening and closing.
It's set to use Ctrl+Alt+Home as hotkey (^!Home)
system monitor may not be showing the hugepages correctly. Check manually on the console:
grep Huge /proc/meminfo
You should get something like this back:
HugePages_Total: 256 HugePages_Free: 256 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 4096 kB
They show you how linux control groups are configured. Mostly used as a way to restrict what certain (groups of) processes can do, like run on which CPUs, but also how much memory a group can take up in total, stuff like that. The kernel documentation at <https://www.kernel.org/doc/Documentation/cgroup-v2.txt> has a decent introduction, and archwiki has some useful stuff about some practical technicalities at <https://wiki.archlinux.org/index.php/Cgroups>. man systemd.resource-control
is useful to understand how it ties in to systemd.
Have a read here. https://www.kernel.org/doc/Documentation/timers/NO_HZ.txt
Basically VMs sorta fit into the one process using 100% of the core situation.
But it's also not always what you want it depends heavily on your usecases
> Everytime I press two keys simultaneously the game will simply forget about the first key pressed.
This is kind of Windows issue:
http://serverfault.com/a/630704
It's only problem when both keyboard and mouse emulated by QEMU as PS/2. So you can completely bypass the problem by simply adding USB mouse input device to your VM configuration. Or you can make both devices USB, but I had some stability issues with emulated USB keyboard.
Also you can simply add two "USB Redirector"s in virt manager and then you'll able to attach devices to VM from: using virt-viewer (or virt-manager VM window).
# virt-manger VM window Virtual Machine -> Redirect USB device # virt-viewer File -> USB device selection
And you can simply directly attach device to virtual USB2 controller:
virsh attach-device {{{{Your_VM_Name}}} /opt/vm/1_mouse.xml # XML will looks like that: <hostdev mode='subsystem' type='usb' managed='yes'> <source startupPolicy='optional'> <vendor id='0x046d'/> <product id='0xc066'/> </source> </hostdev>
Personally I just use Spice USB redirection since it's most reliable for me.
BIOS Information
Vendor: American Megatrends Inc.
Version: P2.00
Release Date: 11/21/2017
Base Board Information
Manufacturer: ASRock
Product Name: X399 Taichi
Version:
Serial Number: M80-AC015300017
Updating the BIOS to 3.30 released 2018/8/21 Wish that had a SHASUM, hope it's a signed blob..?!
IOMMU Group 28 43:00.0 USB controller [0c03]: Renesas Technology Corp. uPD720201 USB 3.0 Host Controller [1912:0014] (rev 03)
Was the only way I could get the USB PCI card into an isolated group.
hahahaha yeah I had the same reaction when I found out about NoMachine😂, running without a dedicated or integrated GPU 🤯
I use it almost daily even back to the VM from my phone or laptop, either to watch shows or simply editing documents.
I'm guessing the "bugs" is an option you might need to tweak, or you simply need to get used to NoMachine and understand how it works, usually it's not buggy for me. It did take me a while to get used to it.
But damn! was it a game changer for me, it has even saved my VM when the GPU drivers got corrupted, normally my host would not even have a video... so how do I fix the guest?, NoMachine to the rescue!
Leaning SSH was also a big game changer for me, it seemed so alien, but once you learn it, it's really hard to not have it.
I use SSH to copy paste files from my phone to my VMs or the Host though my phone though this app literally copy file, paste to computer, and it's there, going though an encrypted connection.
Or even simply use a SSH capable music player on my phone to connect to my computer giving me basically the highers bitrate music with absolutely no ads.
I do believe you CAN run Pulseaudio on Windows. It's a pretty old version, but it should work. With that you could create a bridged network (so you can see both the host and the guest on the network) and use Pulseaudios ability to send audio over a network to send it to your host.
Here is Pulseaudio on Windows https://www.freedesktop.org/wiki/Software/PulseAudio/Ports/Windows/Support/
There's a PulseAudio server (i.e. the part that ouputs audio) for Windows here.
You should be able to do this entirely with Pulseaudio with a setup like the following. This assumes that both guest and host have their own physical audio output devices and you're simply switching outputs on your receiver/amplifier If this isn't the case for you, let me know how your audio devices are connected and I can provide alternate instructions.
Contrary to what /u/cd109876 wrote, you don't have to manually make grub entries. grub2-mkconfig generates the grub2 config file using a system of shell scripts and .ini config files.
grub-customizer hasn't been updated in 3 years, I wouldn't let it near my config with a ten foot pole.
The stock scripts generate 2 entries per installed kernel: a default entry and a recovery entry. You can simply set extra kernel parameters using the config file /etc/default/grub, and these will be appended to the relevant grub entry next time grub2-mkconfig runs.
The contents of GRUB_CMDLINE_LINUX
are appended to both default and recovery entries.
GRUB_CMDLINE_LINUX_DEFAULT
is only appended to the default entry
GRUB_CMDLINE_LINUX_RECOVERY
(undocumented) is only appended to the recovery entry
See where I'm going with this? Use the default entry for your usual use case and use the recovery entry for the other one.
The stock differences between default and recovery (here at least) are only disabling the graphical bootsplash and not setting a resume device for suspend to disk, so you're not losing anything by booting the recovery entry (it's not Windows Safe Mode)
So I have
GRUB_CMDLINE_LINUX_DEFAULT="splash=silent resume=/dev/disk/by-id/foobarbaz-partN quiet mitigations=auto intel_iommu=on vfio-pci.ids=cafe:d00d"
to normally boot in VFIO
and GRUB_CMDLINE_LINUX
and GRUB_CMDLINE_LINUX_RECOVERY
are empty to boot with my GPU not passed through with recovery.
Don't forget to run grub2-mkconfig
as documented or update-grub
(Ubuntu's wrapper for people who can't type more than 11 chars correctly)
If you are a confident shell scripter, you could add a third entry per kernel to the grub2 config generator scripts using the same system, but practice booting your system using only the grub2 command line before you write an invalid grub2.cfg to disk. And see grub2-script-check
.
There are a few ways to do it.
My windows VM runs on it's own dedicated GPU and has a monitor hooked directly to it. Basically I have windows on one screen and linux on the other. I pass through my kb/mouse to windows so I can take advantage of the vendor config utilities and I use synergy to share them back to linux.
Another potential method is to use looking glass. In this setup, your windows VM isn't hooked to an external monitor at all, and instead is displayed in it's own window.
Honestly I'm not sure if I'm understanding what you're problem is. If you want to share the KB and mouse between the guest and host seamlessly, you're best bet it to use something like Synergy: https://symless.com/synergy
Laptops that have proper IOMMU support listed there:
https://www.qubes-os.org/hcl/#hardware-laptops
This sadly doesn't mean that even if they have dGPU it's going to work in VM, but their other devices like Ethernet and USB controllers can be passed fine.
In same time you can buy laptop with VFIO working and use some external dGPU. There were people who already reported this way as working.
IOMMU capable laptops can be found on Cubes OS website:
For GPU passthrough this of course not enough as laptop graphics not even exposed to OS as GPU with display controller and Windows don't expose anything to use offloading on arbitrary hardware.
As already noted there is good chance you can get it working if you going to use external GPU that does work on Linux.
Barrier does have some issues so if any of them are important to you I'd recommend using virtio+evdev for very low-latency keyboard/mouse sharing, by default you switch between host/guest with LCtrl+RCtrl.
you can use scroll lock to stay in one screen. I would also suggest that you use barrier instead of synergy as 1.x synergy stopped being updated and barrier has a lot of updates and encryption: https://github.com/debauchee/barrier/releases
I still believe it is better to do it your way, passthrough everything and, if you need, use something to access the linux from the windows box.
While I am not running VFIO anymore on my main box, I still need to use a Linux server that is hooked up on my right monitor. I am using a fork of synergy, called barrier (https://github.com/debauchee/barrier). It works very well and it is really free (with SSL!).
The main challenge was sound, and I've found a solution that would work for one windows and multiple Linux: my headset/speakers are connected to the windows box and I have been using jack to transport sound from the Linux system to my windows. On the Linux side, it uses pulseaduio to call jack and works perfecly, I can even use the microphone from my windows box and have it as an input on my Linux.
I do like your approach to the interrupts, I might do it if I remember when I rebuild my passthrough.
>What I find interesting is that PUBG uses BattleEye (at least I think it does) and PUBG is available on Stadia.
I don't imagine it's hard for the devs to make a build of their game where battleeye is disabled.
AC is not needed when streaming, so i can simply be disabled on platforms like Stadia and shadow.tech. I doubt that trying to convince the game we are a whitelisted VM will do anything, custom builds are probably made for those services where the AC is simply disabled I would guess.
Technology wise I don't think Stadia will be so impressive since we virtualization/vfio people pretty much do what Stadia will do later. Basically they write a fast an highly optimized Client that will connect to a vfio Computer like we use, just in a datacenter. At least shadow.tech and GeForce Now work like that. The whole magic to make it a great product for people Google is probably going to do is to hide it behind a nice GUI program. The will probably bundle the Client with an Steam like overview, so you don't have to interact with the actual OS. I see it as nothing more than using already existing Linux Tools and hiding them behind a GUI. Also I want to note that a lot DevOps/DataCenterEngineering is involved to make the resources quickly and highly available.
Yeah when I was messing around with GPU passthrough on windows VM I think I followed a mixture of the reddit guide you posted in your OP and https://hackmd.io/@edingroot/SkGD3Q7Wv and https://matthewdeporter.com/proxmox/proxmox-pci-passthrough/
https://www.amazon.com/dp/B07X262MRK/ref=cm_sw_r_cp_apa_glt_fabc_KBK0PDHG6K0KVFNGBADX
Very good stand, i bought it for $90 on February and it's pretty low in price right now. Just be aware that setting these up on a desk facing a wall might restrict the movement by a lot. I had to move my desk back quite a bit from the wall to adjust it to my liking.
Side note: If you want them to work with iCUE with full control you need to buy this adapter:
Connect it to one of the USB slots on your commander pro and put the lights in MOBO control mode via the little controller that the Light strips come with.
I'm going to second /u/Cocogoat_Milk and say that your mobo is overpriced. There are plenty of cheaper boards that have equivalently great groups. The only benefit the Dark Hero really has over the cheaper boards is no chipset fan and dynamic OC. I would recommend that you avoid OC anyways on a VFIO system as it could potentially add instability with only a minor boost in CPU perf.
As an example, I have this mobo: https://www.amazon.ca/ROG-Motherboard-Lighting-802-11Ax-Heatsinks/dp/B07SW8DQVL/ref=sr_1_1?dchild=1&keywords=x570+rog&qid=1618978270&sr=8-1 I paired it with a 5950x + 128GB RAM + 2x NVME drives + RTX 3080 + GTX 1050 + 10 HDDs and all is well so far.
Always remember to check the motherboard spreadsheet when in doubt: https://docs.google.com/spreadsheets/d/1wmsTYK9Z3-jUX5LGRoFnsZYZiW1pfiDZnKCjaXyzd1o/edit#gid=2112472504
I like your choice of 32GB RAM here. A lot of people will say it's overkill but I like to open as many browser tabs and applications as I want and not have to stress over closing them.
You probably don't need NVMe. But often I see NVMe drives are fairly similar in cost to SATA drives. I'd advise you to go for NVMe if it's only a little more expensive but if the price difference is too large SATA is fine too.
I believe there are ways to share a vid card between the host and VM but they are more difficult to pull off. Probably easiest to get a third one like a 710. Probably easiest to use a host OS that's popular and sticks to the guides closely. One of the better and more popular guides is based on Ubuntu 20.04 so that's what I would go with if I were just starting out. Otherwise don't be afraid to break things, read a lot, and post lots of details when you ask for help. "It won't boot" won't solicit much help :)
Welcome. Alternatively you can also use one of these riser adapter and go with regular GPU, https://www.amazon.com/ADT-Link-Extender-Graphics-Adapter-PCI-Express/dp/B07YDH8KW9/ref=sr_1_4?dchild=1&keywords=m.2+gpu&qid=1614111554&sr=8-4
Apologies in advance for a low percentage chance recommendation, but if you can find one of these, they're amazing: https://www.sonnettech.com/product/legacyproducts/allegroprousb3pcie.html
Four individual controllers that play nice with ACS & IOMMU, pass each controller through to a different VM. Bummed they discontinued it. It's been replaced with a dual controller card, not sure how well that one works though.
If you find one on ebay, verify that the circuit board looks correct before buying. I've seen single-controller models listed with the part number of the quad-controller model.
Edit: I see a review that this card works with KVM passthrough.
Startech 2 ports pcie USB 3.0. It works well, is shared without any issue to the guest, has no guest reboot issue (tested a lot, never failed) and has a great speed (shared an audio controller with 1ms latency).
https://www.amazon.com/StarTech-com-Port-Express-SuperSpeed-Adapter/dp/B01C2WIQEK/
Does that happens in native, too? Cause the people that intends to use VR typically uses the cards with four controllers on it, like this one:
https://www.amazon.com/StarTech-com-Express-SuperSpeed-Dedicated-Channels/dp/B00HJZEA2S
Gt710 has DVI, VGA and HDMI, passive, no power cable needed, cheap, works fine with Nouveau no need for proprietary drivers, very thin so doesn't block pcie slots. Works fine on Debian, Ubuntu, win10, Catalina..... I have:
>I want to passthrough the GPU, but when not using the VM, I want to be able to use the dedicated GPU on my host.
No it's not a problem. In your situation I would recommend looking glass so you can quickly swap between the guest and host without needing to shut down either one. You may or may not need a $8 dummy plug from amazon depending on your setup.
> meant Kernel Virtual Machine, I didn’t even realize I mentioned both “kvm”s in one post.
Yeah, it's an annoyingly overloaded term in this context.
> I don’t have a motherboard that has 3 pci slots open
Since you don't need a ton of performance, you could probably use a PCIe splitter designed for miners. Something like this: https://www.amazon.com/Splitter-External-Adapter-Multiplier-Bitcoin/dp/B092R64W2V
How physically close are your two machines? Are we limited to network connections between them?
Happy to help. Come back and post your temporary setup when you get it running!
Not sure if you saw my edit but don't fall for the F series scam. The regular 12400 runs a bit high at 194 on Amazon right now but will give you the integrated graphics for a few more dollars.
I tried patching the rom but for whatever reason Bless Hex Editor kept crashing whenever I attempted to use the search function so if you are willing to patch it yourself I'd really appreciate it. I'm running an Asus RTX 3080 Ti OC Edition (GDDR6X).
I got tired of banging my head on the wall with this and having to set up audio a different way for each VM. So I bought a cheapo USB sound card and pass it through on one of the USB port PCI controllers I was passing through to the VM anyways. Works in every OS I have tried so far.
You might not be able to pass that USB controller that is in the same IOMMU group as the RAM. On my setup I bought this Mac-compatible USB PCIe card and passed that to my vm. Inateck PCI-e to USB 3.0 https://www.amazon.com/dp/B00B6ZCNGM?ref=ppx_pop_mob_ap_share
I think there was an issue with your imgur link, but if it looks similar to this then you're probably correct:
>USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Matisse USB 3.0 Host Controller [1022:149c]
If you're on intel it'll look a bit different obviously. Note that after passing through the USB controller, the USB ports managed by that controller will no longer be available to the host. If ports are scarce you might want to consider getting a USB hub or a simple USB switch. Something like this:
https://www.amazon.com/UGREEN-Selector-Computers-Peripheral-One-Button/dp/B01MXXQKGM
If USB 3.0 is sufficient then any card using the Renesas uPD720201 chipset is good; it is known to work with PCIe resets without issue.
I have this one. There are four controllers on the card that can be assigned separately. I think it's 1 controller for each two ports on the back, and one controller for each of the internal USB3 headers. It works well.
So what is the main GPU you're working with now? I found a great deal on a discrete gpu that would be perfect for this use case. It would be worth it just for the benefits of x570 and the best CPU *for* x570. https://www.amazon.com/Sapphire-11315-01-20G-Radeon-Profile-Graphics/dp/B09Y2JWMXS
I'd say that unless it's against ToS (which it doesn't seem to be, including BattleEye's ToS), you're fine.
Pretty much anything, csgo, pubg, MSFS2020, used to play EFT but fuck BattlEye.
Here's my XML. Please note I've edited out the UUID and slightly edited the MAC address.
My:
- Win10AME.xml
- start.sh
Specs:
CPU: AMD Ryzen 1700
Graphics Card: EVGA FTW3 RTX 2070S
Motherboard: ASRock AB350M Pro4
BIOS version: P5.90
My kernel is patched with the AGESA-Fix so that's not it.
> How can I confirm my bios is correct?
Since your VBIOS header is (supposedly) 0xFFFF
, it sounds like the VBIOS you extracted is completely empty.
Have you tried using GPU-Z to dump your VBIOS? Are you presenting a (fake) battery to the VM, as the tutorial you linked describes?
Have you read NVIDIA's statement on GPU passthrough? Seems they support it officially now, without any of the VBIOS dumping, OVMF modification, etc. etc.
https://nvidia.custhelp.com/app/answers/detail/a_id/5173
By the way, you can skip converting QemuFwCfgAcpi.c
from DOS -> UNIX -> DOS format by just converting nvidia-hack-2.diff
from UNIX -> DOS format.
For what it's worth, according to the kernel's command-line parameters documentation, valid values for amd_iommu
are:
> amd_iommu= [HW,X86-64]
>Pass parameters to the AMD IOMMU driver in the system.
>Possible values are:
>
> - fullflush
- Deprecated, equivalent to iommu.strict=1
> - off
- do not initialize any AMD IOMMU found in the system
> - force_isolation
- Force device isolation for all devices. The IOMMU driver is not allowed anymore to lift isolation requirements as needed. This option does not override iommu=pt
> - force_enable
- Force enable the IOMMU on platforms known to be buggy with IOMMU enabled. Use this option with care.
I only develop on windows and use linux just for fun to tinker around with virtualization, so i can't give you super indepth help :/
But here is some input, maybe it helps you to decide:
In regards of bleeding-edgeness i the order would be arch > fedora (Meaning arch is more bleeding-edge)^^
Wikipedia says:
> Fedora has a relatively short life cycle: each version is usually supported for at least 13 months, where version X is supported only until 1 month after version X+2 is released and with approximately 6 months between most versions.
>
>Fedora users can upgrade from version to version without reinstalling
Arch moves forward even faster: They provide a new iso every month ( https://www.archlinux.org/releng/releases/ ).
​
I like arch because it's super basic, you can install the system and there is absolutely no garbage.
But that comes at a price: You have to do most stuff manually and the terminal will be one of your best friends.
You can just install what you need, but i have to admit if you don't like to keep your stuff running and need a "it just works" solution then it's probably not for you, because it's super fast paced and stuff can definitely break.
If ubuntu works for you, just use it - They have an LTS branch, and they take a more "plug and play" approach, they have a big userbase.
If you don't want Ubuntu for any reason you could also try Debian (Ubuntu is based on debian).
I never used Budgie, a quick google tells me it's just a window manager so it should work on any distro you choose^^
Try arandr to get monitor names.
you also want to enable DDC in your monitor settings if you would like ddcutil
to switch your monitor inputs. I setup mine using this info from passthroughpo.st
I also save my layout with arandr
to a shell script & bind it to 'CTRL Windows Key' in XFCE (as XFCE mirrors new displays by default)
Had some issues lately and I thought it was a Gamepad I added as passthrough. It turns out that versions up until 5.0.0.5 contain a bug that causes this behavior. The offending code is disabled in 5.0.0.6.
You can see your version by running: pacman -Qi qemu
I am running Manjaro (Arch fork).
Arch has an updated version, build date for 5.0.0.6:
Build Date : Sat 09 May 2020 11:14:33 PM CEST
Seems like the Manjaro repo does not have that version yet. Therefore I went here:
https://www.archlinux.org/packages/extra/x86_64/qemu/
and clicked on the "Download from Mirror" link on the right. Then I installed the resulting package with
sudo pacman -U qemu-5.0.0-6-x86_64.pkg.tar.zst
After I ran "sudo mkinitcpio -P" and rebooted.
Works ok now.
Check for your OS, what options you have.
I am on Arch, build date for 5.0.0.6:
Build Date : Sat 09 May 2020 11:14:33 PM CEST
What you can do is go here:
https://www.archlinux.org/packages/extra/x86_64/qemu/
and click on the "Download from Mirror" link on the right, and try to install the resulting package with
sudo pacman -U qemu-5.0.0-6-x86_64.pkg.tar.zst
It's worth nothing that this feature requires installing the extension pack, which is decidedly not Free Software:
>Personal Use and/or Educational Use expressly exclude any use of the Product for commercial purposes or to operate, run, or act on behalf of or for the benefit of a business, organization, governmental organization, or educational institution.
If you're on Linux you may find virt-manager (which uses QEMU/KVM/virtio as a backend) a good replacement.
this might be the laptop that you want. I have experience with gpu pass through on laptops so just ask me if you need help
Your diagram is correct. A hub such as this : https://www.amazon.com/Kanex-iAdapt-Port-1-4-DisplayPort/dp/B0845W8MVN should be able to handle your uses (albeit, possibly only at 120hz, not 144). I am not recommending this hub, it just has suitable specifications.
That's a lot of monitor real estate.
Your original concept is better if reverse prime will work for you, as there is less hardware.
I said USB PCI card.
Something like this
No. You're wrong.
https://www.callofduty.com/blog/2021/02/Call-of-Duty-Anti-Cheat-Programs-Update
>Enhancements to our internal anti-cheat software
They literally say they have internal anti-cheat software. So please stop trying to fight a battle you've already lost.
Can you try Passmark's PerformanceTest 9.0 ? In the first 3d benchmark(the one with jets flying around) I get about 90% drop in framerate: from 150-200 fps it drops to 10-15.
Only some benchmarks/workloads have significant impact, and I think most are not noticeable to the eye, you have to take notes of the FPS. I've posted some data in the IOMMU mailing list, if you can test those on Xen it would be a good base for comparison: https://lists.linuxfoundation.org/pipermail/iommu/2017-June/022944.html
Indeed, there's a Batch script in a ZIP attached to the second post in the linked thread that will add the GOP to a VBIOS image for you.
> Oh I see the link is windows? I don't use windows.
The aforementioned ZIP also includes a Python script, which I assume works the same as the BATCH script while supporting multiple platforms. I've never used it, however.
You'll probably need some sort of Windows install to dump / flash your old GPU's VBIOS anyway; Hiren's BootCD PE should do the trick - though you'll need to figure out how to burn it to a USB drive on Linux(?). Try dd
?
You might be able to use a Windows VM with your GPU passed through insted. This is r/VFIO, after all.
Hi Avery,
I read the same kernel documentation and Disable Spectre and Meltdown mitigations basically tried the same workaround with the same result! VMX is still disabled according to the lscpu
command output:
$ lsscpu | grep ^Vulnerability
Vulnerability Itlb multihit: KVM: Mitigation: VMX disabled
Vulnerability L1tf: Mitigation; PTE Inversion; VMX vulnerable, SMT disabled
Vulnerability Mds: Vulnerable; SMT disabled
Vulnerability Meltdown: Vulnerable
Vulnerability Spec store bypass: Vulnerable
Vulnerability Spectre v1: Vulnerable: __user pointer sanitization and usercopy barriers only; no swapgs barriers
Vulnerability Spectre v2: Vulnerable, IBPB: disabled, STIBP: disabled
Vulnerability Srbds: Vulnerable: No microcode
Vulnerability Tsx async abort: Not affected
Tried different kernel arguments as below with no luck:
$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-5.8.0-59-generic root=UUID=148c60a7-00b0-443e-966b-92303d9561ec ro quiet splash kvm.nx_huge_pages=off nx_huge_pages=off mitigations=off vt.handoff=7
Hope you (or others) found the solution! Thanks
You can use libevdev on Linux to create virtual input devices, which a program generates events for. See the examples here' https://www.kernel.org/doc/html/v4.12/input/uinput.html
OP could use this, passing the virtual keyboard and mouse to a Windows VM, but I'm not sure the hassle of getting the video from the VM as input to the driving AI on Linux and keeping the input events in sync would be worth not just doing it all on windows or in Wine.
To some extent it depends on the distro of linux you are using. I would first get familiar with compiling a kernel for your distro and getting it to boot from that kernel first, if you're not comfortable with that yet.
After that, you could follow these steps in the directory of your kernel sources, replacing the patch file name with wherever you downloaded the patch to.
Arne's patch was indeed against a dated version of OVMF. Here's one I generated just now after manually applying the changes at the correct location against current git master OVMF: https://hastebin.com/ayunoboqek.diff
As far as host drivers go; you should not have bbswitch
or nvidia
loaded - no host drivers besides vfio-pci are involved in passthrough - this isn't specific to Optimus setups, but passthrough in general. With nvidia cards specifically, sometimes loading the driver on the host will break passthrough until next reboot as it doesn't always cleanly shut down the card after unbinding.
You may want to have a look at Qubes OS, but there are some limitations there.
Qubes aside: ① means bare-metal performance on the desktop, maybe this matters to you, maybe not. ② means hypervisor has a potentially reduced risk of compromise due to reduced software being run on it, again, maybe this matters for your threat model, maybe not; may also be somewhat more cumbersome to administer the hypervisor OS; makes it easier to change your desktop OS since it’s just a VM.
Yes: I have 32GB Ram, so each node has 16. When forcing it to use hugepages, it was sometimes impossible to allocate the amount I wanted to give to the VM, and the VM would fail to start.
I never found it to be a big performance improvement anyway, so I disabled it.
I remember when reading about it, that I stumbled over transparent hugepages, which is the same thing but automatically done by the kernel, and iirc, qemu supports it. Long story short, with transparent hugepages configured correctly, the kernel should automatically give hugepages to the VM. I will check today, if it indeed works.
Sweet, thank you! You may also check https://www.kernel.org/doc/Documentation/kernel-per-CPU-kthreads.txt for more little tweaks. Disabling watchdog comes to mind as useful. It won't do a major performance increase but it can get rid of a stutter here and there.
P.S. great to hear people find my scripts useful, thanks :)
> I am running linux-lts 4.19.101-1 and linux 5.5.2.arch1-1 now.
One possibility is that your kernel now has mitigation for intel's iTLB multihit vulnerability and your old kernel didn't.
https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/multihit.html
In order to mitigate the vulnerability, KVM initially marks all huge pages as non-executable. If the guest attempts to execute in one of those pages, the page is broken down into 4K pages, which are then marked executable.
The mitigation basically nullify some of the usefulness of hugepages. If you are using 1G hugepages that means kvm must convert a single 1G pages into 262144 individual 4K pages when the guest first executes from that page.
You can try to disable the mitigation by setting kvm.nx_huge_pages=off
on your GRUB_CMDLINE_LINUX_DEFAULT.
For AMD you actually don't need amd_iommu=on.
OP once you're booted into a live Linux environment there's a script on this Arch wiki page to show the IOMMU groups. That whole page is very informative and it applies to other distros too not just Arch.
The extra cpu usage could be because of halt polling?
https://www.kernel.org/doc/Documentation/virtual/kvm/halt-polling.txt
You could try disabling it by running echo 0 > /sys/module/kvm/parameters/halt_poll_ns
(I haven't tested this). Then try restarting the VM and run the test again.
sysfsdev=/sys/bus/pci/devices/0000:00:02.0/733a417a-73b7-442a-9cd4-bcc6b35b8d68
sysfsdev=/sys/bus/mdev/devices/83b8f4f2-509f-382f-3c1e-e6bfe0fa1001
https://www.kernel.org/doc/Documentation/vfio-mediated-device.txt
If I compare this list with Arch Linux, it seems almost all features disable by default on Gentoo are enabled by default on Arch.
https://www.archlinux.org/packages/extra/x86_64/qemu/
I assume this is Ryzen related problem? I don't have Ryzen to try it out, but you could trace the problem by enable one more USE flag at a time on Gentoo till you enable them all.
I tried disabling some network features on the virtual bridge as suggested here, but that made no difference. Perhaps that only applies to passthrough or using physical networks via bridge/macvtap.
Are you sure you're in the right subreddit? This is for KVM virtualization, normally in relation to running windows games in a VM.
Also, isn't kubernetes containers only? VFIO is for PCI passthrough into full fat VMs, not containers.
I'm not a kubernetes expert by any means, but I don't think you want to use VFIO is you're just trying to get local NVMe storage in your pods. Instead, you probably want to mount it on the host filesystem somewhere, then setup a local persistent Volume, then attach that to a container in your pod somehow. Because it's all on the same host kernel, you're not going to be losing much, if any performance by doing this. And it's for sure going to be more performant than a comparable VFIO setup with PCIe passthrough.
See this slide deck, page 61:
> Native AIO can block the VM if the file is not fully preallocated and is therefore not recommended for use on sparse files.
If you need a cheap, effective dac I’ve got this one that I’ve used on desktop and laptop passthrough just fine. I’ve got koss and hifiman headphones working with it just fine as well as speakers.
UPDATE for if anyone else runs into the same issue or is thinking about getting this card for VFIO or just Linux in general… don’t. Flashing the firmware made it where Linux kernel panics in my experience and on Windows bare metal it just fails. So I’m reflashing it with the original software and returning it. To help anyone who might be looking for one I’ve heard really good things in my short amount of research about the FebSmart cards with the Renesas controller. Here’s the one I bought to replace the crap card.
Sorry for the late answer, but yes I did. I bought a dummy plug like this. I couldn't force the resolution/hz in the nvidia control panel (it was greyed out for some reason) but managed to do it with a program called "Custom Resolution Utility (CRU)". Worked just fine.
Thanks a lot for testing. You're right, the latency on the HDA device is way too much for gaming, I realized that myself, during testing yesterday. I think I found a problem with how the PA driver is implemented, which causes it to be unable to function in very low latency scenarios. Not sure yet, though, but training myself at the moment on how to implement QEMU audio drivers :)
And by the way, the input delay fix will be something that'll definitely be merged into upstream.
The PA docs say
> Note that passing a NULL bufferattr is different from passing one with every field initialized to (uint32_t) -1! The former means 'get me the default latency'. The latter means 'get me the highest latency possible'. The latter is a much better idea most of the time than the former! _
What the PA driver did for the input was the former, although I still do not understand why default latency is bad oO
Not an AWS expert here, but you could check AWS' G3 or G4 EC2 instances which are GPU-enabled instances: https://aws.amazon.com/ec2/instance-types/?nc1=h_ls
With cloud providers though, you shouldn't care about VFIO. Your provider will do for you, and it's highly possible the G3/4 instances are already VMs with GPU passed through.
You should be able to install a Windows or a Linux system on it and manage it as you want, but I'm not sure if virtualization is enabled on them (someone here may be able to confirm).
Just to be sure I understand your needs, what did wanted to benefit from VFIO specifically in this case?
And please share with us you're results whatever you end up doing, that's an interesting use case :)
Just add the nvme as a PCI Host Device in virt-manager
I do not try & reserve the device with vfio-pci
in /etc/modprobe.d/vfio.conf
I've had no issues passing through Sabrent Rocket nvme's (pcie3 version).
My vm is stable for days at a time.
With an nvme passed through I noticed no real benefit to using a Caching Manager (primocache). I think internally Windows uses your nvme & surplus RAM as a cache (I give my vm 20gb RAM)
I also use a RAM disk for my download / tmp folders.
>Stfu and go away with your trash tier opinions
Always great to be a part of community that doesn't resort to ad hominem within a sign of disagreement on semantics in the discussion.
SNES didn't come with 2020 last-gen high-end processor and buses capable of gigabytes of throughput. OP's already throwing at least $1k at it, why not reward yourself with video cards worth more than $70 each?
I never argued OP's use of "gaming". Perhaps I should've specifically said "you won't be able to run 2015 games in 1080p on highest settings". Even then you would've came here arguing that GTX 1650 can handle agar.io just fine.
> the cinebench scores are only slightly lower with NPT off
Depending on the algorithm used for this benchmark, it may not be too much affected by memory access that much
If you want to see the difference in performance with a benchmark, try passmark performance test. With 2133 memory, I get about 1500 on bare metal and 1800 if using dual channel. On KVM, I get around 1000 with npt=0 and about the same as bare metal with npt=1.
Be warned that passmark crashes the VM if you use cpu=host. I have to use -cpu=Penyr
to avoid crashing.
I would start with checking if your hardware is compatible with linux in the first place. My ASRock motherboard gave me some trouble with ACPI GPE interrupt flooding, causing my CPU to be in spinlock. The response from ASRock was that they don't support linux. The solution was to add acpi_mask_gpe=0x6F
as a kernel boot flag but it left a sour taste in my mouth.
My point is to research the components that you choose for compatibility and to be ready to test and return your parts as soon as you get them (during the return period).
Check out these linux hardware compatibility databases:
A laptop with fully working VT-d is a rarity, AFAIK. Are you sure you're not talking about VT-x? VT-x is not enough if you plan to pass real hardware to it. Laptops are also not great in "having a second videocard" department, passing the only one to the VM might be a problem.
There are plenty of guides for starting with VFIO
https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF
https://nixos.org/wiki/QEMU_guest_with_VGA_passthrough
As for Windows with QEMU on non-persistent disks specifically, I don't know if there are such guides, I can describe how I do it in details, but it might be rough around the edges.
BTW, I'd highly recommend going with NixOS, not with Arch or other distro.
No, its because Manjaro uses ~70% custom packages and when upstream (Arch) updates it borks Manjaro. Countless times I've seen advisories from Manjaro stating not to update XX package, or to set your clock to XX time...
Personally I use EndeavourOS as it only uses ~5 custom packages which can be removed at any time and it won't bork up your system.
Like /u/kwhali said refer to the arch wiki. or read the man page by running man pacman
it will bring up documentation about the command just use the arrow keys to scroll through and press q
when you are done.
According to the man page, -S
is for sync in the sense of synchronize the package on your system with what is in the repositories. This installs it if it is not already. Also, take note that -S
and -s
are different because Linux is case-sensitive.
I just got running with Synergy and it works really well. It's a bit of a basic application and feels a bit buggy but once you're running it works exactly as you want it to and sits in the background. I'm using it running macOS Mojave in QEMU within an Ubuntu host. https://symless.com/synergy
Several options. Buy a second keyboard and mouse. Annoying for obvious reasons. Do USB pass Through for them which means you will not be able to use them on your host until the VM shuts down. Or this program shares your mouse and key board pretty seamlessly.
You can find the core program source code on github if you don't want to pay. Some features are proprietary and so absent from the git repo but I forget which.
Just rereead the message, you might not be choosing the right driver, it says it can't find compatible hardware to install for. Try using GPUZ to determine what series card you have and downloading for that.