Closed ghost closed 4 months ago
I tried to reproduce with Win10 22h2 64bit in VirtualBox but also could not reproduce. I could not install your driver, too.
@d2phap i says above
My same pc > VMware > not have issues (also VMware tools)
Problem Only happened in my actual (real) pc & when driver are installed.. without driver not issue... I mean some conflict/problem of driver..
This is only display driver available for my pc (didn't find older version)
. . . One more thing, In ImageGlass 9 beta 1
When try to opened image, image open in this version but automatically hide..
See this screen-recording (v9 beta1)
https://github.com/d2phap/ImageGlass/assets/120308983/81a5659f-fab4-4c78-be60-31a0282c9906
It seems that the only way to reproduce the issue is having a laptop as same as yours. I am unable to do it with my devices so I cannot fix this.
ImageGlass 9 beta 1 is the first beta so it's very unstable. Moreover, the rendering engine was replaced in v9.0 beta 2.
@d2phap
Only Beta1 able to open, but automatically hide
& From v beta2, screen blank with text "Loading..."
Also, I send driver file not for installing, I know it's not possible to install other PC's drivers.. I send for investigation purpose...
. . . . . One more:
Version: ImageGlass v9.0.6.1008
Release code: moon
OS: Microsoft Windows NT 10.0.19045.0 64-bit
----------------------------------------------------
Error:
A valid display state could not be determined.
----------------------------------------------------
System.ComponentModel.Win32Exception (0x88990006): A valid display state could not be determined.
at DirectN.ID2D1RenderTargetExtensions.Resize(ID2D1HwndRenderTarget renderTarget, D2D_SIZE_U size)
at D2Phap.DXControl.OnResize(EventArgs e) in D:\_GITHUB\@d2phap\DXControl\Source\DXControl\DXControl.cs:line 325
at ImageGlass.Viewer.DXCanvas.OnResize(EventArgs e) in D:\_GITHUB\@d2phap\ImageGlass\v9\Components\ImageGlass.Views\DXCanvas.cs:line 1424
at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
at System.Windows.Forms.Control.UpdateBounds()
at System.Windows.Forms.Control.WndProc(Message& m)
at D2Phap.DXControl.WndProc(Message& m) in D:\_GITHUB\@d2phap\DXControl\Source\DXControl\DXControl.cs:line 313
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam)
It seems that the only way to reproduce the issue is having a laptop as same as yours. I am unable to do it with my devices so I cannot fix this.
Hey @d2phap
If you need to check/test/finding issues/investigate
I will give you access to my PC via AnyDesk (if you want)
From: 7:15pm to 8:45pm (Indian Time) 1:45pm to 3:15pm (GMT) & Sometime when my PC is ON
When you have just the basic display driver, windows relies WARP to run UI applications. Once you set up the gpu instead, that's what you use. And Ironlake just had direct3d 10_0 support.
Now (putting aside that you are 93 minor build numbers below the latest one) I would suppose that may not play nice with whatever newer library that is used here.
Imageglass uses D2D1_FEATURE_LEVEL_DEFAULT
which should still be fine there, but I wonder if directwrite or something else in DirectN couldn't be the culprit (even though I reckon this is supposed to still be fine with d3d9 too).
We might bang our head on our walls here then, but if you have a legit regression range between beta 1 and RC (v8 vs v9 would surely be too much) then it seems relatively easy for you to blindly bisect.
EDIT: presumably other people could try to reproduce the issue with arbitrary feature levels in WARP
@mirh manage to installed successfully, but imageglassRCv9 still didnt work for HR Images
Ok so, here's what I get when I set the feature level below 11_0 in dxcpl (btw this is the last version of the net8 runtime I have installed)
Version: ImageGlass v9.0.6.1008
Release code: moon
OS: Microsoft Windows NT 10.0.19045.0 64-bit
----------------------------------------------------
Error:
The specified device interface or feature level is not supported on this system.
----------------------------------------------------
System.ComponentModel.Win32Exception (0x887A0004): The specified device interface or feature level is not supported on this system.
at DirectN.HRESULT.ThrowOnError(Boolean throwOnError)
at DirectN.ID2D1RenderTargetExtensions.EndDraw(ID2D1RenderTarget renderTarget)
at D2Phap.DXControl.WndProc(Message& m) in D:\_GITHUB\@d2phap\DXControl\Source\DXControl\DXControl.cs:line 293
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(HWND hWnd, MessageId msg, WPARAM wparam, LPARAM lparam)
It's not exactly the same to be fair, though at the same time it's not even monumentally different.
What does your dxdiag display info says?
@mirh @d2phap
DXDIAG - Intel HD Graphics Driver: Enable (Imageglass HR Image Not Working) . . . DXDIAG - Intel HD Graphics Driver: Disable (Imageglass HR Image Working) . . .
Footnote: HR=High Resolution
Does imageglass improve if you use dxcpl to disable feature level upgrade or force WARP?
And what does the dotnet --list-runtimes
command says?
@d2phap @mirh , Imageglass HR Image Working, when Force WARP ON
C:\Users\Windows10>dotnet --list-runtimes
Microsoft.NETCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Thanks for the investigation. I'm currently taking a break and won't be able to check further. This seems to me your issue causes by the specific driver, I'm not sure. There is nothing I can do for now.
Is there d2d-d3d surface sharing or something going on? After some extra scavenging, it seems that could create some sketchy-yet-not-immediate problem.
Also, was it meant for a variable to be named *_useHardwardAcceleration*? How can you toggle it at runtime?
@mirh I don't have technical/programing knowledge, so not understand your previous reply... @d2phap this above quote should help you!
also, currently I switch back to Imageglass8 as Main application & Imageglass9 as only for Testing...
Even without dev knowledge, as I hinted you may still help by identifying which of the first other 4 betas is the first that is broken for good.
Do you think it would be advantageous to use a CPU fallback option? If the GPU fails to render the image, it will fallback to the CPU until the app session is closed. Alternatively, similar to all the Chrome browser options to have an option to render images with GPU (checked) or not (unchecked). I know this doesn't directly solve the problem, but there are some other use cases for this.
For example, on my desktop, I only have a dedicated GPU, the RTX 3090, and it uses WAYYYY too much power just to render some images. For this scenario, I would rather use my CPU than GPU to handle graphics...for me at least.
It's called acceleration for a reason. There's no way a gpu is less efficient than a cpu in what it's tasked to do. And if you are worried about your 350W card waking up (putting aside that every modern card has at least half a dozen of P-states) then you should think a bit more holistically about using some kind of laptop-like hybrid graphics even on your desktop.
With this said, I literally already mentioned a toggle for that (it's just that I'm not sure if it's a .NET/dx thing with some system-wide knob, or just a program-specific preference). But beyond that, the very weird thing is that whereas d3d 10_1 WARP fails immediately with a pretty straightforward error, real life 10_0 hardware somehow does not.
@mirh
There's no way a gpu is less efficient than a cpu in what it's tasked to do. And if you are worried about your 350W card waking up (putting aside that every modern card has at least half a dozen of P-states) then you should think a bit more holistically about using some kind of laptop-like hybrid graphics even on your desktop.
You are absolutely correct...if I had an integrated GPU. Pulling 120W minimum for the GPU alone compared to rendering at ~55-75W with the CPU is so much better. With browsers, I disable the "Use hardware acceleration when available" option, because if I don't...that thing will pull 200W and I know because my room will turn into an oven real quick (although, it's a great time for the Winter :3). ATP I'd have to replace every part to upgrade or downgrade the CPU to one that has integrated graphics.
I just thought it might be cool to have this feature given this issue, along with some other potential use cases.
I think you have some big problem with your card if that's happening https://www.techpowerup.com/review/msi-geforce-rtx-3090-ti-suprim-x/38.html
@mirh
I think you have some big problem with your card if that's happening https://www.techpowerup.com/review/msi-geforce-rtx-3090-ti-suprim-x/38.html
Lol! I think those are with 1080p monitors. At 4K, dual monitor, idle is 80W.
Resolution of an empty desktop has nothing to do with anything. If any, it might be that your monitors to achieve 4K (at whatever frequency and on whatever cable they have) requires/use some super tight timings with a vblank too short for the card to idle. Try to see if lowering anything of that with a custom resolution improves anything, and check if you didn't set "maximum performance" in the settings (because if that's your idle you have already lost really).
I will just close this for now
Refrance to this https://github.com/d2phap/ImageGlass/discussions/1665#discussioncomment-7309553
High Resolution Image not working on My PC's Graphics Driver (Integrated Graphics)
What I notice?
Yesterday I try This in VMware on Same PC & the Same Image File Working..
Today I Re-install Windows 10 on My PC, and Try without any Driver & Software installed (only .net7 & webview2).. and the Image File working correctly..
But after install Display Driver, The Image File didn't work.... Try to uninstall Display Driver, Image File works..
(Note: Display Driver is Latest & Installed from Windows Update)
Note2: with ImageGlass8, it's always Working....
PC Specs: Processor: i5-650 (1st Generation) RAM: 4GB OS: Windows 10 22H2 (64 bit)
For your Investigation: I put the Driver ZIP file Here. Graphics Driver.zip