linux ubuntu 19.04

It seems that you can not save any configuration. In ubuntu 19.04 drivers gtx 970 clean installation.
( unable to open X file "/etc/X11/xorg.conf " for writing ).
Try to use impossible xrandr I have been noticing on my 2 monitors and in many people with the same problem.

Sorry for my English

You have to use
sudo nvidia-settings
to be able to write to xorg.conf

Yes… but how?

https://postimg.cc/MMnh0b3W

It is correct and I have the same error.
The only solution to have correctly is to install Ubuntu 18.10 to adjust the resolution and then update. Apparently driver 418.56 has a problem.
The sudo nvidia-settings does not work.

same issue here…

So in order to find out what is causing the problem, I ended up uninstalling Ubuntu and changing to different distribution (Manjaro) and to different desktop environment (Xcfe) and to surprise of nobody, the problem with saving the xconfiguration file remains exactly the same. Then I figured out what is causing the problem.

First of all, the file /etc/X11/xorg.conf does not exist.

So, I created the file in terminal by typing sudo nano /etc/X11/xorg.conf and pressing enter
then I pressed ctrl-o to save the empty xorg.conf file
then I closed the nano editor with ctrl-x

Now there is the file but it is read only so still the nvidia settigs cant save… therefore one more fix.

In terminal give the following command:
chmod u=rw,g=rw,o=rw /etc/X11/xorg.conf

now everyone has read and write access to that file. Note: I am not sure if this compromises something security-wise but after that command my Nvidia x server settings no longer gives error message when saving settings.

Let me know if that works for you too!

TLDR:
1 open terminal
2 sudo nano /etc/X11/xorg.conf
3 save and quit
4 chmod u=rw,g=rw,o=rw /etc/X11/xorg.conf
5 enjoy saving settings

However…

There is another problem.

The settings are NOT loaded from that /etc/X11/xorg.conf file when I reboot.
No matter how many times I save settings to that xorg.conf file, after every reboot the options to Force Composition Pipeline and Force Full Composition Pipeline are always unchecked even if I checked them last time and saved to x configuration file after that.

So the only theory I have left is that we are supposed to use some other unknown file name to save the settings in some other place such that the settings would be loaded upon reboot.

Any ideas?

Plot thickens. It seems like the correct file to save to is in fact /etc/X11/mhwd.d/nvidia.conf
Alas, after saving the settings to that, I get a different problem.
When I reboot, I only get black screen and cursor, desktop will not load.
However, if I press ctrl-alt-f6 and then ctrl-alt-f7 I then get to the desktop.
I am confused. I dont want to do a dance every time I reboot :)

Interesting.
From googling it looks like mhwd.d is Manjaro specific.

Anyone tried beta drivers from nvidia?
I’ll give that a go this evening, but not optimistic.

Please open terminal and type this:
ls -R /etc/X11

Is there an nvidia.conf in there somewhere?

Based on my findings I am pretty sure it is not a driver issue. It is a file issue as in you need to know what file the settings are actually loaded from on bootup and nvidia-settings needs permission to write to that file. Also this absolutely needs to be more intuitive and documented in a much more obvious way!

I’m on 19.04 - the same issues persist even with fixes suggested in this thread.
I’ve tried blowing away and recreating the xorg.conf file via various means, settings permissions on the file and so on.

The nvidia-settings app is unable to write the settings regardless of file type, name, location, permissions. It will write to nothing at all throwing up the error of being “unable to open the file for writing” whatever happens.

As for it not applying - I’ve found the same thing but really, all that happens 99% of the time is the machine boots to a black screen with a flashing cursor for my X session until I remove any config file I create manually and reboot.

Any news / help on this gratefully received.