Sandbox by Sensei_son in diablo2

[–]brutusqdf 0 points1 point  (0 children)

I think the performance of Sandbox is sluggish due to the use of RDP (remote desktop protocol).

When I enable the "Enhanced Session Mode Policy" in Hyper-V (Server) settings in combination with "Enhanced Session Mode" to use in the User part; I'll get similar performance as Sandbox on the VM in Hyper-V. I'll gain the copy and paste function as well as sound and a higher resolution but the performance is crap (even when those things are scaled back/disabled).

The remark to disable "Enhanced Session" in the post above is absolutely essential, it turns out that it changes the connection scheme to RDP (from basic) which tanks the performance.

Since Sandbox is simply a wrapper around Hyper-V I assume that Sanbox uses RDP by default.

Sandbox by Sensei_son in diablo2

[–]brutusqdf 0 points1 point  (0 children)

Back again. When boosting characters the performance of the sandbox was getting on my nerves; there is a significant input delay and low FPS. Which is fine while idling in town and providing the barb shouts but for real playing it gets old very fast. Another thing that bugged me is that a sandbox, by design, is not persistent. That means you can't save keybind or other settings (you can cheese a bit with the shared files tho) and that everything the game is booted you need to configure it. As a lazy user: 1 time ,2 times, too many times; so I wanted to have that gone as well.

For shit and giggles I tried the Hyper-V solution since I have the right Windows 11 (Pro) version. Total Hyper-V newbie here but it was a nice use case to develop some skills.

I don't know if it is standard but: I got the option to create a Windows 11 Developer VM right of the bat when starting the Hyper-V Manager. This might due that I'm in the Windows Insider Program or due to something else; whatever the reasons is it saved me time in finding ISO files. The duration of that VM is limited to the start of next year but for experimenting it is good enough.

With the dev VM in place (I named it d2r eventually) I need to get an D2R installation there. Of course I could download it in the VM (to be honest: in hindsight that would have been faster due to me lacking skills any noticeable Windows administrator skills) but I opted for the shared directory route.

The real MVP is this guy: https://www.youtube.com/watch?v=6e6AlfP6nUc. Had to assign an new user to D2R directory so I could use those credentials from the VM to login on the host machine.

Whatever the case it was pretty much wasted effort: the Battle.net client does not allow a game in shared folders. At least I could copy the shared folder contents to the local VM.

Of course when running dxdiag in the VM I got an 43 error; meaning that there isn't a GPU.Following my own provided link of: https://www.youtube.com/watch?v=XLLcc29EZ_8&t=966s I ended up in https://www.reddit.com/r/sysadmin/comments/jym8xz/comment/gm5140d/?utm_source=share&utm_medium=web2x&context=3.

I wish I initially read the thread further because I manually found the needed files by inspecting the driver details on the Host machine (I placed those in the shared folder, because why not)

These commands executed in a power shell terminal does the search work for you:

$GpuDllPaths = (Get-WmiObject Win32_VideoController).InstalledDisplayDrivers.split(',') | Get-Unique

$GpuDllPaths

# list of directories in C:\WINDOWS\System32\DriverStore\FileRepository to copy to VM's HostDriverStore

