Discrepancy between .nvidia-settings-rc and actual settings re OpenGL performance setting

I am trying to persist an OpenGL setting of High Performance instead of the default High Precision.
Each time I reboot and open the nvidia-settings panel, it appears to have switched back to the default.

Upon further inverstigation, I am in a situation where ~/.nvidia-settings-rc contains

yann-Precision-Tower-3620:0.0/OpenGLImageSettings=3

but nvidia-settings -q all gives

 Attribute 'OpenGLImageSettings' (yann-Precision-Tower-3620:0.0): 0.

This is also indicated in the nvidia-bug-report.log
nvidia-bug-report.log.gz (415.6 KB)

Version is 470.57.01
Driver is 460.91.03
OS is KUbuntu 20.04 – suspecting that Plasma might interfering, I disabled compositing during my investigation

Setting the setting in the nvidia-settings GUI and closing the GUI, one then gets

Attribute 'OpenGLImageSettings' (yann-Precision-Tower-3620:0.0): 3.

Even minutes after, so it is not Plasma resetting the thing.

Furthermore, manually editing the config file to

yann-Precision-Tower-3620:0.0/OpenGLImageSettings=2

then doing nvidia-settings -l && nvidia-settings -q all | grep OpenGLImageSettings
gives

Attribute 'OpenGLImageSettings' (yann-Precision-Tower-3620:0.0): 3.

running the GUI still shows the High performance value and closing it causes the config file to be rewritten with

yann-Precision-Tower-3620:0.0/OpenGLImageSettings=3

Running nvidia-settings -V all or nvidia-settings -l -V all shows that it does read the config file but stumbles on an error :

ERROR: Unable to find display on any available system
[repeated many times]
ERROR: Unable to assign attribute OpenGLImageSettings specified on line 31 of configuration file '/home/yann/.nvidia-settings-rc' (no Display connection).
[repeated for each line]

I cannot understand this error because :

  • This is a “plain” desktop system and env contains both a seemingly valid DISPLAY and XAUTHORITY
  • The nvidia-settings GUI is able to actually manipulate the settings ; toying with the gamma correction settings gives live updates in the display.