GPU Clock Idle when desktop Locked

I have a small test program (attached) that can be run to show this
fbo_sample.cxx (4.1 KB)

Simply compile as follows:

gcc fbo_sample.cxx -o fbo_sample -lglut -lGLU -lGL -lGLEW -lm

run a few instances of the executable (./fbo_sample) and use ‘ps aux | grep fbo_sample’ to collect the PID’s and use 'top -p , ’ to display the CPU usage.

Here’s an example taken from ubuntu 18.04:

With the screen unlocked:

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
17521 david 20 0 130268 43312 34560 S 17.0 0.0 2:53.90 fbo_sample
17534 david 20 0 130236 43508 34756 S 15.0 0.0 2:49.37 fbo_sample

With the screen locked:

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
17521 david 20 0 130268 43312 34560 S 0.3 0.0 3:54.72 fbo_sample
17534 david 20 0 130236 43508 34756 S 0.0 0.0 3:48.02 fbo_sample

i.e., you can see a 1/10-th drop in the CPU usage for this GPU-only sample code. Since it runs everything using a framebuffer object, I would like it to stay ‘Active’ at all times.

I also noticed the following in the nvidia-smi output:

With the screen unlocked:

nvidia-smi -q -d PERFORMANCE

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

Timestamp : Wed May 19 11:42:50 2021
Driver Version : 460.73.01
CUDA Version : 11.2

Attached GPUs : 1
GPU 00000000:81:00.0
Performance State : P0
Clocks Throttle Reasons
Idle : Not Active
Applications Clocks Setting : Not Active
SW Power Cap : Not Active
HW Slowdown : Not Active
HW Thermal Slowdown : Not Active
HW Power Brake Slowdown : Not Active
Sync Boost : Not Active
SW Thermal Slowdown : Not Active
Display Clock Setting : Not Active

With the screen locked:

nvidia-smi -q -d PERFORMANCE

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

Timestamp : Wed May 19 11:44:11 2021
Driver Version : 460.73.01
CUDA Version : 11.2

Attached GPUs : 1
GPU 00000000:81:00.0
Performance State : P0
Clocks Throttle Reasons
Idle : Active
Applications Clocks Setting : Not Active
SW Power Cap : Not Active
HW Slowdown : Not Active
HW Thermal Slowdown : Not Active
HW Power Brake Slowdown : Not Active
Sync Boost : Not Active
SW Thermal Slowdown : Not Active
Display Clock Setting : Not Active

You can see that the ‘Clocks Throttle Reasons’ changes for the ‘Idle’ flag, which I surmise must be due to the screen locking.

Since we have taken great strides to program our software (ShipIR/NTCS) to perform all its analysis off-screen (using FBOs), there’s no reason for the GPU to idle when these programs are running and the screen is locked (for security reasons). In fact, we tend to ramp up our CPU / GPU usage using multiple CPUs and a high-end NVIDIA card to maximize our throughput for our infrared signature analysis tool which can run continuously for weeks on end. Having these run at 1/4 to 1/10-th of the speed with the screen unlocked is a serious and critical defect in either Linux or the driver. I have a ticket open with RedHat ( Case 02689702) but I would appreciate some input from the NVIDIA driver team for Linux.