Easy-GPU-PV icon indicating copy to clipboard operation
Easy-GPU-PV copied to clipboard

Diablo IV no gpu(Solved)

Open tomoyo233 opened this issue 2 years ago • 20 comments
trafficstars

I'm currently attempting to run Diablo 4 in a virtual machine (VM). I have been using an AMD graphics card, and it runs smoothly without any issues. However, a few days ago, while helping a friend set up Hyper-V, he encountered a problem with Diablo 4 not detecting the GPU on his NVIDIA graphics card. During my search for a solution, I came across a successful case where someone managed to run Diablo 4 using an NVIDIA graphics card by making modifications to the registry. Unfortunately, they didn't share the specific steps they took (Link: https://www.reddit.com/r/VFIO/comments/13yftdc/diablo_iv_in_vm/). I was wondering if any of you would be able to provide some assistance or guidance on this matter. Your help would be greatly appreciated.

tomoyo233 avatar Jul 02 '23 12:07 tomoyo233

  • also have the same problem

rusualex2604 avatar Jul 03 '23 22:07 rusualex2604

You need to copy over a bunch of registry keys for the GPU device under HKEY_LOCAL_MACHINE\System\device or something to that effect.

mitchellurgero avatar Jul 09 '23 01:07 mitchellurgero

also have the same problem +1

solarisy avatar Jul 21 '23 01:07 solarisy

You need to copy over a bunch of registry keys for the GPU device under HKEY_LOCAL_MACHINE\System\device or something to that effect.

You or anyone else find out what keys specifically? Looking to get something like this set up.

DatGuyMcCaully avatar Jul 29 '23 17:07 DatGuyMcCaully

I’ve spent multiple days trying things with registry. Nothing has worked so far

  • adding to hardware
  • Changing hardware id
  • Adding to enum pci
  • Connecting virtual device to class, with full nvidia driver details

Also tried modding driver files by changing the device id and pci path to the one inside guest to allow nvidia driver to install. Install succeeded but still fail

corbinjurgens avatar Aug 05 '23 15:08 corbinjurgens

I will ask my buddy to walk me through what he did to get it working and will try to remember to post back here lol

mitchellurgero avatar Aug 06 '23 04:08 mitchellurgero

I will ask my buddy to walk me through what he did to get it working and will try to remember to post back here lol

any update?

DatGuyMcCaully avatar Aug 07 '23 19:08 DatGuyMcCaully

For those that have no luck running D4.

Notes:

  • I only tested on a 3060TI
  • This only works for nvidia cards, ~~but may only work for 3060's, IDK~~
  • In GAMEDIR\FenrisDebug.txt you should see an error about NVAPI and only 1 display detected (Microsoft Basic Render)

Results may vary, this ended up working for me, but my setup is going to be different from yours.

The steps:

On the HOST PC:

  1. Open RegEdit
  2. Navigate to Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
  3. Export the nvlddmkm key to a file, you can call it whatever but I'll call it nvlddmkm.reg
  4. copy the resulting registery file nvlddmkm.reg to the VM's disk somehow (either mount the disk while it's offline, or use file sharing)

On the VM:

  1. Install the nvlddmkm.reg
  2. Launch the game, no reboot needed.

If you still get an error, the Nvidia drivers may not be installed properly on Host or VM, reinstall in both (Reinstall on Host, Update-VMGpuPartitionDriver.ps1 script in repo on VM)

mitchellurgero avatar Aug 09 '23 02:08 mitchellurgero

@mitchellurgero

Thank you!

I have confirmed this works with an RTX 4050 (laptop)

corbinjurgens avatar Aug 09 '23 04:08 corbinjurgens

Yep its working on windows 11 with a 3080TI

DatGuyMcCaully avatar Aug 09 '23 16:08 DatGuyMcCaully

I can get the game to detect my GPU only when the Hyper V video display adapter is disabled. When I disable the Hyper V video display adapter everything in the VM appears very laggy, even in game. The in game fps counter shows around 130fps but everything in the VM looks to be around 15fps. Does anyone have any idea how to fix this? I can launch rocket league just fine with the Hyper V adapter enabled and nothing lags.

I am using a 1080ti and windows 11 as a host and windows 10 21H1 as a guest. The adapter shows in device manager without error 43.

SikSemper avatar Aug 20 '23 01:08 SikSemper

