You are not logged in.

#1 2019-12-21 15:36:39

riri
Member
Registered: 2007-05-21
Posts: 28

Video memory not detected

Hi

I recently changed of hardware, excepted my graphic card.
I used to play a game on Wine, and now I get the message "Not enough memory to run".
I have 16GB of RAM, I had 8GB. So I thought of video memory and driver. I ran lspci and discovered my video ram (4GB) was not showing of :

$ lspci -v -s $(lspci | awk '/VGA/{print $1}')
08:00.0 VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] (rev a1) (prog-if 00 [VGA controller])
	Subsystem: Device 7377:0000
	Flags: bus master, fast devsel, latency 0, IRQ 69
	Memory at f5000000 (32-bit, non-prefetchable) [size=16M]
	Memory at e0000000 (64-bit, prefetchable) [size=256M]
	Memory at f0000000 (64-bit, prefetchable) [size=32M]
	I/O ports at f000 [size=128]
	[virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
	Capabilities: <access denied>
	Kernel driver in use: nvidia
	Kernel modules: nouveau, nvidia_drm, nvidia

But if I check on nvidia-setttings, it shows the ram: Screenshot of nvidia-settings

I haven't seen anything revelant in dmesg. Modules are loaded correctly too (and no nouveau module loaded) :

$ lsmod | grep '^n'
nvidia_drm             49152  3
nvidia_uvm           1085440  0
nvidia_modeset       1118208  6 nvidia_drm
nvidia              20434944  267 nvidia_uvm,nvidia_modeset

I don't have any specific Xorg configuration, except for leyboard layout.

I don't know much where to check (I found nothing on the net so far).
The only fix to the "not enough memory to run" message was to check the video RAM as I did and use it to force it in Wine registry for DirectX smile

Anyone has a hint to give, please ?

Last edited by riri (2019-12-21 16:22:53)

Offline

#2 2019-12-21 16:09:07

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,064

Re: Video memory not detected

Please replace the oversized image w/ a link.
The memory shown in lspci are memory portions of the video ram, mapped into the virtual ram system to be directly addressable - this has nothing to do with the video memory (amount) on your graphics card.
You can use nvidia-smi to query the video memory (but it will match nvidia settings)

This smells more like a wine/directx/game bug.
Trying to run "windows/system32/dxdiag.exe" tells me "err:d3d:wined3d_dll_init VideoMemorySize is 0 but must be >0" so I guess that's a non-implemented feature in wine.

Offline

#3 2019-12-21 16:30:45

riri
Member
Registered: 2007-05-21
Posts: 28

Re: Video memory not detected

seth wrote:

Please replace the oversized image w/ a link.

Done

seth wrote:

The memory shown in lspci are memory portions of the video ram, mapped into the virtual ram system to be directly addressable - this has nothing to do with the video memory (amount) on your graphics card.
You can use nvidia-smi to query the video memory (but it will match nvidia settings)

Yes I know the RAM is there smile
But if I remember well, lspci showed the total amount of memory available, and that is commonly used with Wine to force its value in Wine context (PlayOnLinux has that a lot in scripts).
I try to figure out how that could happen.

seth wrote:

This smells more like a wine/directx/game bug.
Trying to run "windows/system32/dxdiag.exe" tells me "err:d3d:wined3d_dll_init VideoMemorySize is 0 but must be >0" so I guess that's a non-implemented feature in wine.

wine/directx/game are exactly the same. I even tried getting the original wine directory and using it as is, doing the same config with a new one. So I don't think it's a wine/directx/game bug.
The graphic card is also the same, so the only difference is on the rest of the hardware (the main difference is a change from Intel i3 to AMD Ryzen), and of course a new ArchLinux (there is a lot of possibilities in misconfiguring ^^, but I didn't do much special config in either my old or new system, except bringing nvidia modules in the initial ramdisk).

Offline

#4 2019-12-21 17:01:05

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,064

Re: Video memory not detected

But if I remember well, lspci showed the total amount of memory available

You don't. These are the Base Address Registers, they are not related to the overall memory amount, most of it simply isn't mapped into the virtual memory system.
What you see is an absolutely common output and not specific to your system at all.
It's possible that nouveau maps more memory, but that's still not a hard relation.

So I don't think it's a wine/directx/game bug.

Given that dxdiag fails because it thinks I've 0MB video ram, I'm actually quite sure it is.
Wine could eg. get the accurate value from glGetString(GL_EXTENSIONS) (GL_NVX_gpu_memory_info would hold the accurate value, check glxinfo).

Offline

#5 2019-12-21 19:59:07

riri
Member
Registered: 2007-05-21
Posts: 28

Re: Video memory not detected

Here dxdiag gives me

0009:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
0009:fixme:wbemprox:wbem_services_CreateInstanceEnum unsupported flags 0x00000030
0009:fixme:wbemprox:enum_class_object_Next timeout not supported
0009:fixme:ddraw:ddraw7_Initialize Ignoring guid {aeb2cdd4-6e41-43ea-941c-8361cc760781}.
0009:err:winediag:MIDIMAP_drvOpen No software synthesizer midi port found, Midi sound output probably won't work.
0009:fixme:dxdiag:wWinMain Information dialog is not implemented

It's not a full directx native installation though. That's what I have added with winetricks (winetricks.log):

xact
d3dx9_43
d3dx9_36
w_workaround_wine_bug-24013
d3dcompiler_43

Because that's what is recommended for the game I play on (TESV Skyrim), and what used to work with the same graphic card.

I am still convinced it's somewhere on my arch installation/configuration.

Offline

#6 2019-12-21 21:10:13

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,064

Re: Video memory not detected

I cannot say whether it's related to your arch config, but I can guarantee you that it is /not/ because of the lspci output.
If wine looks there for the VRAM size, that's a wine bug for sure. But I doubt it. Did you get an indication as to how much memory the game though you got available?

Offline

#7 2019-12-22 11:29:02

riri
Member
Registered: 2007-05-21
Posts: 28

Re: Video memory not detected

Wine isn't looking there for VRAM size. It is just a trick that has been used on Wine gaming community to get the information and force it in the wine registry, in the key

 [HKEY_CURRENT_USER\Software\Wine\Direct3D]
"VideoMemorySize"

But it does not seem to work.

And I don't get much information from wine, just one line:

0009:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION

I don't have much time to investigate for now. I hope to have more time after Xmas.

Offline

#8 2019-12-22 12:08:23

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,064

Re: Video memory not detected

It is just a trick that has been used on Wine gaming community to get the information and force it in the wine registry

So it seems quote normal that wine doesn't provide this information to games that rely on it and this is all about a disfuncitional kludge to deal with the known wine limitation?
In this case it's really simple: use a less kludgy kludge and grep it out of glxinfo, see eg. https://www.phoronix.com/forums/forum/l … -reporting

Offline

#9 2019-12-22 14:58:32

riri
Member
Registered: 2007-05-21
Posts: 28

Re: Video memory not detected

Thank you for the link. I used the -B switch of glxinfo as indicated on the topic and got the useful information

Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 4096 MB
    Total available memory: 4096 MB
    Currently available dedicated video memory: 3961 MB

So I will investigate on Wine/DirectX.

Thanks for your help, seth

Offline

Board footer

Powered by FluxBB