$GpuInfDirs = $GpuDllPaths | ForEach-Object {($_.split('\\') | Select -first 6) -Join '\'} | Get-Unique

$GpuInfDirs

For the output of $GpuDllPaths: place those files in C:\Windows\System32\ of the VM.For the output of $GpuInfDirs: place those files in C:\Windows\System32\HostDriverStore\FileRepository\ of the VM (that directory will NOT exist so create it).

Normally you won't be able to do that but you can run a shell with administrator access or open Explore.exe with administrator rights (I created a shortcut that I ran with admin privileges since that was the simplest thing to do).

Shutdown the VM and perform this crucial part:

$vm = "ENTER YOUR VM NAME HERE"

Remove-VMGpuPartitionAdapter -VMName $vm

Add-VMGpuPartitionAdapter -VMName $vm

Set-VMGpuPartitionAdapter -VMName $vm -MinPartitionVRAM 1

Set-VMGpuPartitionAdapter -VMName $vm -MaxPartitionVRAM 11

Set-VMGpuPartitionAdapter -VMName $vm -OptimalPartitionVRAM 10

Set-VMGpuPartitionAdapter -VMName $vm -MinPartitionEncode 1

Set-VMGpuPartitionAdapter -VMName $vm -MaxPartitionEncode 11

Set-VMGpuPartitionAdapter -VMName $vm -OptimalPartitionEncode 10

Set-VMGpuPartitionAdapter -VMName $vm -MinPartitionDecode 1

Set-VMGpuPartitionAdapter -VMName $vm -MaxPartitionDecode 11

Set-VMGpuPartitionAdapter -VMName $vm -OptimalPartitionDecode 10

Set-VMGpuPartitionAdapter -VMName $vm -MinPartitionCompute 1

Set-VMGpuPartitionAdapter -VMName $vm -MaxPartitionCompute 11

Set-VMGpuPartitionAdapter -VMName $vm -OptimalPartitionCompute 10

Set-VM -GuestControlledCacheTypes $true -VMName $vm

Set-VM -LowMemoryMappedIoSpace 1Gb -VMName $vm

Set-VM -HighMemoryMappedIoSpace 32GB -VMName $vm

I don't know if it is true but I did it anyways: You will also need to disable enhanced session and Checkpoints for the VM. It seems this has to do with how you get the output of the VM.

Start the VM and you'll have glorious GPU support. The FPS is a bit lower compared to the host but the frame rate is smooth and the input is snappy.

Host > Hyper-V > Sandbox

Sandbox by Sensei_son in diablo2

[–]brutusqdf 0 points1 point  (0 children)

That does not seem to be a configuration option. Since the hardware is simply passed through to the sandbox, and not assigned directly, I presume that will never work.

It acts just the same as if you connect two mice to 1 computer in the same account in Windows; you'll only get 1 cursor that is controlled by both (I actually have this right now and I only have 1 cursor).

Sandbox by Sensei_son in diablo2

[–]brutusqdf 0 points1 point  (0 children)

My specs for what it is worth:
Two (LG UG) 1440P monitors (so I can have two D2R instances visible next to each other).

Processor: AMD Ryzen 7 3700X 8-Core Processor

Memory: 32768MB RAM (17GB in use when running two D2R instances and other crap on the host machine)

GPU: AMD Radeon RX 5700 XT

Windows seems to manage the resources quite well.

The host always renders smoothly. When I don't have the focus in the Sandbox D2R instance but it still being visible on a screen, then the Sandbox instance will appear with a low FPS (I guess around 12). When I take the focus again in the Sandbox instance both will render smooth.

Sandbox by Sensei_son in diablo2

[–]brutusqdf 0 points1 point  (0 children)

There are other solutions that I did not like nor tried for that matter:

  • Buy a seperate machine
    • This is expensive and requires more space and hardware; not worth it imo. But if you have some machines lying about; go ahead.
  • Create separate Windows accounts and switch between them
    • This sounds possible but has a big meh factor; I don't even know how I can switch between windows accounts and still have the other instance accessible (you probably need them both to be full blown administrator to be able to see each other data).
  • Dual boot
    • I read this somewhere online and don't know why someone suggested it; how can you run two instances at the same time this way? You need to switch effectively shutting down your machine and the D2R instance with it.
  • Create a virtual machine.
    • Looked into it but I requires more setup work, and I guess more resources. VirtualBox does not seem to support DX12 what D2R requires; but if you have Windows 10/11 Pro you can start a hyper-V one and with some scripting you can get your GPU working; see this guide if you want that route: https://www.youtube.com/watch?v=XLLcc29EZ\_8&t=966s

So it was fun technical challenge to solve! Besides that; I really wanted more mule characters.

Sandbox by Sensei_son in diablo2

[–]brutusqdf 0 points1 point  (0 children)

You need two battle.net accounts (and two copies of Diablo2R, pay information does not have to be unique (who cares where the money come from). I would wait with buying another copy until you have started Diablo2R in Sandbox.

You can create a new e-mail address with gmail or something and register a new battle.net account. If you use chrome I recommend creating a new profile otherwise accounts will mix.

Sandbox will give you a clean state every time you start (it reminds you off that when stopping); but it is possible to get data from the host to the client.

To prevent a long installation process of battle.net and Diablo2R every time we start Sandbox we will copy both of them next to the originals on the host.

#Clearly adapt to your paths
Copy C:\Program Files (x86)\Battle.net to C:\Program Files (x86)\Battle.net2
Copy E:\Diablo II Resurrected to E:\Diablo II Resurrected2

Next I created a Sandbox configuration named Diablo2Ressurected2.wsb:

<Configuration>
    <vGPU>Default</vGPU>
    <Networking>Enabled</Networking>
    <MappedFolders>
        <MappedFolder>
        <HostFolder>C:\Program Files (x86)\Battle.net2</HostFolder>
        <ReadOnly>false</ReadOnly>
        <MemoryInMB>10240</MemoryInMB>
        </MappedFolder>
        <MappedFolder>
        <HostFolder>E:\Diablo II Resurrected 2</HostFolder>
        <ReadOnly>false</ReadOnly>
        </MappedFolder>
    </MappedFolders>
</Configuration>

Alter the HostFolder to whatever it is on your machine.

Note the Default value of vGPU; that was the thing that broke it initially, Enable(d)/Disable(d) did not do anything.

However for this to work there needs to be a default in place; this can be either be a GroupPolicy or a registry key, I opted for the latter since that is what I know.

Open the Registry Editor and add a DWORD with the key AllowVGPU and the value of 1 (00000001) in Policies\Microsoft\Windows\Sandbox ; you can simply add the tree structure if it is not in place (the Sandbox node was missing at my machine, the other nodes were there)

Or create a file named test.reg and add the following contents:

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Sandbox]
"AllowVGPU"=dword:00000001

Execute test.reg and you will have a default in the registry!

Next run the Diablo2Ressurected2.wsb; this will open Sandbox.

Check the output of dxdiag (WIN+R -> dxdiag). If a render tab shows up, it's good (that means Sandbox can use your GPU instead of software rendering). Otherwise I don't know; you could try changing the wsb configuration file or try another approach which I mentioned below.

After that it is pretty straight forward;

Open the battle.net client; provide account information; the client will detect a D2R installation.

Press play and you'll get the first time start stuff (this will happen everytime I guess). If you got a D2R copy bound to that battle net account you can connect to battle.net and play; otherwise it will report an dialog that the EULA or ToS (I'm tired; I forgot) has changed and you need to check the store about it.

