Why won't NVIDIA X Server Settings configuration save on reboot?
Solution 1
I have found that the method of adding lines to different x11 configs was ineffective in my case. As an alternative, I created a bash script that applies my settings automatically at login. Simply enough, I just grabbed what I had changed from the saved xconf
file, which essentially gets us to the desired end. It isn't the most elegant method, but it works...
The file below is my settings for my monitors, you will need to put your own info over mine.
My personal solution was to add these lines directly to .bashrc
:
nvidia-settings --load-config-only
nvidia-settings --assign CurrentMetaMode="DVI-I-1: nvidia-auto-select +0+54, HDMI-0: nvidia-auto-select +1600+0 {viewportout=1792x1008+65+30}"
My original and valid answer was edited to suggest putting it in a separate file and instead of calling the file in .bashrc
. Both are valid. However, I wanted the answer to reflect both methods.
An example bash script:
# Save this to some script.sh
nvidia-settings --load-config-only
nvidia-settings --assign CurrentMetaMode="DVI-I-1: nvidia-auto-select +0+54, HDMI-0: nvidia-auto-select +1600+0 {viewportout=1792x1008+65+30}"
Next, edit .bashrc
or .bash_profile
(whichever you prefer) and add your script there so it runs automatically on login.
Lastly, make your script executable with chmod +x script.sh
Solution 2
It doesn't automatically use this configuration, rather you have to load it manually, for example by one of the methods shown in the readme, or your own favorite way of starting something at login. The command you're looking for is nvidia-settings --load-config-only
.
4. Loading Settings Automatically
The NVIDIA X driver does not preserve values set with nvidia-settings
between runs of the X server (or even between logging in and logging
out of X, with xdm, gdm, or kdm). This is intentional, because
different users may have different preferences, thus these settings
are stored on a per user basis in a configuration file stored in
the user's home directory.
The configuration file is named "~/.nvidia-settings-rc". You can
specify a different configuration file name with the "--config"
commandline option.
After you have run nvidia-settings once and have generated a
configuration file, you can then run:
nvidia-settings --load-config-only
at any time in the future to upload these settings to the X
server again. For example, you might place the above command in
your ~/.xinitrc file so that your settings are applied automatically
when you log in to X.
Your .xinitrc file, which controls what X applications should
be started when you log into X (or startx), might look something
like this:
nvidia-settings --load-config-only &
xterm &
evilwm
or:
nvidia-settings --load-config-only &
gnome-session
If you do not already have an ~/.xinitrc file, then chances are that
xinit is using a system-wide xinitrc file. This system wide file
is typically here:
/etc/X11/xinit/xinitrc
To use it, but also have nvidia-settings upload your settings,
you could create an ~/.xinitrc with the contents:
nvidia-settings --load-config-only &
. /etc/X11/xinit/xinitrc
System administrators may choose to place the nvidia-settings load
command directly in the system xinitrc script.
Please see the xinit(1) manpage for further details of configuring
your ~/.xinitrc file.
Source: ftp://download.nvidia.com/XFree86/Linux-x86_64/1.0-6106/nvidia-settings-user-guide.txt
Related videos on Youtube
Username
Updated on September 18, 2022Comments
-
Username over 1 year
I'm on a 64-bit machine running Debian 8.2 "Jessie" with MATE Desktop Environment.
I have a Geforce GTX 650ti video card.
I'm logged in as a non-superuser account named "john."
I open NVIDIA X Server Settings GUI, change my monitors' brightness from 0.000 to -0.1, go to the "nvidia-settings Configuration" section, click "Save Current Configuration" and click "Quit."
But when I reboot, the brightness is back at 0.000.
Why?
How do I fix this?
-
Username over 8 yearsI made a
~/.xinitrc
file and putnvidia-settings --load-config-only & . /etc/X11/xinit/xinitrc
in it. Still didn't save my changes -
Username over 8 yearsI also edited
/etc/X11/xinit/xinitrc
by replacing the line. /etc/X11/xinit/xinitrc
withnvidia-settings --load-config-only & . /etc/X11/xinit/xinitrc
. Didn't work either. -
D.S over 8 yearsStep one would be to try it without modifying xinitrc & friends, also I don't understand your second comment at all, since that line shouldn't be in that file in the first place. Do you have an .nvidia-settings-rc in your home folder? What happends if you run nvidia-settings --load-config-only?
-
Username over 8 yearsNothing happens when I run
nvidia-settings --load-config-only
-
D.S over 8 yearsAnd you do have a config file from nvidia-settings? I.e. do you have a .nvidia-settings-rc in your home directory?
-
Username over 8 yearsYes. It has the settings I want, where the brightness for each color is -0.10. But running
nvidia-settings --load-config-only
does nothing. -
D.S over 8 yearsAre you sure it does have those values? Because my nvidia-settings (version 358.16) doesn't save the values for brightness in the configuration file, despite pressing the button for saving manually. Editing the file however does make it correctly set the values upon a --load-config-only.
-
Username over 8 yearsJust booted up. Settings did not save.
~/nvidia.settings-rc
has settings likedebian:0[DPY:HDMI-0]/RedBrightness=-0.100000
, but that setting isn't reflected in how the monitor looks.nvidia-settings --load-config-only
does nothing. Neither does running it withsudo
. -
TetraDev over 3 yearsYou, Sir, Are A GENIUS! @x4g0tt3nSou1x Thank you. This has saved me from having to manually reapply my 4+ monitor setup repeatedly. On every login, I had to do it. Now I ran your script idea with my settings and perfect!