1

I am using nvidia-352 with nvidia-prime. To fix the tearing issue(well known) I was trying to add options in /etc/X11/xorg.conf. But after restart nvidia or prime replace xorg.conf file.

My question is that, how can I add options in xorg.conf so that it will persist after restart? There should be a xorg configuration generation script. nvidia-prime wiki page doesn't have any information about this.

shantanu
  • 8,599

1 Answers1

1

Don't edit /etc/X11/xorg.conf. Applications like nvidia-settings have a bad habit of overwriting it. Use separate .conf files in /etc/X11/xorg.conf.d instead. From man xorg.conf:

Additional configuration  files  are  searched  for  in  the  following
directories when the server is started as a normal user:

    /etc/X11/<cmdline>
    /etc/X11/<cmdline>
    /etc/X11/xorg.conf.d
    /etc/X11/xorg.conf.d

where  <cmdline> is a relative path (with no “..” components) specified
with the -configdir command line option.

When the Xorg  server  is  started  by  the  “root”  user,  the  config
directory search locations are as follows:

    <cmdline>
    /etc/X11/<cmdline>
    /etc/X11/<cmdline>
    /etc/X11/xorg.conf.d
    /etc/X11/xorg.conf.d

where  <cmdline> is the path specified with the -configdir command line
option (which may be absolute or relative).
muru
  • 197,895
  • 55
  • 485
  • 740
  • Thank you for quick reply. I already have /etc/X11/xorg.conf. Does xog.conf.d/nvidia.config override default xorg.conf options? I found out that xorg.conf.d/ directory contains specific file name like 20-intel.conf. What should be the file name for nvidia device? – shantanu Oct 25 '15 at 05:56
  • 1
    @shantanu you can name it whatever you like - you can use a leading number to ensure and ordering (like 30-nvidia-is-annoying.conf). From what I understand of the manpage, the files in the directory are read after xorg.conf, so it should override options in that file. – muru Oct 25 '15 at 06:01