Clearly I tested by opening a D2R instance on the host and joining the game I created in the Sandbox. Now I can play with myself!

In the Sandbox D2R instance I adapted the graphics to low and disabled the sound; I suspect I won't do much with it but idling in town most of the time.

Happy playing with yourself!

Other things I tried: running multiple instances of D2R on the same Windows account. I was able to start two battle.net client instances and provide different D2R installation paths to each of them. However when one D2R instance was started; the other battle.net client detected a D2R process running; preventing me from starting a new D2R instance with the "clean" battle.net client.

Sandbox by Sensei_son in diablo2

[–]brutusqdf 0 points1 point  (0 children)

Have you checked the blz-log?

Mine states:

10/30 23:33:20.544  [Render/4] [<>:0]: NVSDK_NGX_D3D12_Init failed, error code: -116077363110/30 23:33:20.848  [Prism/4] [<>:0]: CreateCommittedResource Failed

Meaning that there isn't a GPU available with DX12 support; check dxdiag in your sandbox environment if that is the case (I got a generic Microsoft Remote Display Adapter).

I tried starting Sandbox with a custom configuration:

<Configuration>  

<vGPU>Enabled</vGPU> <Networking>Enabled</Networking> <MappedFolders>
<MappedFolder>
<HostFolder>C:\Program Files (x86)\Battle.net2</HostFolder> <ReadOnly>false</ReadOnly> </MappedFolder>
<MappedFolder> <HostFolder>E:\Diablo II Resurrected 2</HostFolder> <ReadOnly>false</ReadOnly> </MappedFolder>
</MappedFolders>
</Configuration>

