Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Apps getting GDI Generic as the GPU device instead of the actual GPU #200

Open
dk-fury opened this issue Dec 1, 2024 · 9 comments
Assignees
Labels
bug Something isn't working Cannot Replicate If a bug cannot be replicated

Comments

@dk-fury
Copy link

dk-fury commented Dec 1, 2024

Which OS?

Win11 Pro

Which release?

23H2

Describe the bug

Issue
Apps are getting the GPU device as GDI Generic. Specifically, I have found both the RuneScape and RuneLite game clients receive errors as a result of getting GDI Generic as the GPU device instead of my RTX 4090. See reproduction steps below for details.

I have the same results with both the stable version and the Beta version of VDD (I have included the log file from the beta version). In the Beta version, I have set the friendly name for my GPU.

My setup (hopefully it's not unorthodox, I assume the VDD is mainly used for remoting into servers and VMs?)

  • Hyper-V VM running Windows 11 Pro
  • NVIDIA RTX 4090 with GPU partitioning (NVIDIA driver version 566.14)
  • Sunshine (v0.23.1) running in VM
  • Moonlight (v6.1.0) connection to the VDD display

Additional information

  • The problem is isolated to only occurring when the VDD is the only display.
  • When I have a different display driver running (e.g. a Hyper-V Video display), alongside the enabled VDD display connected through Moonlight, both game clients get my GPU when launched and have no issues.
  • When I disable the VDD, having Hyper-V Video as the only display, both game clients get my GPU when launched and have no issues.
  • Everything runs correctly with GPU partitioning and the Hyper-V Video display, where the issue appears to be isolated to the VDD.
  • I tried setting the apps to high performance with my GPU in Windows 11 settings for the display (Display > Graphics) but it made no difference.
  • When the VDD is the only display:
    • Running nvidia-smi still shows my GPU
    • Sunshine's dxgi-info tool still displays the VDD display under my GPU adapter's output:
    • sunshine-dxgi-info_nvidia-smi

Steps to reproduce

Initial setup to reproduce

  • If this is not reproducible with a non-virtual system, emulate my setup above with Hyper-V (only takes a couple of minutes to create the VM with partitioning, let me know if you need help sorting it).
  • Ensure the VDD is the only display (if you launched Sunshine from a Hyper-V connection, close the connection).

RuneScape client (https://www.runescape.com/launcher)

  • Launch the RuneScape client
  • The following error will be displayed:
  • runescape-error

RuneLite client (https://runelite.net/)

  • NOTE: To avoid confusion, RuneLite runs its features as plugins - the GPU plugin is the official GPU renderer
  • Launch the RuneLite client
  • Expand the configuration pane on the right side (wrench icon at the top)
  • Search for and install the 117 HD plugin from the Plugin Hub (click the plug icon at the top of the configuration panel)
  • Go back to the list of installed plugins (click the big wrench icon at the top of the configuration panel)
  • In the search box, type GPU so that it filters out everything except the GPU and 117 HD plugin
  • Try to enable the GPU plugin by clicking its toggle button, it will flick on then off straight away
  • Try to enable the 117 HD plugin, it will do the same but also display the following error window:
  • runelite-error_117hd
  • Click on the Open logs folder button (or go to C:\Users\YOUR_USER_NAME\.runelite\logs) and open the client.txt log file.
  • You should see similar output and errors to the logs below.
  • NOTE: You may also see black flickering in the configuration panel as you move the mouse around, a side effect of using the incorrect device.

RuneLite GPU plugin log output

2024-12-01 22:00:44 NZDT [Client] INFO  n.r.client.plugins.gpu.GpuPlugin - Using device: GDI Generic
2024-12-01 22:00:44 NZDT [Client] INFO  n.r.client.plugins.gpu.GpuPlugin - Using driver: 1.1.0
2024-12-01 22:00:44 NZDT [Client] ERROR n.r.client.plugins.gpu.GpuPlugin - Error starting GPU plugin
java.lang.RuntimeException: OpenGL 3.1 is required but not available
	at net.runelite.client.plugins.gpu.GpuPlugin.lambda$startUp$1(GpuPlugin.java:331)
	at net.runelite.client.callback.ClientThread.invokeList(ClientThread.java:119)
	at net.runelite.client.callback.ClientThread.invoke(ClientThread.java:101)
	at net.runelite.client.callback.Hooks.tick(Hooks.java:226)
	at client.ke(client.java:19485)
	at client.bu(client.java)
	at bo.am(bo.java:391)
	at bo.iz(bo.java)
	at bo.run(bo.java:9213)
	at java.base/java.lang.Thread.run(Unknown Source)

RuneLite 117 HD plugin log output

2024-12-01 22:34:03 NZDT [Client] INFO  rs117.hd.HdPlugin - Using device: GDI Generic
2024-12-01 22:34:03 NZDT [Client] INFO  rs117.hd.HdPlugin - Using driver: 1.1.0
2024-12-01 22:34:03 NZDT [Client] INFO  rs117.hd.HdPlugin - Client is 64-bit
2024-12-01 22:34:03 NZDT [Client] INFO  rs117.hd.HdPlugin - Low memory mode: false
2024-12-01 22:34:03 NZDT [Client] ERROR rs117.hd.HdPlugin - The GPU is lacking OpenGL 4.3 support. Stopping the plugin...
2024-12-01 22:34:04 NZDT [Client] ERROR n.r.client.callback.ClientThread - Exception in invoke
java.lang.NullPointerException: null
	at org.lwjgl.system.Checks.check(Checks.java:188)
	at org.lwjgl.opengl.GL15C.glDeleteQueries(GL15C.java:1290)
	at rs117.hd.overlays.FrameTimer.lambda$destroy$2(FrameTimer.java:52)
	at net.runelite.client.callback.ClientThread.lambda$invokeLater$1(ClientThread.java:80)
	at net.runelite.client.callback.ClientThread.invokeList(ClientThread.java:119)
	at net.runelite.client.callback.ClientThread.invoke(ClientThread.java:101)
	at net.runelite.client.callback.Hooks.tick(Hooks.java:226)
	at client.ke(client.java:19485)
	at client.bu(client.java)
	at bo.am(bo.java:391)
	at bo.iz(bo.java)
	at bo.run(bo.java:9213)
	at java.base/java.lang.Thread.run(Unknown Source)
2024-12-01 22:34:04 NZDT [Client] ERROR n.r.client.callback.ClientThread - Exception in invoke
java.lang.NullPointerException: null
	at org.lwjgl.system.Checks.check(Checks.java:188)
	at org.lwjgl.opengl.GL15C.glDeleteQueries(GL15C.java:1290)
	at rs117.hd.overlays.FrameTimer.lambda$destroy$2(FrameTimer.java:52)
	at net.runelite.client.callback.ClientThread.lambda$invokeLater$1(ClientThread.java:80)
	at net.runelite.client.callback.ClientThread.invokeList(ClientThread.java:119)
	at net.runelite.client.callback.ClientThread.invoke(ClientThread.java:101)
	at net.runelite.client.callback.Hooks.tick(Hooks.java:226)
	at client.ke(client.java:19485)
	at client.bu(client.java)
	at bo.am(bo.java:391)
	at bo.iz(bo.java)
	at bo.run(bo.java:9213)
	at java.base/java.lang.Thread.run(Unknown Source)

Expected behavior

  • The RuneScape game client should run fine without the error.
  • The RuneLite game client should be able to enable the GPU and 117 HD plugins without any issues. The following is the log output for the two plugins produced when running the client with the Hyper-V Video display:
2024-12-01 22:19:11 NZDT [Client] INFO  rs117.hd.HdPlugin - Using device: NVIDIA GeForce RTX 4090/PCIe/SSE2
2024-12-01 22:19:11 NZDT [Client] INFO  rs117.hd.HdPlugin - Using driver: 4.6.0 NVIDIA 566.14
2024-12-01 22:19:11 NZDT [Client] INFO  rs117.hd.HdPlugin - Client is 64-bit
2024-12-01 22:19:11 NZDT [Client] INFO  rs117.hd.HdPlugin - Low memory mode: false
2024-12-01 22:19:19 NZDT [Client] INFO  n.r.client.plugins.gpu.GpuPlugin - Using device: NVIDIA GeForce RTX 4090/PCIe/SSE2
2024-12-01 22:19:19 NZDT [Client] INFO  n.r.client.plugins.gpu.GpuPlugin - Using driver: 4.6.0 NVIDIA 566.14

Log File (Beta Only)

[2024-12-01 23:02:18] [INFO] HDRPlus is disabled.
[2024-12-01 23:02:18] [INFO] SDR10bit is disabled.
[2024-12-01 23:02:18] [INFO] CustomEdid is disabled.
[2024-12-01 23:02:18] [INFO] HardwareCursor is enabled.
[2024-12-01 23:02:18] [INFO] PreventSpoof is disabled.
[2024-12-01 23:02:18] [INFO] EdidCeaOverride is disabled.
[2024-12-01 23:02:18] [INFO] Driver Starting
[2024-12-01 23:02:18] [INFO] VDD Path: C:\VirtualDisplayDriver
[2024-12-01 23:02:18] [INFO] IDDCX Version: 0x1a00
[2024-12-01 23:02:18] [PIPE] Starting Pipe
[2024-12-01 23:02:18] [PIPE] Pipe created
[2024-12-01 23:02:18] [INFO] Using vdd_settings.xml
[2024-12-01 23:02:18] [INFO] Loading GPU from vdd_settings.xml
[2024-12-01 23:02:18] [INFO] ASSIGNED GPU: NVIDIA GeForce RTX 4090
[2024-12-01 23:02:18] [INFO] Using hardcoded edid
[2024-12-01 23:02:18] [INFO] Applied Adapter configs.
[2024-12-01 23:02:18] [INFO] Creating Monitor: 1
[2024-12-01 23:02:18] [WARNING] Input buffer is too small for target modes.
[2024-12-01 23:02:18] [INFO] Finished Setting up adapter.
[2024-12-01 23:02:18] [INFO] Adapter found: 000000069DF7C230 (Vendor ID: 4318, Device ID: 9860)
[2024-12-01 23:02:18] [INFO] Direct3D device created successfully. Feature Level: 45312
[2024-12-01 23:02:18] [INFO] Adapter found: 000000069DF7C230 (Vendor ID: 4318, Device ID: 9860)
[2024-12-01 23:02:19] [INFO] Direct3D device created successfully. Feature Level: 45312
[2024-12-01 23:02:19] [ERROR] Failed to set device to swap chain. HRESULT: -2005270490
[2024-12-01 23:02:19] [INFO] Adapter found: 000000069DF7C230 (Vendor ID: 4318, Device ID: 9860)
[2024-12-01 23:02:19] [INFO] Direct3D device created successfully. Feature Level: 45312
[2024-12-01 23:02:19] [INFO] Adapter found: 000000069DF7C230 (Vendor ID: 4318, Device ID: 9860)
[2024-12-01 23:02:19] [INFO] Direct3D device created successfully. Feature Level: 45312

Contact Details

No response

@dk-fury dk-fury added the bug Something isn't working label Dec 1, 2024
@bud3699
Copy link
Member

bud3699 commented Dec 1, 2024

Reading it, by the looks of it, its either one of the following.

  1. The device is set to not provide full power to pcie if not in use (in this case, monitors attached to gpus)
  2. Since direct3d levels were made, then most likely how the game handles gpu attachments (aka, sees only available monitor and uses the display adapter for that monitor to prevent gpu copying, which will of course lead to similar errors

@dk-fury
Copy link
Author

dk-fury commented Dec 1, 2024

  1. The device is set to not provide full power to pcie if not in use (in this case, monitors attached to gpus)

The only displays the VM uses are virtual, and it works fine with the Hyper-V display, only the VDD display is having issues.

  1. Since direct3d levels were made, then most likely how the game handles gpu attachments (aka, sees only available monitor and uses the display adapter for that monitor to prevent gpu copying, which will of course lead to similar errors

I am assuming something along the lines of this is happening, as it seems to be taking a default GDI display adapter from the VDD driver? Considering the Hyper-V virtual display does not have this issue, I assume that means there is something that can be done for the VDD to provide the correct display adapter instead?

@bud3699
Copy link
Member

bud3699 commented Dec 1, 2024

I've not been successful in re-creating the issue, in my testing, everything seems to be working fine. Followed your exact steps you said to re-create it

@bud3699 bud3699 added the Cannot Replicate If a bug cannot be replicated label Dec 1, 2024
@dk-fury
Copy link
Author

dk-fury commented Dec 2, 2024

Do you have a different GPU/driver version? I have been able to reproduce this with a new VM running Windows 11 23H2.

Let me know if you need any debug logs from me, or need me to try anything, to track down the issue re-occurring on my end.

@dk-fury
Copy link
Author

dk-fury commented Dec 2, 2024

With the VDD Beta, I notice the logs consistently have issues with the swapchain when creating the display. Did this error occur when you attempted to reproduce?

[2024-12-02 13:08:46] [INFO] HDRPlus is disabled.
[2024-12-02 13:08:46] [INFO] SDR10bit is disabled.
[2024-12-02 13:08:46] [INFO] CustomEdid is disabled.
[2024-12-02 13:08:46] [INFO] HardwareCursor is enabled.
[2024-12-02 13:08:46] [INFO] PreventSpoof is disabled.
[2024-12-02 13:08:46] [INFO] EdidCeaOverride is disabled.
[2024-12-02 13:08:46] [INFO] Driver Starting
[2024-12-02 13:08:46] [INFO] VDD Path: C:\VirtualDisplayDriver
[2024-12-02 13:08:46] [INFO] IDDCX Version: 0x1a00
[2024-12-02 13:08:46] [PIPE] Starting Pipe
[2024-12-02 13:08:46] [PIPE] Pipe created
[2024-12-02 13:08:46] [INFO] Using vdd_settings.xml
[2024-12-02 13:08:46] [INFO] Loading GPU from vdd_settings.xml
[2024-12-02 13:08:46] [INFO] ASSIGNED GPU: NVIDIA GeForce RTX 4090
[2024-12-02 13:08:46] [INFO] Using hardcoded edid
[2024-12-02 13:08:46] [INFO] Applied Adapter configs.
[2024-12-02 13:08:46] [INFO] Creating Monitor: 1
[2024-12-02 13:08:46] [WARNING] Input buffer is too small for target modes.
[2024-12-02 13:08:46] [INFO] Finished Setting up adapter.
[2024-12-02 13:08:50] [INFO] Adapter found: 0000006E55B7C2B0 (Vendor ID: 4318, Device ID: 9860)
[2024-12-02 13:08:50] [INFO] Direct3D device created successfully. Feature Level: 45312
[2024-12-02 13:08:50] [INFO] Adapter found: 0000006E55B7C2B0 (Vendor ID: 4318, Device ID: 9860)
[2024-12-02 13:08:50] [INFO] Direct3D device created successfully. Feature Level: 45312
[2024-12-02 13:08:50] [INFO] Unasigning Swapchain. Processing will be stopped.
[2024-12-02 13:08:50] [ERROR] Failed to set device to swap chain. HRESULT: -2005270490
[2024-12-02 13:08:50] [INFO] Adapter found: 0000006E55B7C2B0 (Vendor ID: 4318, Device ID: 9860)
[2024-12-02 13:08:50] [INFO] Direct3D device created successfully. Feature Level: 45312
[2024-12-02 13:08:50] [INFO] Adapter found: 0000006E55B7C2B0 (Vendor ID: 4318, Device ID: 9860)
[2024-12-02 13:08:50] [INFO] Direct3D device created successfully. Feature Level: 45312
[2024-12-02 13:08:54] [ERROR] Failed to acquire buffer. Exiting loop. The swap-chain was likely abandoned (e.g. DXGI_ERROR_ACCESS_LOST) - HRESULT: -2005270490
[2024-12-02 13:08:55] [INFO] Adapter found: 0000006E55B7C2B0 (Vendor ID: 4318, Device ID: 9860)
[2024-12-02 13:08:55] [INFO] Direct3D device created successfully. Feature Level: 45312
[2024-12-02 13:08:55] [INFO] Adapter found: 0000006E55B7C2B0 (Vendor ID: 4318, Device ID: 9860)
[2024-12-02 13:08:55] [INFO] Direct3D device created successfully. Feature Level: 45312
[2024-12-02 13:08:55] [INFO] Unasigning Swapchain. Processing will be stopped.
[2024-12-02 13:08:55] [INFO] Adapter found: 0000006E55B7C2B0 (Vendor ID: 4318, Device ID: 9860)
[2024-12-02 13:08:55] [INFO] Direct3D device created successfully. Feature Level: 45312
[2024-12-02 13:08:55] [INFO] Adapter found: 0000006E55B7C2B0 (Vendor ID: 4318, Device ID: 9860)
[2024-12-02 13:08:55] [INFO] Direct3D device created successfully. Feature Level: 45312

@bud3699
Copy link
Member

bud3699 commented Dec 2, 2024

Latest gpu driver, with same windows version 23h2, If you provide exact version or iso, I'll be happy to try it. And for the logs the swap chain usually fails like that when the cpu is under pressure, but that doesn't shouldn't effect it, it could be entirely possible that it's a 40 series's card issues, there's been compatibility issues with that card for everything, not just vdd, I've tested on 3 different gpus, all clean installs on hyper v with 23h2 and 24h2, I've not been able to reproduce the issue at all. But if it's the 40 series's card, I don't have one so I can't test if that's the issue

@dk-fury
Copy link
Author

dk-fury commented Dec 2, 2024

Appreciate your time and testing. When I get the time to (within a few days), I will try it out on my 3060 Ti PC and see if I can reproduce it. I will also make a more granular and comprehensive list of steps for exact reproduction, with ISO and my scripts used for GPU partitioning.

For the CPU, I have 16 virtual processors assigned from a 7950X3D, operating under minimal load when the display is created, so I cannot imagine it being under any pressure.

If it does end up being a 40 series card issue, let me know if there is anything I could be doing to debug and help track down the cause. Considering it works fine with another virtual display, I am hoping it is just something the driver is missing, or conflicting with, in relation to how it handles the device setup.

As an aside, this VDD is key to multiple VMs I use in my workflow and setup, so I'm keen to help in any way that gets it running flawlessly. No pressure if it is something you cannot spare your time on, I respect the fact this is all free, just letting you know that I am happy to help.
Also, I know nothing about coding drivers but I have been programming games and web apps for over 10 years. So, if there is anything more technical you want me to look at or do, I can definitely try.

@bud3699
Copy link
Member

bud3699 commented Dec 2, 2024

Appreciate your time and testing. When I get the time to (within a few days), I will try it out on my 3060 Ti PC and see if I can reproduce it. I will also make a more granular and comprehensive list of steps for exact reproduction, with ISO and my scripts used for GPU partitioning.

Oki doki, let me know how it goes with testing on the 3060

For the CPU, I have 16 virtual processors assigned from a 7950X3D, operating under minimal load when the display is created, so I cannot imagine it being under any pressure.

Yeh, like I said before, I doubt its the CPU. I assumed you wouldn't pair a 4090 with a bad CPU aha.

If it does end up being a 40 series card issue, let me know if there is anything I could be doing to debug and help track down the cause. Considering it works fine with another virtual display, I am hoping it is just something the driver is missing, or conflicting with, in relation to how it handles the device setup.

Which virtual display does it work with if you don't mind me asking?

As an aside, this VDD is key to multiple VMs I use in my workflow and setup, so I'm keen to help in any way that gets it running flawlessly. No pressure if it is something you cannot spare your time on, I respect the fact this is all free, just letting you know that I am happy to help. Also, I know nothing about coding drivers but I have been programming games and web apps for over 10 years. So, if there is anything more technical you want me to look at or do, I can definitely try.

No problem, if we figure out what's causing it, we can work on a fix. And off the top of my head, I don't think there is anything more technical for you to look at/do as of writing this (But might come to me later)

@dk-fury
Copy link
Author

dk-fury commented Dec 2, 2024

Which virtual display does it work with if you don't mind me asking?

Just the default Hyper-V one. It results in apps getting my GPU correctly when it is running, instead of resulting in a fallback to a placeholder GDI Generic device.

No problem, if we figure out what's causing it, we can work on a fix. And off the top of my head, I don't think there is anything more technical for you to look at/do as of writing this (But might come to me later)

That's great to hear. And sounds good, just thought I'd put that out there in case something comes up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Cannot Replicate If a bug cannot be replicated
Projects
None yet
Development

No branches or pull requests

3 participants