Maassoft / ColorControl

Easily change NVIDIA display settings and/or control LG TV's
GNU General Public License v3.0
829 stars 39 forks source link

Difficulty activating nVidia controller profile: "Error applying NVIDIA-preset (ThrowInvalidOperationException_InvalidOperation_NoValue): Nullable object must have a value." #289

Open Jason-GitH opened 7 months ago

Jason-GitH commented 7 months ago

I cloned the Current Settings, added a name to the new profile, clicked Included on all the settings, and set the Other > Color Profile to the appropriate ICC profile from that SDR gamma 2.2 correction GitHub. The ICC profile DOES work but I get the following error:

image

Few questions regarding the nVidia controller presets: -Should we be enabling the BPC to 10 or 12 on an LG OLED? The NVCP is set to output to 12 bit but the panel is 10 bit. -Why don't the presets show up in the Quick Access menu even though I have checked the box? -I am able to automatically apply an nVidia preset in the PreLaunch step for individual games. However, is there a way to apply an nVidia preset when a game closes? For example, say I am using Windows in SDR, launch a game with an HDR preset, but then close the game. Windows will remain in HDR and not switch back to SDR.

Maassoft commented 7 months ago

I cloned the Current Settings, added a name to the new profile, clicked Included on all the settings, and set the Other > Color Profile to the appropriate ICC profile from that SDR gamma 2.2 correction GitHub. The ICC profile DOES work but I get the following error:

I'll look into that. Maybe it's caused by the cloning. I've attached color profiles to existing presets (SDR/HDR) and have not seen the error.

Should we be enabling the BPC to 10 or 12 on an LG OLED? The NVCP is set to output to 12 bit but the panel is 10 bit.

I didn't see improvements when going from 10 to 12 BPC, so I think it's overkill.

Why don't the presets show up in the Quick Access menu even though I have checked the box?

Every tab has its own "Quick Access" with a different shortcut. You can configure the shortcut via the Settings->Settings button.

I am able to automatically apply an nVidia preset in the PreLaunch step for individual games. However, is there a way to apply an nVidia preset when a game closes? For example, say I am using Windows in SDR, launch a game with an HDR preset, but then close the game. Windows will remain in HDR and not switch back to SDR.

You can switch to the "Finalize steps" (drop down left of text area) and define the actions that must be run after the game/process has been stopped. The "Post-launch steps" are executed right after the process has started.

Jason-GitH commented 7 months ago

en stopped. The "Post-launch steps" are executed right after the process has started.

Hi, here is the error I'm seeing in log. I also tried creating another preset from scratch by using Add and setting all settings to included and still receive same error.

image

I also set one of the presets to Apply at Startup and receive this error: image image

Finally, I wanted to let you know, I am now unable to launch a game from game launcher if one of these presets is applied to Prelaunch steps.

Previously, when I was able to load a game from game launcher, I had attempted to apply two different presets, one at Prelaunch steps and another at Finalize. But the Finalize preset did not apply. This was for Diablo 4.

These are my general settings if curious: image

Maassoft commented 7 months ago

The "Nullable object must have a value" error is caused by applying HDMI settings. This will be resolved in the next release. For now you could excluded the settings from the preset that's causing this (uncheck the "Included" item under HDMI settings).

For the other errors: I suggest excluding specific settings (like the new Scaling option) to see if the preset can be applied successfully. Some combinations might not be valid and could throw a NVAPI error.

Jason-GitH commented 7 months ago

The "Nullable object must have a value" error is caused by applying HDMI settings. This will be resolved in the next release. For now you could excluded the settings from the preset that's causing this (uncheck the "Included" item under HDMI settings).

For the other errors: I suggest excluding specific settings (like the new Scaling option) to see if the preset can be applied successfully. Some combinations might not be valid and could throw a NVAPI error.

Thank you so much! Setting HDMI Settings to Exclude resolved all issues except the Apply on startup error. Btw, your program is very popular among LG OLED TV owners as I'm sure you are aware. There is a Discord called HDR Den run by several GitHub authors including PumboAutoHDR and Lilium ReShade HDR Shaders who also created the excellent Starfield Luma native HDR mod in case you'd like to join and have a place to discuss your awesome utility.

Jason-GitH commented 7 months ago

The "Nullable object must have a value" error is caused by applying HDMI settings. This will be resolved in the next release. For now you could excluded the settings from the preset that's causing this (uncheck the "Included" item under HDMI settings).

For the other errors: I suggest excluding specific settings (like the new Scaling option) to see if the preset can be applied successfully. Some combinations might not be valid and could throw a NVAPI error.

Also, if you are interested, there is an AutoHotKey script that you can use to quickly change the gamma power and the HDR Reference White Level. Instructions here: https://github.com/dylanraga/win11hdr-srgb-to-gamma2.2-icm/issues/31#issuecomment-1837630953

Maassoft commented 7 months ago

Thanks for the links! In the mean time I was already looking if maybe ColorControl can create color profiles on the fly based on a couple of input parameters (gamma, SDR brightness, min/max nits). One missing "link" was the implementation of the SRGB_INV_EOTF function after I've already found the (inverse) PQ EOTF functions. But that function is right there in the AHK script.

Jason-GitH commented 7 months ago

Thanks for the links! In the mean time I was already looking if maybe ColorControl can create color profiles on the fly based on a couple of input parameters (gamma, SDR brightness, min/max nits). One missing "link" was the implementation of the SRGB_INV_EOTF function after I've already found the (inverse) PQ EOTF functions. But that function is right there in the AHK script.

If you are interested in incorporating Windows tone mapping/EOTF functionality into CC, it might be worth checking out this small program as well (https://github.com/ledoge/set_maxtml) which allows you to set maxTML values (and also forces maxFFTML = maxTML and minTML = 0). This app is useful because Windows 11 HDR Calibration app ICC profiles seems to cause some random issues (like setting minTML to 0.01 nits or setting maxTML to 240 nits).

Filoppi commented 6 months ago

@Maassoft we have a discord channel (focused on HDR) where we discuss all this kind of stuff between devs: https://discord.gg/vMsT5SzJqN you are welcome to join :).