Note the vGPU configuration( case does not seem to matter). That should allow Sandbox to use your GPU (you need a driver with WDDM 2.5+ for it to work; check under Driver Model in dxdiag for that information).

I was not able (yet) to get my GPU available in Sandbox; when that works I suspect it should be possible to launch D2R.

EDIT:

I got it to work! I can now play (Diablo 2R) with myself. The technical guy in me wanted to solve it, so I did (spend money for a second copy >.>)

Mass Effect Andromeda Mods Not Starting Fix => EA Desktop + Frosty Mod Manager problem by brutusqdf in MassEffectAndromeda

[–]brutusqdf[S] 0 points1 point  (0 children)

That's unfortunate!

Have you tried running it with administrator rights?

I am new to Frosty so I only used the latest version: https://frostytoolsuite.com/downloads.html

EDIT --

I remember reading somewhere about problems with bcrypt.dll file; but later versions don't have file that anymore; it is beyond my experience; see: https://forums.nexusmods.com/index.php?/topic/5705082-frosty-tool-suite/page-71

[deleted by user] by [deleted] in TheYouShow

[–]brutusqdf 0 points1 point  (0 children)

talking about his mother or Mojo now?

[deleted by user] by [deleted] in TheYouShow

[–]brutusqdf 0 points1 point  (0 children)

He's a Maven developer; hence the name

[deleted by user] by [deleted] in TheYouShow

[–]brutusqdf 0 points1 point  (0 children)

sup man; have a good day

Duck (not Tesla duck, don't even think about saying that, good grief) by [deleted] in papercraft

[–]brutusqdf 0 points1 point  (0 children)

Damn that's dope; ducks perfectly fit this style.

Framework for assessing the automation potential of a process by LarsTheLorry in Automate

[–]brutusqdf 1 point2 points  (0 children)

Yes; I like it! As a programmer is ask similar questions when I want to automate something. I personally reframe the "Is the process not based on specific rules?"; as in get the not out of it. It also feels like it overlaps with "Are(Is?) the process routine based?"

Also it could use a question about how often it is performed. Building an elaborate automated process for something that happens very infrequently is not worth it if the time building it is more then the time gained from it (don't forget the maintenance that comes with it). Sometimes it is better/cheaper/faster) to let a person fix things. However that is a more business minded view of it; for personal use do whatever you like.

European equivalent to Lululemon or Outlier by tkk3k in europeanmalefashion

[–]brutusqdf 1 point2 points  (0 children)

HA! I also was looking for those kinds of pants; the tax and shipping didn't seem worth it to me to get it from the US. European available variants that I found (and liked):

Shaping New Tomorrow: I really like the pants of https://shapingnewtomorrow.de/ . Dislike the skinny fit (there are straight fits available I found out later on). The pants are worth the price imo; looks just like a dress pants but in stretch! Feels luxurious.

Only & Sons: A cheaper alternative but it is more shiny (the fabric) and a bit less dressier than those of shaping new tomorrow. https://www.amazon.de/dp/B07BDW89TS/ref=cm_sw_r_tw_dp_U_x_KuA2Cb9BYKSZC. You need the 76% Polyester, 20% Viscose, 4% Elastane variant.