Unable to save nvidia settings using nvidia x server settings

Hello everyone, first of all thank you for your time

very new to linux using manjaro, and my level of understanding what I am doing wrong is quite low

I installed manjaro few days ago, and followed the guide wiki manjaro org index php Configure Graphics Cards

when consulting the driver installed this is what I get at terminal using inxi -G

Graphics:
  Device-1: NVIDIA GA104 [GeForce RTX 3060 Ti GDDR6X] driver: nvidia
    v: 550.90.07
  Display: x11 server: X.Org v: 21.1.13 with: Xwayland v: 24.1.0 driver: X:
    loaded: N/A failed: nvidia gpu: nvidia,nvidia-nvswitch s-res: 1920x1080
    resolution: 1: 1920x1080
  API: EGL v: 1.5 drivers: kms_swrast,nvidia,swrast
    platforms: gbm,x11,surfaceless,device
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 550.90.07
    renderer: NVIDIA GeForce RTX 3060 Ti/PCIe/SSE2
  API: Vulkan v: 1.3.279 drivers: nvidia surfaces: xcb,xlib

So then I try to follow the guide wiki manjaro org index php Configure_NVIDIA_(non-free)_settings_and_load_them_on_Startup

but when I open Nvidia Xserver Settings, configure everything, and try to save the configuration from the tab X server Display configuration, this is what I get

Unable to open X config file /etc/X11/xorg.conf for writing

I am stucked here, anyone with patience willing to help?

thank you very much again for your time

I can see that you are a “newbie” user by what you write, although what has made me more suspicious is the nickname.

Being a newbie I don’t recommend you to edit /etc/X11/xorg.conf because in most cases it is not necessary, you will have an option to configure the screens in graphical mode.

It won’t let you because it needs root permissions, if you don’t get what you want you can come back here and ask a more specific question about what you intend to configure the display for.

1 Like

Hello @newbie_learning,

the file you have to look for is here:

/etc/X11/mhwd.d/nvidia.conf

X11 looks for config-file in ‘/etc/X11/’. If there is no ‘xorg.conf’ it looks for the directory '/etc/X11/xorg.conf.d/'.
And there are your configs for your X.

You can have a look to this folder with:

ls -la /etc/X11/xorg.conf.d/

Files with lower number will load first. Files which where loaded later can overwrite settings from earlier files.
So you can see the file '90.mhwd.conf' which was made by mhwd while installing your nvidia drivers. And '90.mhwd.conf' is only a symlink to the nvidia.conf I mentioned above.

If the setting from nvidia-settings-manager work for you, you can save it in your home-directory and replace (for example) the content of the old file with the content of the file in your home-directory.

Edit: Don’t forget to make a backup from the old file befor you start modify it. :slightly_smiling_face:
Edit2: Correct the path above /etc/mhwd.d/ to the right one /etc/X11/mhwd.d/

1 Like

You don’t, with Nvidia drivers, see the post above. Manjaro set the xorg config file to /etc/mhwd.d/nvidia.conf

Start Nvidia Settings with sudo nvidia-settings from terminal, do your configuration, and save to /etc/mhwd.d/nvidia.conf, then reboot, confirm changes are saved properly.

2 Likes

GNOME and KDE have utilities for basic display configuration, the problem with modifying xorg.conf is that if you get it wrong, it may not start GDM or SDDM either.

1 Like

If you have Nvidia video card, use Nvidia Settings to configure your video settings. Use Nvidia Settings with sudo to save the settings to the system. That is how you should do it.

You can always use xrandr too if you want, but that is not how you properly configure Nvidia video card with Nvidia drivers.

There is no breakage of Xorg using Nvidia Settings to configure, apply, and then save your settings.

I insist, if you are a novice user it is not recommended to modify xorg.conf but if you are not… neither.

Examples with which you will get a black screen with GDM or SDDM:

Option "metamodes" "DP-0: 1920x1080_145" (when 145 is not a valid refresh rate).
Option "metamodes" "DP-0: NULL"
Option "metamodes" "DP-0: 1920x1080_144" (when switching monitors and 144Hz is not supported).

etc.

It is best to set it to automatic, i.e. not to modify it.

Being a novice user, turning on the computer and seeing a black screen is not nice.

On the other hand the query is vague, which is what I have kindly tried to answer, he has asked that he wants to change xorg.conf but you have not said why, maybe he just wants to change the resolution, or maybe he thinks it is necessary without knowing why.

I guess we’re all doing it wrong since all these years then. Dang it!
I repeat there is no breakage of Xorg configuring and saving settings to the system with Nvidia Settings.

Don’t get angry, man.

Are you making things up on purpose or do you just not understand anything? First trying to imply that Nvidia Settings will save NULL value or invalid refresh rate and breaking Xorg, and now trying to spin things up saying I get angry?

Whatever thread has been answered, user knows how to save Nvidia settings to xorg config now. Forum search is here fo other questions and information.

Try not to take offense; his English comprehension is limited. Couple that with arrogance and it becomes volatile.

thank you everyone, I really appreciate your time and the answers

I assume I have to polish my explanations so we can navigate this topic with the proper approach

