Orbmu2k / nvidiaProfileInspector

MIT License
3.33k stars 249 forks source link

Background Application Max Frame Rate #79

Closed cjmanca closed 1 year ago

cjmanca commented 3 years ago

The current drivers have a new option for "Background Application Max Frame Rate", would it be possible to expose this in the profile inspector?

jgottula commented 3 years ago

So, I actually gave this a try.

Setting Background Application Max Frame Rate has ID of 0x10835005. (Notably, this still isn't documented, even in the very latest R470 headers.)

(As a side note, one ID number higher, 0x10835006, is apparently named Background Application Max Frame Rate only for NVCPL to maintain the previous slider value when the BG_FRL_FPS is set to Disabled. Top-notch programming is clearly going on in the NVIDIA Control Panel.)

Anyway, setting ID 0x10835005 is definitely present in nvapi64.dll. And the string for its name is there. It's in the list. And by all accounts it sure looks like it ought to show up via a call to NvAPI_DRS_EnumAvailableSettingIds, because its entry in the list in .data does have the dword at +0x24 set to 1 (and, for the most part, the NvAPI code seems to use whether that dword is nonzero to decide whether or not to report that a particular setting exists; there are quite a few more settings than NVIDIA publicly documents, which they seem to not want you to mess with).

But, even having done a rebuild of nvidiaProfileInspector with the latest R470 headers (which frankly didn't change a whole lot anyway compared to the older headers), I verified that NvAPI_DRS_EnumAvailableSettingIds most definitely does not report about the existence of 0x10835005. It acts like it just doesn't exist.

And when I added it as a custom ID in the program, that didn't work either. Fetching the value always acts like it's set to 0 (i.e. off), even when I knew from the NVIDIA Control Panel that it was definitely set to a nonzero value on the profile in question. Attempting to set the setting to any value would inevitably cause NvAPI_DRS_SetSetting to return error NVAPI_SETTING_NOT_FOUND. NvAPI is just playing dumb and pretending that this setting simply doesn't exist, despite the fact that it very clearly does exist.

So, this appears to be just another one of those awesome cases where NVIDIA has arbitrarily decided that only they get to touch this setting, and nobody else is allowed to. Because reasons. And because "fuck you" I guess. Time to go buy more $1000+ video cards eh? 🤪

Thanks NVIDIA! (Insert photo of Linus Torvalds flipping off NVIDIA here.)

cjmanca commented 3 years ago

Thanks for your effort, it's too bad to hear that they have it locked down like that. What do you think the chances are of them making it more available in the future?

jgottula commented 3 years ago

Well, it's not necessarily the sort of thing that never will happen... It's maybe plausible that they just, like, forgot to make this a public setting back when it was introduced (in 460, was it?), and for all we know they could go "oh oops, that should have been public, let's go flip that bit and add the definition to the NvAPI headers for the next release".

Or, maybe they're intentionally going for an approach where they keep the existing public settings public to avoid too much uproar, but also deliberately introduce newer settings which are never made publicly accessible, resulting in a gradual decline of the profile API toward lower and lower usefulness levels in the hopes that third parties will stop using it. I dunno.

(To some extent, I wonder why NVIDIA, in their infinite cynical evilness, ever felt the need or desire to make any of this profile settings stuff accessible via a public API in the first place...)

🤷

Fooughhy commented 1 year ago

I'm sorry for reviving this again, but the commit where you referenced this change (https://github.com/Orbmu2k/nvidiaProfileInspector/commit/75c99ea6c71a522835aac785fcb1af7480c2664b), did you actually add the value that you mentioned?

It looks like you only added the "Shader disk cache maximum size" and "Maximum pre-rendered frames" as actual usable values in the commit. Am I wrong?

Orbmu2k commented 1 year ago

grafik

Fooughhy commented 1 year ago

Wow sorry. I tried to find it under "B...". Completely missed it.