open-gpu-kernel-modules icon indicating copy to clipboard operation
open-gpu-kernel-modules copied to clipboard

NVML GSP mode function needs reworked

Open BlueGoliath opened this issue 3 years ago • 6 comments

In 510.68.02, a function was introduced called nvmlDeviceGetGspFirmwareMode. This function has three issues with it:

  1. On Linux, it will fill both pointers with zero(false) even on Pascal when it should instead return NVML_ERROR_NOT_SUPPORTED. This is different to what the previous GSP NVML function, nvmlDeviceGetGspFirmwareVersion does and gives users the impression that their GPU has GSP firmware when it does not.

  2. On Windows with a Maxwell based GPU, nvmlDeviceGetGspFirmwareMode seems to always return NVML_ERROR_NOT_SUPPORTED, which is different than on Linux and Pascal. If you can't already, it should be possible to get the firmware version even on Windows.

  3. NVML_ERROR_NOT_SUPPORTED is returned despite not being documented.

Given that this new kernel driver requires GSP, making sure that it's possible to get reliable information as to whether their GPU has GSP firmware is important. A nvmlDeviceGetGspFirmwareMode_v2 function should be introduced and the old function deprecated to fix these problems.

BlueGoliath avatar May 13 '22 00:05 BlueGoliath

Both Pascal and Maxwell are unsupported by the GSP firmware. The only thing that appears to be needed here is to document the possible NVML_ERROR_NOT_SUPPORTED return value on unsupported hardware.

ryao avatar May 13 '22 00:05 ryao

The standard way of dealing with different behaviors is defining a new function version. See here:

https://github.com/NVIDIA/nvidia-settings/blob/7471c5b584c4d8df8d81c336c01b29b8e4b15b1d/src/nvml.h#L8728

For example, the symbol for nvmlDeviceGetGraphicsRunningProcesses_v2 exists in the library still despite being replaced by nvmlDeviceGetGraphicsRunningProcesses_v3.

Unrelated side note: just came across functions I haven't seen until now. Nerd sniped myself.

Edit: ...because Nvidia just introduced them in 515. Duh me. @aritger Big thanks to you or whoever made these NVML additions. They are massive!

BlueGoliath avatar May 13 '22 04:05 BlueGoliath

How to enable GSP on Windows 11?

ValeZAA avatar Nov 23 '23 10:11 ValeZAA

@ValeZAA: The NVIDIA Windows GPU driver does not currently make use of GSP.

aritger avatar Nov 29 '23 00:11 aritger

How is this completed? None of the issues were fixed.

BlueGoliath avatar Nov 29 '23 00:11 BlueGoliath

Blech; sorry. The buttons are right next to each other...

aritger avatar Nov 29 '23 00:11 aritger