https://bugs.winehq.org/show_bug.cgi?id=40983
Bug ID: 40983 Summary: VRamSizeDX9 reports incorrect video memory(Skyrim with ENB problem) Product: Wine Version: 1.9.14 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: mysticfallband@gmail.com Distribution: ---
I was able to run Skyrim with ENB on Wine, but encountered issues apparently related to insufficient video memory.
I followed an online instruction regarding detecting actual available video memory using VRamSizeDX9.exe, but found it always reports only 1888mb when my Nvidia 960GTX has 4Gb of video memory.
It turns out Skyrim actually freezes when it reaches 1.8G video memory. But even when it happens, nvidia-smi reports more than 2Gb of memory is still available.
It happens with the latest version of Wine staging and development, and regardless of whether I override Dx9 related libraries or not.
VRamSizeDX9 can be downloaded from below site below:
http://enbdev.com/download_vramsizetest.htm
https://bugs.winehq.org/show_bug.cgi?id=40983
--- Comment #1 from Xavier Cho mysticfallband@gmail.com --- Forgot to mention that I've already set VideoMemorySize to 4096 in the registry. It seems the value reported by VRamSizeDX9 is only afftected if I use smaller value than 1888mb in VideoMemorySize.
https://bugs.winehq.org/show_bug.cgi?id=40983
Xavier Cho mysticfallband@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Distribution|--- |Ubuntu Component|-unknown |directx-d3d Hardware|x86 |x86-64
https://bugs.winehq.org/show_bug.cgi?id=40983
Józef Kucia joseph.kucia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |joseph.kucia@gmail.com
--- Comment #2 from Józef Kucia joseph.kucia@gmail.com --- (In reply to Xavier Cho from comment #1)
Forgot to mention that I've already set VideoMemorySize to 4096 in the registry. It seems the value reported by VRamSizeDX9 is only afftected if I use smaller value than 1888mb in VideoMemorySize.
The VRamSizeDX9 creates 2048x2048 D3DFMT_A16B16G16R16F textures repeatedly until the memory is exhausted. We allocate system memory for each texture and the system memory allocation eventually fails.
It isn't obvious at all if this is related to your issues with Skyrim. Did you try to set windows version higher than Windows XP for Skyrim?
https://bugs.winehq.org/show_bug.cgi?id=40983
--- Comment #3 from Xavier Cho mysticfallband@gmail.com --- Created attachment 55147 --> https://bugs.winehq.org/attachment.cgi?id=55147 Debug log before Skyrim freezes
https://bugs.winehq.org/show_bug.cgi?id=40983
--- Comment #4 from Xavier Cho mysticfallband@gmail.com --- (In reply to Józef Kucia from comment #2)
The VRamSizeDX9 creates 2048x2048 D3DFMT_A16B16G16R16F textures repeatedly until the memory is exhausted. We allocate system memory for each texture and the system memory allocation eventually fails.
It isn't obvious at all if this is related to your issues with Skyrim. Did you try to set windows version higher than Windows XP for Skyrim?
I tested again with Windows 7 and 10 mode and the result seems to be the same.
With some heavy texture mods, Skyrim constantly freezes with below messages:
err:d3d:wined3d_debug_callback 0x1022b450: "GL_OUT_OF_MEMORY error generated. Failed to allocate CPU memory for buffer object.". err:d3d:wined3d_debug_callback 0x1022b450: "GL_OUT_OF_MEMORY error generated. Failed to allocate memory for buffer object.". err:d3d:buffer_create_buffer_object Failed to bind the VBO with error GL_OUT_OF_MEMORY (0x505)
But at the time of the freeze, nvidia-smi reports the process is using only about half (under 2Gb) of the total video memory.
I attached debug log of the last test using Windows 7 mode.
I thought VRamSizeDX9 problem could be related to this issue because, its the utility created by the ENB mod developer to find out optimal video memory settings to use in Skyrim, and it only reports half of the total video memory I actually have, and my Skyrim actually freezes with out of memory when it consumes more or less the reported amount of memory by the utility.
It might be just a coincidence, but with my limited knowledge, it was the best guess I could make.
https://bugs.winehq.org/show_bug.cgi?id=40983
--- Comment #5 from Józef Kucia joseph.kucia@gmail.com --- (In reply to Xavier Cho from comment #4)
With some heavy texture mods, Skyrim constantly freezes with below messages:
err:d3d:wined3d_debug_callback 0x1022b450: "GL_OUT_OF_MEMORY error generated. Failed to allocate CPU memory for buffer object.". err:d3d:wined3d_debug_callback 0x1022b450: "GL_OUT_OF_MEMORY error generated. Failed to allocate memory for buffer object.". err:d3d:buffer_create_buffer_object Failed to bind the VBO with error GL_OUT_OF_MEMORY (0x505)
But at the time of the freeze, nvidia-smi reports the process is using only about half (under 2Gb) of the total video memory.
Yeah, CPU memory is exhausted not video memory (as the error message says).
https://bugs.winehq.org/show_bug.cgi?id=40983
--- Comment #6 from Xavier Cho mysticfallband@gmail.com --- (In reply to Józef Kucia from comment #5)
Yeah, CPU memory is exhausted not video memory (as the error message says).
Ah... thanks for the explanation. I only just realized that you said Wine allocates system memory, rather than video memory.
And as it seems that my log actually says it fals to allocate 'CPU memory', and I stumbled upon this thread about 32bit Wine's limitation for allocating more than 2Gb of memory:
https://ubuntuforums.org/showthread.php?t=2233124
Have I understood correctly that the program reports only 1,888mb because of such limitation? Then I wonder why they (both the utility and Skyrim) don't exhaust video ram before using system memory as they suppose to do.
Is there anything I should do to change this behavior?
https://bugs.winehq.org/show_bug.cgi?id=40983
--- Comment #7 from Józef Kucia joseph.kucia@gmail.com --- (In reply to Xavier Cho from comment #4)
I thought VRamSizeDX9 problem could be related to this issue because, its the utility created by the ENB mod developer to find out optimal video memory settings to use in Skyrim, and it only reports half of the total video memory I actually have, and my Skyrim actually freezes with out of memory when it consumes more or less the reported amount of memory by the utility.
(In reply to Xavier Cho from comment #6)
And as it seems that my log actually says it fals to allocate 'CPU memory', and I stumbled upon this thread about 32bit Wine's limitation for allocating more than 2Gb of memory:
https://ubuntuforums.org/showthread.php?t=2233124
Have I understood correctly that the program reports only 1,888mb because of such limitation? Then I wonder why they (both the utility and Skyrim) don't exhaust video ram before using system memory as they suppose to do.
Is there anything I should do to change this behavior?
There's a chance that the game will work better if you set VideMemorySize and/or video memory settings in Skyrim to some lower values. If the game won't try to use that much memory it won't exhaust system memory. Just a guess though.
https://bugs.winehq.org/show_bug.cgi?id=40983
--- Comment #8 from Xavier Cho mysticfallband@gmail.com --- (In reply to Józef Kucia from comment #7)
There's a chance that the game will work better if you set VideMemorySize and/or video memory settings in Skyrim to some lower values. If the game won't try to use that much memory it won't exhaust system memory. Just a guess though.
I have already tried with various settings (both VideoMemorySize in WINE and relevant ENB settings) under 1.8Gb but it didn't seem to fix the problem.
And I'm afraid it wouldn't be the ideal solution for me even if it had worked, because those mods I used to use on Windows wouldn't fit in 1.8Gb anyway.
I wish to know why Skyrim exhaust system memory instead of video memory on WINE unlike the case with Windows, and if there's anything I could do to change this behavior if it's possible at all.
https://bugs.winehq.org/show_bug.cgi?id=40983
--- Comment #9 from Józef Kucia joseph.kucia@gmail.com --- Created attachment 56415 --> https://bugs.winehq.org/attachment.cgi?id=56415 Evict texture sysmem hack
This patch should make a difference for VRamSizeDX9, but I doubt it will change anything for Skyrim with ENB.
https://bugs.winehq.org/show_bug.cgi?id=40983
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest@luukku.com
--- Comment #10 from winetest@luukku.com --- Interesting.
1856 dx9 version. 3872 Dx11 version.
Neither is close to truth. The real value should be close to 8Gb.
wine 2.0rc5 and wine-staging 2.0rc5.
https://bugs.winehq.org/show_bug.cgi?id=40983
Sveinar Søpler cybermax@dexter.no changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |cybermax@dexter.no
--- Comment #11 from Sveinar Søpler cybermax@dexter.no --- This is still like that, atleast when you run that "vramsizetest" program.
Not sure how to interpret that tho?
With DX11, the setting of "Video Memory Size" in wine does not change anything regarding the vramsizetest for dx11.
Setting a value below 1888MB does however change the result from the vramsizetest for DX9.
Supposed to be like this?
https://bugs.winehq.org/show_bug.cgi?id=40983
tokktokk fdsfgs@krutt.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fdsfgs@krutt.org
https://bugs.winehq.org/show_bug.cgi?id=40983
zzzzzyzz@hacari.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |zzzzzyzz@hacari.org