Qubes HVM GPU passthrough has 3.5Gb ram limit in r4.1

I can’t start a my Windows 10 qube that has my GPU attach with more than about 3.5Gb of ram. It works perfectly fine when i give it less than 3.5Gb of ram. After doing some research (See below) I have realized that it seems common. It seems to have to do with some limit which can be solved by patching stubdom. I have tried all the ways of patching it that I could find (See below), none have worked for me. When trying to follow the original GitHub thread the file where not in the same place. So I instead used the file located at /usr/libexec/xen/boot/qemu-stubdom-linux-rootfs. When I applied the patch my sys-net and sys-usb qubes stopped working (As expected) but the Windows qube still wouldn’t start no matter of the amount of ram given to it. The second i restored the changed it started working again with under around 3.5Gb of ram.

Any help would be appreciated, thanks in advance!

Some system specifications:
GPU: Nvidia RTX 2070 (The one to be passthroughed)
GPU: Nvidia GTX 1050 (The one used in dom0)
CPU: Intel i9-9900K
RAM: 16Gb

Patching stubdom in r4.0:

Similar comment to my post (Although no answer):


I’m having the same issue. Using Ubuntu instead of Windows.