You are not logged in.

#1 2025-11-30 04:41:47

pernostro
Member
Registered: 2025-11-30
Posts: 7

NVIDIA Memory Reserved

Hello everyone. I use a laptop to work with ComfyUI, an RTX 5070 card with 8GB of VRAM. No other processes use the GPU, the card operates in hybrid mode. nvidia-smi shows 445 MB Reserved??!! Total - 8151, Free - 7569. Comfy shows "Total VRAM 7706 MB" when loading and uses only that.. But in Windows, Comfy can use all 8Gb. Can you tell me please how I can free up reserved VRAM? Or at least reduce it? Driver Version: 580.105.08 CUDA Version: 13.0
thnx.

Offline

#2 2025-11-30 10:31:28

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,336

Re: NVIDIA Memory Reserved

No other processes use the GPU, the card operates in hybrid mode.

Only one of those claims can be true.
What's the actual and complete output of nvidia-smi?

Offline

#3 2025-11-30 15:28:32

pernostro
Member
Registered: 2025-11-30
Posts: 7

Re: NVIDIA Memory Reserved

seth wrote:

Only one of those claims can be true.

Why so? If all other processes use only the integrated card, and the discrete one is used only for GPU Comfy

seth wrote:

What's the actual and complete output of nvidia-smi?


nvidia-smi

Sun Nov 30 18:14:48 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.105.08             Driver Version: 580.105.08     CUDA Version: 13.0     |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 5070 ...    Off |   00000000:01:00.0 Off |                  N/A |
| N/A   32C    P4              9W /   47W |       2MiB /   8151MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|  No running processes found                                                             |
+-----------------------------------------------------------------------------------------+

nvidia-smi -q -d MEMORY

==============NVSMI LOG==============

Timestamp                                 : Sun Nov 30 18:25:55 2025
Driver Version                            : 580.105.08
CUDA Version                              : 13.0

Attached GPUs                             : 1
GPU 00000000:01:00.0
FB Memory Usage
Total                             : 8151 MiB
Reserved                          : 445 MiB
Used                              : 2 MiB
Free                              : 7705 MiB
BAR1 Memory Usage
Total                             : 8192 MiB
Used                              : 2 MiB
Free                              : 8190 MiB
Conf Compute Protected Memory Usage
Total                             : 0 MiB
Used                              : 0 MiB
Free                              : 0 MiB

Can the integrated card reserve this memory for itself? ))

CPU Intel(R) Core(TM) Ultra 7 255H (16) @ 5.10 GHz
GPU NVIDIA GeForce RTX 5070 Max-Q / Mobile [Discrete]
GPU Intel Arc Pro 140T @ 2.25 GHz [Integrated]
Vulkan 1.4.318 - Intel open-source Mesa driver [Mesa 25.2.7-ar]
Display(s) 2560x1600 @ 1.25x in 16", 240 Hz [Built-in]

Last edited by pernostro (2025-11-30 15:33:02)

Offline

#4 2025-11-30 16:36:37

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,336

Re: NVIDIA Memory Reserved

Why so? If all other processes use only the integrated card, and the discrete one is used only for GPU Comfy

Because of the very definition of a "hybrid mode" - you're however not doing that according the output of nvidia-smi.

Seems reserved for the framebuffer
Blacklist nvidia-drm, resp. first try to just add "nvidia_drm.modeset=0 nvidia_drm.fbdev=0" to the https://wiki.archlinux.org/title/Kernel_parameters

Offline

#5 2025-11-30 19:31:58

pernostro
Member
Registered: 2025-11-30
Posts: 7

Re: NVIDIA Memory Reserved

Thanks for your participation, man.

sudo cat /sys/module/nvidia_drm/parameters/modeset
N

sudo cat /sys/module/nvidia_drm/parameters/fbdev
N

nvidia-smi -q -d MEMORY

==============NVSMI LOG==============

Timestamp                                 : Sun Nov 30 20:15:44 2025
Driver Version                            : 580.105.08
CUDA Version                              : 13.0

Attached GPUs                             : 1
GPU 00000000:01:00.0
FB Memory Usage
Total                             : 8151 MiB
Reserved                          : 445 MiB
Used                              : 0 MiB
Free                              : 7706 MiB
BAR1 Memory Usage
Total                             : 8192 MiB
Used                              : 1 MiB
Free                              : 8191 MiB

