Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I want to disable VSync (it's called "Sync to VBlank" in nvidia-settings) for my nvidia graphics card.

But the configuration only takes effect if I start the nvidia-settings tool. After rebooting the system VSync is enabled again and I have to start the program again.

I tried exporting the xorg.conf and putting it in /etc/X11/ but with no success.

So my question is how can I make changes in the nvidia-settings tool persistent?

share|improve this question
1  
Were you root when you tried exporting xorg.conf? nvidia-settings can be used as a regular user, but can not export the changed settings. –  jordanm Aug 28 '12 at 0:37
    
I wasn't root, but I exported it into my home dir and moved it manually + chgrp root. reading rights were set for all –  apparat Aug 28 '12 at 8:36
add comment

2 Answers

Looking into the readme indeed helps sometimes :)

This behaviour is intentional to give different users the chance to have their own settings.

In short the nvidia-settings config file is stored in ~/.nvidia-settings-rc and can be executed by calling nvidia-settings --load-config-only at startup.

For more details, here's the relevant part of the readme:

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.

share|improve this answer
add comment

As an addendum to the previous answer, nvidia-settings only records those attributes related to an X screen in the config file. There are additional settings which can apply to other components; these are not saved.

If you look, all the attributes in the config file are prefixed with {host}:0.0. Other attributes which can be set are related to GPU and so forth.

For example, I used a HDTV connected to an NVidia card and need to reset the Overscan Compensation (to reduce the displayed screen size to fit the physical screen). This can be adjusted from the GUI, but is not stored in the config file. From the command line, the command is:

nvidia-settings --assign :0[gpu:0]/OverscanCompensation[DFP-1]=80

Note that the attribute name includes a GPU specification.

Fortunately, SyncToVBlank is in the config file, so just loading it should set it for you. If you execute the command nvidia-settings --query all it will list all the attributes and the targets to which the apply.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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