I can get the game to detect my GPU only when the Hyper V video display adapter is disabled. When I disable the Hyper V video display adapter everything in the VM appears very laggy, even in game. The in game fps counter shows around 130fps but everything in the VM looks to be around 15fps. Does anyone have any idea how to fix this? I can launch rocket league just fine with the Hyper V adapter enabled and nothing lags.

I am using a 1080ti and windows 11 as a host and windows 10 21H1 as a guest. The adapter shows in device manager without error 43.

You need to use parsec to get the 60FPS. Hyper-V console is locked to 30 I believe.

mitchellurgero avatar Aug 20 '23 09:08 mitchellurgero

@tomoyo233 how did you get it Diablo 4 to accept the GPU for diablo 4?

perfectsine avatar Aug 29 '23 05:08 perfectsine

I can get the game to detect my GPU only when the Hyper V video display adapter is disabled. When I disable the Hyper V video display adapter everything in the VM appears very laggy, even in game. The in game fps counter shows around 130fps but everything in the VM looks to be around 15fps. Does anyone have any idea how to fix this? I can launch rocket league just fine with the Hyper V adapter enabled and nothing lags.

I am using a 1080ti and windows 11 as a host and windows 10 21H1 as a guest. The adapter shows in device manager without error 43.

Parsec didn't work for me out of the box, even after tons of tweaking it still had poor performance. I would suggest using the GPU-PV VM with Moonlight and Sunshine. It just works. Unfortunately the caveat that has been given to us with GPU-PV is that there is something baked in that keeps re-installing Parsec and its Scheduled Tasks, but you can still run it in tandem with Sunshine.

Follow this guide: https://www.youtube.com/watch?v=SewuUleDVug

Instead of Steam Deck, just install Moonlight on whichever client machine you need.

jordanfalduto avatar Sep 10 '23 20:09 jordanfalduto

Parsec was only used in this project cause the maintainer is on the parsec dev team - it's a great tool. But like you said - Moonlight + steam/sunshine works just as well, and even better in some situations. You can run both in tandem and do not need to do anything special to do so.

mitchellurgero avatar Sep 10 '23 20:09 mitchellurgero

I got sunshine/moonlight installed and saw a couple things of note. For me in parsec, diablo 4 will launch and run but never shows on the screen.

Moonlight will launch and run the game but it's capped at 30fps, ironically, if I just quit moonlight and connect parsec with diablo 4 running still, then parsec looks and works great.

@jordanfalduto How did you get sunshine to work well? Did you have the hyper-v adaptor enabled?

perfectsine avatar Sep 11 '23 21:09 perfectsine

@perfectsine Sorry for the delay on this, we have a routine to launch Moonlight but I had forgotten it as it's my wife who uses it not me I built out Easy GPU P specifically to have a virtualized instance of Diablo 4 in GPU P running alongside my Diablo 4 version running on my host so I know Moonlight works very well with it

Launch Moonlight to connect to the VM running Sunshine Open Device Manager to disable the Hyper-V video driver Alt+F4 to close out of your Moonlight Open the Moonlight connection again and it will have the Hyper V video driver disabled and your GPU driver enabled. D4 and any other modern game like Baldur's Gate will see the GPU video driver primarily

jordanfalduto avatar Sep 24 '23 00:09 jordanfalduto

Thank you for the explanation. I would like to use my Intel iGPU instead for Davinci Resolve. Is there a similiar Registry key for Intel iGPU?

Edit: I tried it with igfxn and igfxCUIS key but didn´t work. Not sure if there are any other corresponding keys

FabiS797 avatar Nov 21 '23 15:11 FabiS797

this solved my 0-5 fps problems on some games but do you guys experience occasional stuttrering/ frame drops while playing

Zaer-x avatar Dec 02 '23 08:12 Zaer-x

the nvlddmkm.reg fix from @mitchellurgero seems to have worked for running many games, but still not successful for some games.

i found that when doing the fix, doing this additional step would increase the chances of success:

  1. after exporting nvlddmkm.reg, but before sending it over to the VM...
  2. open nvlddmkm.reg in a text editor (e.g. notepad)
  3. and then replace all occurrences of "DriverStore" with "HostDriverStore"
    • (make sure you don't do it twice, i.e. there should be no occurrences of "HostHostDriverStore" after you're done)

ericytsang avatar Apr 02 '24 06:04 ericytsang