I even tried some livesessions with Cachy and Endeavour:

 1 [liveuser@CachyOS ~]$ nvidia-smi                                                                                                
 2 Sun Nov 30 18:55:56 2025                                                                                                        
 3 +-----------------------------------------------------------------------------------------+                                     
 4 | NVIDIA-SMI 580.105.08             Driver Version: 580.105.08     CUDA Version: 13.0     |                                     
 5 +-----------------------------------------+------------------------+----------------------+                                     
 6 | GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |                                     
 7 | Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |                                     
 8 |                                         |                        |               MIG M. |                                     
 9 |=========================================+========================+======================|                                     
10 |   0  NVIDIA GeForce RTX 5070 ...    Off |   00000000:01:00.0 Off |                  N/A |                                     
11 | N/A   39C    P4              8W /   42W |      15MiB /   8151MiB |      0%      Default |                                     
12 |                                         |                        |                  N/A |                                     
13 +-----------------------------------------+------------------------+----------------------+                                     
14                                                                                                                                 
15 +-----------------------------------------------------------------------------------------+                                     
16 | Processes:                                                                              |                                     
17 |  GPU   GI   CI              PID   Type   Process name                        GPU Memory |                                     
18 |        ID   ID                                                               Usage      |                                     
19 |=========================================================================================|                                     
20 |    0   N/A  N/A            1416      G   /usr/lib/Xorg                             4MiB |                                     
21 +-----------------------------------------------------------------------------------------+                                     
22 [liveuser@CachyOS ~]$ nvidia-smi -q -d memory                                                                                   
23                                                                                                                                 
24 ==============NVSMI LOG==============                                                                                           
25                                                                                                                                 
26 Timestamp                                 : Sun Nov 30 18:56:13 2025                                                            
27 Driver Version                            : 580.105.08                                                                          
28 CUDA Version                              : 13.0                                                                                
29                                                                                                                                 
30 Attached GPUs                             : 1                                                                                   
31 GPU 00000000:01:00.0                                                                                                            
32     FB Memory Usage                                                                                                             
33         Total                             : 8151 MiB                                                                            
34         Reserved                          : 445 MiB                                                                             
35         Used                              : 15 MiB                                                                              
36         Free                              : 7692 MiB   
 [liveuser@eos-2025.11.24 ~]$ nvidia-smi
Sun Nov 30 19:08:51 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.105.08             Driver Version: 580.105.08     CUDA Version: 13.0     |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 5070 ...    Off |   00000000:01:00.0 Off |                  N/A |
| N/A   40C    P4              9W /   42W |      15MiB /   8151MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A            1433      G   /usr/lib/Xorg                             4MiB |
+-----------------------------------------------------------------------------------------+
[liveuser@eos-2025.11.24 ~]$ nvidia-smi -q -d memory

==============NVSMI LOG==============

Timestamp                                 : Sun Nov 30 19:09:10 2025
Driver Version                            : 580.105.08
CUDA Version                              : 13.0

Attached GPUs                             : 1
GPU 00000000:01:00.0
    FB Memory Usage
        Total                             : 8151 MiB
        Reserved                          : 445 MiB
        Used                              : 15 MiB
        Free                              : 7692 MiB
    BAR1 Memory Usage
        Total                             : 8192 MiB
        Used                              : 3 MiB
        Free                              : 8189 MiB

445 MB reserved everywhere )

Offline

#6 2025-11-30 19:45:04

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,336

Re: NVIDIA Memory Reserved

Seems unconditional.
Does it not surrender it when requesting the memory through CUDA?
Does it still reserve it when blacklisting nvidia_drm ?

Offline

#7 2025-11-30 22:46:43

pernostro
Member
Registered: 2025-11-30
Posts: 7

Re: NVIDIA Memory Reserved

Yes, it still reserve:

lsmod | grep nvidia

nvidia_wmi_ec_backlight    12288  0
nvidia_uvm           4096000  0
nvidia_modeset       2277376  0
nvidia              15912960  13 nvidia_uvm,nvidia_modeset
video                  81920  6 nvidia_wmi_ec_backlight,asus_wmi,asus_nb_wmi,xe,i915,nvidia_modeset
wmi                    36864  4 video,nvidia_wmi_ec_backlight,asus_wmi,wmi_bmof