so maybe it will be a good starting point to put in place my current status using the manjaro machine:

  • I am using it by now as a linux learning environment, so I am not holding any important data
  • I barely manage to input the codes I see in the guides, and in videos with instructions
  • Have a difficulty understanding how the archive system and its use, and user privilegies work to address this topic
  • the purpose on doing this operation of saving the data, is to conclude the instructions of the manjaro wiki of cofiguration and that configuration to be loaded at start up
  • my thought behind was that now I might have the concurrence of several drivers installed and ignore what is in use
  • playing few games I would like to be able to change the refresh rate and to set up an specific resolution, together with some more features that my graphic card permit to tweak

I put in value all the inputs that you have given, and I see that they differ on what should I do. My question here is, why manjaro wiki personnel set up those articles if we shouldnt touch the configurations? as a person learning I want to play with the machine and learn how to set up and stable reliable environment that can deliver the same usability con configuration capabilities as my previous machine using dhjfgdjshgfs spyware operative systems from bigtech companies.

I initiated the nvidia settings using sudo form terminal. The interface is opening, and this line is shown at terminal automatically at opening:
(nvidia-settings:1925): GLib-GObject-CRITICAL **: 13:43:39.405: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

the values that I try to store are simply the refresh rate and resolution 60hz and 1920x1080. I know they are going to be loaded by default automatically, but the aiming point is to learn how to have the control, and also to conclude the instructions from the manjaro wiki article

so then I click on apply the values, then I try to save, now it doesnt give me back the dialog Unable to open X config file /etc/X11/xorg.conf for writing.

the address /etc/x11 is showing the following
folder mhwd.d
folder xinit
folder xorg.conf.d
xorg.conf
xorg.conf.backup

so the file has been created under sudo privileges.

terminal is giving me this output 24 times

(nvidia-settings:1925): dconf-WARNING **: 19:03:01.208: failed to commit changes to dconf: Error spawni
ng command line “dbus-launch --autolaunch=4f7b0c1ca2ad46bfbdef64493ff1364c --binary-syntax --close-stde
rr”: Child process exited with code 1

for obvious reason I dont understand the content of this warning. but nvidia settings interface have closed automatically

rebooting the machine… and after that, I launch again sudo nvidia-settings. Interface opens, and terminal reply back (nvidia-settings:1925): GLib-GObject-CRITICAL **: 13:43:39.405: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

values at tab X server display configuration are in auto, so the information is not being recognized.
If I reconfigure the settings, and save the values, it will permit me to save. and terminal If I retry to save is saking to merge with the previous values.
If I select quit after this operation this message is shown:
you have pending changes on the following page: X server display configuration apply. do you really want to quit?

that is my progress by now
still in need of help please
thank you very very much for your time

thank you very much for your time mate

was taking a look and I dont have the folder
/etc/mhwd.d/nvidia.conf

the one that I have is
/etc/X11/mhwd.d

inside I have the files
/etc/X11/mhwd.d/nvidia.conf
/etc/X11/mhwd.d/ nvidia.conf.nvidia-xconfig-original

when executing
ls -la /etc/X11/xorg.conf.d/
I get this info in terminal

total 16
drwxr-xr-x 2 root root 4096 jul  4 21:25 .
drwxr-xr-x 5 root root 4096 jul  6 19:28 ..
-rw-r--r-- 1 root root  232 jul  4 21:04 00-keyboard.conf
-rw-r--r-- 1 root root  131 jun 11 06:39 30-touchpad.conf
lrwxrwxrwx 1 root root   27 jul  4 21:25 90-mhwd.conf -> /etc/X11/mhwd.d/nvidia.conf

how would you proceed?

thank you very much for your time mate,

could you please confirm that the direction is /etc/mhwd.d/nvidia.conf

because I have that folder mhwd.d inside the folder X11

how would you proceed?

thank you very much

Oh sorry may fault

 /etc/X11/mhwd.d/

is the right directory. I missed the X11 and corrected the post above.

Edit:

This error occours because the file doesnt exists. If you choose

/etc/X11/mhwd.d/nvidia.conf

as savefile it should work … I guess (if you run nvidia-settings-manager with sudo).

Before dont miss the backup:

sudo cp /etc/X11/mhwd.d/nvidia.conf /etc/X11/mhwd.d/nvidia.bak

If directly saving to /etc/X11/mhwd.d/nvidia.conf doesn’t work you can still save the settings file to your home directory. Which I would prefer. :slightly_smiling_face:

1 Like

thank you very much for the help and the time

I confirm your instructions worked out

sudo nvida-settings

configure screen settings

save to the direction
/etc/X11/mhwd.d/nvidia.conf choosing this file to store the settings

when rebooted the settings where stored

then I was able to finish the manjaro wiki article Configure_NVIDIA_(non-free)_settings_and_load_them_on_Startup

so my question now is… is there any string we could pull to request our nice developers to ease this process? :smiley: asking this from my complete ignorance about everything :sweat_smile: on such a way that the path for the saving option at nvidia-settings is the correct one by default and when initiating nvidia-settings you are brought a prompt to enter password to log as sudo?¿ :nerd_face: