2

I'm seeing a lot of people having issues of when changing brightness/contrast/gamma through nvidia settings and the settings not loading the next time they log in. I am also having this problem.

I have a feeling the file is being read because for a split second after logging in, before the shell has loaded, the settings are applied, then the settings are reverted and the shell finishes loading.

Then like, everybody else having trouble getting the settings to stick, I open the gui or stick the commands in terminal and the settings are applied no probs.

  • Card: Nvidia 9600 GS
  • Driver: 331.20
  • Distro: Ubuntu 12.04
  • Gnome Shell: 3.4.1

What I've tried:

  • opening nvidia-settings as root and user
  • saving .nvidia-settings.rc in root and user folder in case of conflicts
  • changing the startup application from --load-config-only to -l
  • adding another startup application at the end of the list (including hidden items)
  • removing the hostname from the file
  • adding a 0: before the the settings
  • deleting and regenerating file
  • deleting and regenerating Xorg.conf
  • moving .nvidia-settings.rc to /etc/X11/.

Here is my .nvidia-settings.rc....

RcFileLocale = C
ToolTips = Yes
DisplayStatusBar = Yes
SliderTextEntries = Yes
IncludeDisplayNameInConfigFile = No
ShowQuitDialog = Yes
UpdateRulesOnProfileNameChange = Yes
Timer = Memory_Used_(GPU_0),Yes,3000
Timer = Thermal_Monitor_(GPU_0),Yes,1000
Timer = PowerMizer_Monitor_(GPU_0),Yes,1000

# Attributes:

0/SyncToVBlank=1
0/LogAniso=0
0/FSAA=0
0/TextureSharpen=0
0/TextureClamping=1
0/FXAA=0
0/AllowFlipping=1
0/FSAAAppControlled=1
0/LogAnisoAppControlled=1
0/OpenGLImageSettings=1
0/FSAAAppEnhanced=0
0/XVideoSyncToDisplayID=DVI-I-0
[DPY:DVI-I-0]/Dithering=0
[DPY:DVI-I-0]/DitheringMode=0
[DPY:DVI-I-0]/DitheringDepth=0
[DPY:DVI-I-0]/SynchronousPaletteUpdates=0
[DPY:VGA-0]/RedBrightness=-0.767654
[DPY:VGA-0]/GreenBrightness=-0.767654
[DPY:VGA-0]/BlueBrightness=-0.767654
[DPY:VGA-0]/RedContrast=0.034169
[DPY:VGA-0]/GreenContrast=0.034169
[DPY:VGA-0]/BlueContrast=0.034169
[DPY:VGA-0]/RedGamma=1.633485
[DPY:VGA-0]/GreenGamma=1.633485
[DPY:VGA-0]/BlueGamma=1.633485
[DPY:VGA-0]/Dithering=0
[DPY:VGA-0]/DitheringMode=0
[DPY:VGA-0]/DitheringDepth=0
[DPY:VGA-0]/DigitalVibrance=96
[DPY:VGA-0]/SynchronousPaletteUpdates=0
[DPY:DVI-I-1]/RedBrightness=0.000000
[DPY:DVI-I-1]/GreenBrightness=0.000000
[DPY:DVI-I-1]/BlueBrightness=0.000000
[DPY:DVI-I-1]/RedContrast=0.000000
[DPY:DVI-I-1]/GreenContrast=0.000000
[DPY:DVI-I-1]/BlueContrast=0.000000
[DPY:DVI-I-1]/RedGamma=1.000000
[DPY:DVI-I-1]/GreenGamma=1.000000
[DPY:DVI-I-1]/BlueGamma=1.000000
[DPY:DVI-I-1]/Dithering=0
[DPY:DVI-I-1]/DitheringMode=0
[DPY:DVI-I-1]/DitheringDepth=0
[DPY:DVI-I-1]/DigitalVibrance=0
[DPY:DVI-I-1]/ColorSpace=0
[DPY:DVI-I-1]/ColorRange=0
[DPY:DVI-I-1]/SynchronousPaletteUpdates=0
[DPY:HDMI-0]/Dithering=0
[DPY:HDMI-0]/DitheringMode=0
[DPY:HDMI-0]/DitheringDepth=0
[DPY:HDMI-0]/SynchronousPaletteUpdates=0
1

I had the same issue. I have resolved it with next steps:

  1. Open nvidia-settings and change brightness settings. Close it without explicit save;
  2. Open nvidia-settings again and check that previous modifications are saved;
  3. If modifications were not saved delete .nvidia-settings.rc;

    sudo rm ~/.nvidia-settings-rc

  4. Repeat steps 1 and 2;

  5. When settings are persisted between sessions try to reboot PC;
  6. If after reboot settings are not applied automatically add next command to the Startup Applications:

    sh /usr/local/bin/nvidia_starter

  7. Reboot and check if settings are applied during user login;

BTW. mentioned fix does not cover one more scenario. When you already logged in after switching to other user and back Startup Applications will not be run. To cover this scenario please use next steps:

  • Create nvidia_watcher script in /usr/local/bin/ folder and add +x flag to it;

#!/bin/bash
debug=false
log_file="/var/log/nvidia_settings.log"
log () {
    if $debug ; then
    echo "`date "+%d/%m/%y %H:%M:%S"` :: $@" >> $log_file
    fi
}
dbus-monitor --sesion 
"type='signal',interface='com.canonical.Unity.Session',member='Unlocked'" | while  read line ; do 
    if [[ "$line" == *member=Unlocked* ]] 
    then
        log "$line"
        sh /usr/local/bin/nvidia_starter &
    fi
done
  • It will run nvidia_starter script each time 'switch user' operation is performed;

  • Create nvidia_starter script in /usr/local/bin/ folder and add +x flag to it;


#!/bin/bash
debug=false
log_file="/var/log/nvidia_settings.log"
log () {
if $debug ; then
    echo "`date "+%d/%m/%y %H:%M:%S"` :: $@" >> $log_file
fi
}
sleep 4
log "initializing nvidia settings."
nvidia-settings -l >> $log_file
log "nvidia settings initialized."
  • And after all add nvidia_watcher to the Startup Applications.
  • +1 for effort! It's a bit crazy to have to go through these lengths to achieve expected behaviour. – captain_G Oct 6 '15 at 19:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.