nvidia-smi -q -d memory

==============NVSMI LOG==============

Timestamp                                 : Mon Dec  1 01:33:01 2025
Driver Version                            : 580.105.08
CUDA Version                              : 13.0

Attached GPUs                             : 1
GPU 00000000:01:00.0
FB Memory Usage
Total                             : 8151 MiB
Reserved                          : 445 MiB
Used                              : 0 MiB
Free                              : 7706 MiB
BAR1 Memory Usage
Total                             : 8192 MiB
Used                              : 1 MiB
Free                              : 8191 MiB

Now used in FB - zero smile)
And then I returned nvidia_drm back

lsmod | grep nvidia

nvidia_wmi_ec_backlight    12288  0
nvidia_uvm           4096000  0
nvidia_drm            147456  0
nvidia_modeset       2277376  1 nvidia_drm
nvidia              15912960  13 nvidia_uvm,nvidia_modeset
drm_ttm_helper         16384  2 nvidia_drm,xe
video                  81920  6 nvidia_wmi_ec_backlight,asus_wmi,asus_nb_wmi,xe,i915,nvidia_modeset
wmi                    36864  4 video,nvidia_wmi_ec_backlight,asus_wmi,wmi_bmof

nvidia-smi -q -d memory

==============NVSMI LOG==============

Timestamp                                 : Mon Dec  1 01:35:28 2025
Driver Version                            : 580.105.08
CUDA Version                              : 13.0

Attached GPUs                             : 1
GPU 00000000:01:00.0
FB Memory Usage
Total                             : 8151 MiB
Reserved                          : 445 MiB
Used                              : 2 MiB
Free                              : 7705 MiB
BAR1 Memory Usage
Total                             : 8192 MiB
Used                              : 2 MiB
Free                              : 8190 MiB

Comfy doesn't see these 445 MB and immediately announces upon loading that it will work with what's left -)
Who pocketed them remains a secret -)

Offline

#8 2025-11-30 22:51:39

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,336

Re: NVIDIA Memory Reserved

You should probably also unload nvidia_modeset  (which is probably only loaded by nvidia_drm)

Who pocketed them remains a secret -)

https://docs.nvidia.com/deploy/nvidia-smi/index.html - nvidia admits to it being their driver smile

Offline

#9 2025-11-30 23:15:57

pernostro
Member
Registered: 2025-11-30
Posts: 7

Re: NVIDIA Memory Reserved

lsmod | grep nvidia

nvidia_wmi_ec_backlight    12288  0
nvidia_uvm           4096000  0
nvidia              15912960  12 nvidia_uvm
video                  81920  5 nvidia_wmi_ec_backlight,asus_wmi,asus_nb_wmi,xe,i915
wmi                    36864  4 video,nvidia_wmi_ec_backlight,asus_wmi,wmi_bmof

nvidia-smi -q -d memory

==============NVSMI LOG==============

Timestamp                                 : Mon Dec  1 02:12:52 2025
Driver Version                            : 580.105.08
CUDA Version                              : 13.0

Attached GPUs                             : 1
GPU 00000000:01:00.0
FB Memory Usage
Total                             : 8151 MiB
Reserved                          : 445 MiB
Used                              : 0 MiB
Free                              : 7706 MiB
BAR1 Memory Usage
Total                             : 8192 MiB
Used                              : 1 MiB
Free                              : 8191 MiB

smile

They say "The driver may also reserve a small amount of memory for internal use" smile smaaaal smile

Offline

#10 2025-12-01 10:42:19

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,336

Re: NVIDIA Memory Reserved

You could try to disable the https://wiki.archlinux.org/title/NVIDIA … P_firmware but I'm not sure whether the GPU will even respond to nvidia-smi then and it will probably not do anything useful (so it's just to see whether that's what requires the memory, your GPU isn't supported by the proprietary driver)

Offline

#11 2025-12-01 18:50:35

pernostro
Member
Registered: 2025-11-30
Posts: 7

Re: NVIDIA Memory Reserved

I gave up smile after looking at user bug reports on the Nvidia forum, which showed they also had quite a bit of reserved memory. Although their bug reports were not about that at all smile But it's one thing if they have 32GB of VRAM and 500MB reserved, while mine is just a tiny bit. I had to squeeze every last bit of money to buy a laptop with 8GB VRAM. And if I had 32GB, I wouldn't worry about the reserved 500MB smile So I guess it's just a driver issue and nothing can be done.

