Hello,
I am running Debian 12 on a Lenovo laptop and have the following GPU hardware. NVIDIA GeForce GTX 1650 Ti. I do not need the GPU for rendering with Xorg but need it for ML / CUDA workload. I followed this official guide 1. Introduction — NVIDIA Driver Installation Guide r575 documentation and where I chose the proprietary kernel modules option. I understand that I am using a guide for a device other than what I have. In any case I ran the following:
$ wget https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/cuda-keyring_1.1-1_all.deb
# dpkg -i cuda-keyring_1.1-1_all.deb
# apt update
# apt -V install cuda-drivers
# apt -V install nvidia-driver-cuda nvidia-kernel-dkms
But it turns out that the NVIDIA GPU is being used for rendering as well. For instance,
$ nvidia-smi
Thu Jul 17 21:27:37 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 575.57.08 Driver Version: 575.57.08 CUDA Version: 12.9 |
|-----------------------------------------+------------------------+----------------------+
| 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 GTX 1650 ... On | 00000000:01:00.0 On | N/A |
| N/A 49C P5 8W / 35W | 206MiB / 4096MiB | 18% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 1096 G /usr/lib/xorg/Xorg 187MiB |
+-----------------------------------------------------------------------------------------+
Here is the Linux kernel that I am using:
$ uname -a
Linux dev 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) x86_64 GNU/Linux
I tried disabling the use of the NVIDIA GPU via X11 config but it does not have an effect. My objective is to use the NVIDIA GPU exclusively for CUDA and the other integrated GPU (Intel) for rendering. Any ideas what I could be missing here? Or how I could go about?
Thanks
Gros
it’s a matter of configuring X properly, but it is very difficult to help you until you provide at least some basic info, like the output of lspci |grep -i -E 'display|vga and what config you currently have in /etc/X11/xorg.conf.d/…
Generally your config should look something like this:
Section "ServerFlags"
Option "AutoAddGPU" "false"
EndSection
Section "Device"
Identifier "Intel"
Driver "modesetting"
BusID "PCI:0:2:0" ## replace with values from lspci
EndSection
The value of BusID needs to be adjusted according to what lspci reports (note: lspci uses hex format, while X config decimal, so the numbers need to be converted accordingly).
…And as always regarding Debian:
Mind you, 6.1 was originally released in 2022… There are newer kernels available in the official backports repo, but Debian-12 is generally a pretty old system. I’d recommend switching to Debian-13 which is currently in RC stage and has been perfectly stable for over a year now. You can then use Nvidia apt repos for Debian-12: they work fine with 13 as well.
Hi
Thanks for your reply. Here are the PCI values for my display cards:
$ lspci |grep -i -E 'display|vga'
00:02.0 VGA compatible controller: Intel Corporation CometLake-H GT2 [UHD Graphics] (rev 05)
01:00.0 VGA compatible controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Ti Mobile] (rev a1)
I have tried the config above. I.e.
Section "ServerFlags"
Option "AutoAddGPU" "false"
EndSection
Section "Device"
Identifier "Intel"
Driver "modesetting"
BusID "PCI:0:2:0"
EndSection
And restarted display-manager (same when rebooting). Only the built-in laptop display works. The other monitors are not detected as video devices. I think they are detected at the hardware level somehow because I cannot see messages on the external monitors like “going on standby mode because no video source was detected”.
Here are some more details which I think points towards it might not be possible for me to have this setup:
What are the connected monitors?
$ xrandr --listmonitors
Monitors: 3
0: +*eDP-1 1920/344x1080/194+0+0 eDP-1
1: +DP-1-1 1440/527x2560/296+5360+0 DP-1-1
2: +HDMI-1-0 3440/797x1440/334+1920+0 HDMI-1-0
What are the cards on my laptop?
$ ls -al /sys/class/drm/card{0..1}/device
lrwxrwxrwx 1 root root 0 Jul 26 16:38 /sys/class/drm/card0/device -> ../../../0000:00:02.0
lrwxrwxrwx 1 root root 0 Jul 26 16:38 /sys/class/drm/card1/device -> ../../../0000:01:00.0
To what (monitors) are the ports on the cards connected to?
$ for port in /sys/class/drm/card0-*/status; do echo "$port: $(cat $port)"; done
/sys/class/drm/card0-eDP-1/status: connected
$ for port in /sys/class/drm/card1-*/status; do echo "$port: $(cat $port)"; done
/sys/class/drm/card1-DP-1/status: disconnected
/sys/class/drm/card1-DP-2/status: connected
/sys/class/drm/card1-HDMI-A-1/status: connected
So, it looks like the built-in display is connected to Intel card and external monitors ends up on the NVIDIA card.
Would you have another idea what I could do? Any kind of data I could share with understanding the problem?
Well, it kinda works as intended: you wanted your Nvidia card for compute only, not for displaying anything… But I get that external video ports being unusable is not what you intended. You can configure X to do all the rendering on the Intel and then just copy the framebuffer to the Nvidia’s VRAM:
Section "Device"
Identifier "Intel"
Driver "modesetting"
BusID "PCI:0:2:0"
EndSection
Section "Device"
Identifier "Nvidia"
Driver "nvidia"
Option "AllowEmptyInitialConfiguration" "true"
BusID "PCI:1:0:0"
EndSection
Section "Screen"
Identifier "dualGPU"
Device "Intel" ## primary GPU performing the rendering
GPUDevice "Nvidia" ## secondary GPU providing additional monitors
EndSection
Make sure that you don’t disable fbdev param of nvidia-drm module (it should be on by default for v575 unless explicitly disabled). Also you probably need modeset param to be enabled somewhere in /etc/modprobe.d/ (usually nvidia-modeset.conf, but not 100% sure if this one is necessary).
Finally, bare in mind that this will use some tiny fraction of the Nvidia’s VRAM and processing power (but really just tiny tiny ;-) ). Therefore Xorg will probably appear again in the output of nvidia-smi, but all other programs should by default run on the Intel, even when displayed on a monitor connected to the Nvidia (you can test by running for example glxgears, moving its window to the external display and then check that the output of nvidia-smi does not contain glxgears).
Hi,
Thanks again for your prompt reply. Much appreciated
I note that with the suggested test:
- start
glxgears on built-in monitor (i.e. ensure it goes to Intel GPU)
- run watch on
nvidia-smi to monitor if there are any processes (e.g. watch -n 1 nvidia-smi)
- Move
glxgears to external monitors and observe the watch
The glxgears process does not show
$ nvidia-smi
Sun Jul 27 10:36:08 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 575.57.08 Driver Version: 575.57.08 CUDA Version: 12.9 |
|-----------------------------------------+------------------------+----------------------+
| 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 GTX 1650 ... On | 00000000:01:00.0 On | N/A |
| N/A 52C P0 13W / 35W | 206MiB / 4096MiB | 25% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 7034 G /usr/lib/xorg/Xorg 187MiB |
+-----------------------------------------------------------------------------------------+
Based on your explanation I am therefore getting what is intended and what is already in the original post. Have I misunderstood the suggestion and explanation? Out of curiosity is the 187MiB the tiny amount of memory you were referring to?
Generally speaking my current setup is not optimal to my liking. Ideally, i would like to see (from nvidia-smi point of view):
- the GPU to be in a performance state (P
<val>) closer to 12. While watching the output of nvidia-smi for some time, i can see it fluctuate between P5 and P8.
- wattage closer to
1W
- GPU utilization closer to
0%
- Type is
C (compute) instead of G (Graphics). Here i understand because i define an xorg device i will get G.
I have tested with 535 driver (from debian stock) now and observing similar outputs:
$ nvidia-smi
Sun Jul 27 11:00:46 2025
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.247.01 Driver Version: 535.247.01 CUDA Version: 12.9 |
|-----------------------------------------+----------------------+----------------------+
| 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 GTX 1650 ... Off | 00000000:01:00.0 On | N/A |
| N/A 51C P5 8W / 35W | 189MiB / 4096MiB | 24% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| 0 N/A N/A 8818 G /usr/lib/xorg/Xorg 187MiB |
+---------------------------------------------------------------------------------------+
What do you think? Is it still possible to get the outcome I am after.
Actually, the test would be even more convincing if program that originally started on a display connected to the Nvidia was verified not to show up in nvidia-smi’s output (I wrote “moving its window to the external display” just in case it initially showed up on the internal one, not it being a precondition). But that’s a detail.
From what I understood from your initial post, X appearing in nvidia-smi was just one of the symptoms indicating that rendering was happening on the Nvidia card and that you had an impression that other programs were using it as well for rendering (“But it turns out that the NVIDIA GPU is being used for rendering as well.”). The current config ensures that no graphic rendering will happen by default on the Nvidia unless explicitly chosen via Prime or Vulkan (X is also not doing any rendering on it, just copying frames rendered by the Intel to the Nvidia’s VRAM via the framebuffer device). If I misunderstood what you meant and X showing in nvidia-smi’s output was the only symptom, It is possible that without any explicit config, X used to autoconfigure itself to the same state as with the current config, but it’s hard to say without a detailed analysis of the X’s logs.
(…)
I don’t think so, unless Nvidia makes some optimizations for such scenarios in the future versions of the driver.
Out of curiosity: what power draw and GPU utilization were you getting with the previous config when there was no Device entry for the Nvidia card and the external video output was disabled?
Hi
With this xconf setting:
Section "ServerFlags"
Option "AutoAddGPU" "false"
EndSection
Section "Device"
Identifier "Intel"
Driver "modesetting"
BusID "PCI:0:2:0"
EndSection
I get consistently 2W with P8 performance state. Example:
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.247.01 Driver Version: 535.247.01 CUDA Version: 12.9 |
|-----------------------------------------+----------------------+----------------------+
| 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 GTX 1650 ... Off | 00000000:01:00.0 Off | N/A |
| N/A 43C P8 2W / 35W | 1MiB / 4096MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| No running processes found |
+---------------------------------------------------------------------------------------+
I did the test with this config
Section "Device"
Identifier "Intel"
Driver "modesetting"
BusID "PCI:0:2:0"
EndSection
Section "Device"
Identifier "Nvidia"
Driver "nvidia"
Option "AllowEmptyInitialConfiguration" "true"
BusID "PCI:1:0:0"
EndSection
Section "Screen"
Identifier "dualGPU"
Device "Intel" ## primary GPU performing the rendering
GPUDevice "Nvidia" ## secondary GPU providing additional monitors
EndSection
where now glxgears starts on the external monitor and there is no glxgears process in nvidia-smi.
Thanks for the help.
a few more things to try came to my head:
- try Debian-13 or at least 6.12 kernel from Debian-12’s backports repo (Debian-13 is in RC stage currently and has been perfectly stable for over a year now. There are no Nvidia repos for it yet, but you can use those for 12: they just work)
- try installing the full driver: maybe there’s some additional lib there that will make copying frames to the Nvidia more efficient;
- try both open and proprietary kernel module flavors:
sudo apt-get install nvidia-open / sudo apt-get install cuda-drivers (…and just to be 100% sure that no stale config stays, purge the whole Nvidia stuff before installing each flavor: sudo apt-get purge --autoremove '*nvidia*' '*cuda*').
24% utilization just for copying frames into the VRAM is indeed excessive: I guess it’s not like you have an 8k@120Hz display connected to it, right? ;-)