According to https://enterprise-support.nvidia.com/s/article/Useful-nvidia-smi-Queries-2 it states "The current PCI-E link generation. These may be reduced when the GPU is not in use."
So, as a test I ran the following to see with my server I have here with a NVIDIA RTX1650 in it.
No current GPU in use at this time:
terrance@Intrepid:~$ nvidia-smi
Wed Mar 1 07:13:34 2023
+---------------------------------------------+
| NVIDIA-SMI 525.78.01 Driver Version: 525.78.01 CUDA Version: 12.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 ... Off | 00000000:01:00.0 On | N/A |
| 35% 37C P8 11W / 75W | 3MiB / 4096MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+---------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+---------------------------------------------+
terrance@Intrepid:~$ nvidia-smi --query-gpu=index,pcie.link.gen.current,pcie.link.gen.max,pcie.link.width.current --format=csv
index, pcie.link.gen.current, pcie.link.gen.max, pcie.link.width.current
0, 1, 2, 16
Now with a GPU in use:
terrance@Intrepid:~$ nvidia-smi
Wed Mar 1 07:40:16 2023
+---------------------------------------------+
| NVIDIA-SMI 525.78.01 Driver Version: 525.78.01 CUDA Version: 12.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 ... Off | 00000000:01:00.0 On | N/A |
| 35% 40C P0 17W / 75W | 30MiB / 4096MiB | 1% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+---------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 310633 G /usr/lib/xorg/Xorg 23MiB |
| 0 N/A N/A 310787 G xfwm4 1MiB |
+---------------------------------------------+
terrance@Intrepid:~$ nvidia-smi --query-gpu=index,pcie.link.gen.current,pcie.link.gen.max,pcie.link.width.current --format=csv
index, pcie.link.gen.current, pcie.link.gen.max, pcie.link.width.current
0, 2, 2, 16
Hope this helps!