And thanks again for your participation, man. No one else responded to my problem either here or on the Nvidia forum.

So, "let it be", I said to myself smile

Look, from their bug reports, where they complain about some other error smile

Driver Version                            : 580.105.08
CUDA Version                              : 13.0

Attached GPUs                             : 1
GPU 00000000:01:00.0
    Product Name                          : NVIDIA GeForce RTX 5070 Ti
-----

    FB Memory Usage
        Total                             : 16303 MiB
        Reserved                          : 466 MiB
        Used                              : 15802 MiB
        Free                              : 36 MiB
Driver Version                            : 580.105.08
CUDA Version                              : 13.0

Attached GPUs                             : 1
GPU 00000000:2B:00.0
    Product Name                          : NVIDIA GeForce RTX 4090
------

   FB Memory Usage
        Total                             : 24564 MiB
        Reserved                          : 517 MiB
        Used                              : 1847 MiB
        Free                              : 22202 MiB

So I'm just a fool who thought his 500 MB was stolen smile
And no one on the Nvidia forum said, "Yeah, it's normal, don't worry about it, It's the same for everyone" smile
Because they apparently understand that this isn't normal smile

Last edited by pernostro (2025-12-01 20:58:04)

Offline

#12 2025-12-01 20:56:04

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,336

Re: NVIDIA Memory Reserved

Check

modinfo nvidia

for whether there's any parameter that's suspicious to allowing you to control the amount of reserved FB VRAM

Then see https://github.com/NVIDIA/open-gpu-kern … les/issues
It seems inconceivable that this memory is pre-allocated if the device isn't even used for a framebuffer (please make extra sure to blacklist nvidia_drm and nvidia_modeset from the get-go resp. try to boot w/ "nvidia_drm.modeset=0 nvidia_drm.fbdev=0" to see whether it's only a problem to release the memory but it's not allocated if the framebuffer is never initialized) so you could raise an issue about that
(My gut feeling from the sheer size of allocated memory is however that it's indeed the GSP)

Offline

#13 2025-12-02 03:57:14

pernostro
Member
Registered: 2025-11-30
Posts: 7

Re: NVIDIA Memory Reserved

I checked and even tried to change some of them, but without success. Still reserved.

sort /proc/driver/nvidia/params
CoherentGPUMemoryMode: ""
CreateImexChannel0: 0
DeviceFileGID: 0
DeviceFileMode: 438
DeviceFileUID: 0
DmaRemapPeerMmio: 1
DynamicPowerManagement: 2
DynamicPowerManagementVideoMemoryThreshold: 200
EnableDbgBreakpoint: 0
EnableGpuFirmware: 18
EnableGpuFirmwareLogs: 2
EnableMSI: 1
EnablePCIeGen3: 0
EnablePCIERelaxedOrderingMode: 0
EnableResizableBar: 0
EnableS0ixPowerManagement: 0
EnableStreamMemOPs: 0
EnableUserNUMAManagement: 1
ExcludedGpus: ""
GpuBlacklist: ""
GrdmaPciTopoCheckOverride: 0
IgnoreMMIOCheck: 0
ImexChannelCount: 2048
InitializeSystemMemoryAllocations: 1
KMallocHeapMaxSize: 0
MemoryPoolSize: 0
ModifyDeviceFiles: 1
NvLinkDisable: 0
OpenRmEnableUnsupportedGpus: 1
PreserveVideoMemoryAllocations: 1
RegisterPCIDriver: 1
RegistryDwords: ""
RegistryDwordsPerDevice: ""
ResmanDebugLevel: 4294967295
RmLogonRC: 1
RmMsg: ""
RmNvlinkBandwidthLinkCount: 0
RmProfilingAdminOnly: 1
S0ixPowerManagementVideoMemoryThreshold: 256
TemporaryFilePath: "/var/tmp"
UsePageAttributeTable: 4294967295
VMallocHeapMaxSize: 0

Of course, this is just a waste of resources smile But after searching google down to the last page, I found out that it's normal practice for the driver to reserve up to 500MB of VRAM for an 8GB card.
There is no switch smile

Offline

Board footer

Powered by FluxBB