[SOLVED] Unable to save /etc/X11xorg.conf for writing
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am using Ubuntu 21.10 with an XFCE desktop on two monitors. I have an ASUS TUF Z590 gfx card installed using nvidia drivers 'nvidia-driver-470 (proprietary tested) from the repository Additional Drivers. The card and drivers are working correctly.
I want to set up the two monitors and for this I use nvidia-settings. When I have completed the settings I select 'Save to X Configuration File' where I am required to authorise and get an error:
Unable to open X config file '/etc/X11/xorg.conf' for writing.
I notice that the is a 'Browse' button to allow me to select an alternative location but I have no idea where to put the settings file. I tried Desktop and again need to authorise, but again get the same error.
When these settings are saved I understand I also need to make sure XFCE settings match.
It seems strange that nvidia-settings allows you to change the settings but not be able to save them. There must be a reason for this so, can anyone enlighten me please?
The contents of the terminal are:
Code:
makem@makems-TUF:~$ nvidia-settings
(nvidia-settings:3600): GLib-GObject-CRITICAL **: 13:42:40.007: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
** Message: 13:42:40.159: PRIME: No offloading required. Abort
** Message: 13:42:40.159: PRIME: is it supported? no
WARNING: Unable to parse X.Org version string.
WARNING: Unable to parse X.Org version string.
Package xorg-server was not found in the pkg-config search path.
Perhaps you should add the directory containing `xorg-server.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xorg-server' found
Error executing /usr/share/screen-resolution-extra/nvidia-polkit: Permission denied
ERROR: Unable to open X config file '/etc/X11/xorg.conf' for writing.
WARNING: Unable to parse X.Org version string.
WARNING: Unable to parse X.Org version string.
Package xorg-server was not found in the pkg-config search path.
Perhaps you should add the directory containing `xorg-server.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xorg-server' found
WARNING: Unable to parse X.Org version string.
Package xorg-server was not found in the pkg-config search path.
Perhaps you should add the directory containing `xorg-server.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xorg-server' found
Error executing /usr/share/screen-resolution-extra/nvidia-polkit: Permission denied
ERROR: Unable to open X config file '/home/makem/Desktop/20-nvidia.conf' for writing.
makem@makems-TUF:~$
Distribution: Manjaro Linux, Ubuntu in Windows 11 WSL2
Posts: 35
Rep:
Quote:
Originally Posted by makem
I am using Ubuntu 21.10 with an XFCE desktop on two monitors. I have an ASUS TUF Z590 gfx card installed using nvidia drivers 'nvidia-driver-470 (proprietary tested) from the repository Additional Drivers. The card and drivers are working correctly.
I want to set up the two monitors and for this I use nvidia-settings. When I have completed the settings I select 'Save to X Configuration File' where I am required to authorise and get an error:
Unable to open X config file '/etc/X11/xorg.conf' for writing.
In most situations, NVIDIA users need to do the following:
1. sudo rm /etc/X11/xorg.conf
2. sudo nvidia-xconfig
3. run nvidia-settings, make their adjustments, and then quit. The settings are stored in ~/.nvidia-settings-rc automatically.
4. Create a start up entry, in your desktop environment, to run the command: nvidia-settings -l (that's a lowercase L) when you log in.
That's it.
Last edited by johnprogrammer; 01-12-2022 at 10:46 PM.
In most situations, NVIDIA users need to do the following:
1. sudo rm /etc/X11/xorg.conf
I think not "most". Xorg has gotten smart over the years. Automagic now works for the vast majority of users, main exception being NVidia users of non-FOSS graphics drivers. The only installations I've made in recent years on which /etc/X11/xorg.conf was created by default are Mageia, where I usually replace the original with one of zero bytes and make it immutable. Debian, Fedora, Mint, openSUSE & *buntu haven't created on here in well over a decade. I suspect Manjaro, Arch, Gentoo, most of the bazillion Debian/Ubuntu derivatives, and others, don't create one either.
This entry is dated 12th January 2022 but I have changed xorg.conf using nvidia-settings a number of times since that date. It seems to be an original entry. I don't see anything to do with dual monitors either other than DP and HDMI.
I removed xorg.conf and another wasn't made. It seems to have no effect which suggest the settings changes I made are saved somewhere else.
I am also wondering where the Ubuntu "Display" settings are saved to enable me to check them.
Distribution: Manjaro Linux, Ubuntu in Windows 11 WSL2
Posts: 35
Rep:
Quote:
Originally Posted by makem
This entry is dated 12th January 2022 but I have changed xorg.conf using nvidia-settings a number of times since that date. It seems to be an original entry. I don't see anything to do with dual monitors either other than DP and HDMI.
I removed xorg.conf and another wasn't made. It seems to have no effect which suggest the settings changes I made are saved somewhere else.
I am also wondering where the Ubuntu "Display" settings are saved to enable me to check them.
To create the xorg.conf file, you run:
sudo nvidia-xconfig
The settings of nvidia-settings, are saved to ~/.nvidia-settings-rc by default.
The settings of nvidia-settings, are saved to ~/.nvidia-settings-rc by default.
From what I have found so far there is no need to create an xorg.conf entry. I feel sure that the Ubuntu "Display" settings are the ones needed but I cannot find them.
~/.nvidia-settings-rc:
Code:
#
# /home/makem/.nvidia-settings-rc
#
# Configuration file for nvidia-settings - the NVIDIA X Server Settings utility
# Generated on Mon Jan 17 00:45:37 2022
#
# ConfigProperties:
RcFileLocale = C
DisplayStatusBar = Yes
SliderTextEntries = Yes
IncludeDisplayNameInConfigFile = No
ShowQuitDialog = Yes
UpdateRulesOnProfileNameChange = Yes
Timer = Memory_Used_(GPU_0),Yes,3000
Timer = Thermal_Monitor_(GPU_0),Yes,1000
Timer = PowerMizer_Monitor_(GPU_0),Yes,1000
# Attributes:
0/SyncToVBlank=1
0/LogAniso=0
0/FSAA=0
0/TextureClamping=1
0/FXAA=0
0/AllowFlipping=1
0/FSAAAppControlled=1
0/LogAnisoAppControlled=1
0/OpenGLImageSettings=1
0/FSAAAppEnhanced=0
0/ShowGraphicsVisualIndicator=0
[DPY:DP-0]/RedBrightness=0.000000
[DPY:DP-0]/GreenBrightness=0.000000
[DPY:DP-0]/BlueBrightness=0.000000
[DPY:DP-0]/RedContrast=0.000000
Nothing in there that is helpful or relevant it seems.
I am considering using the Nouveau drivers. Do you know if I deselect the Nvidia ones in Ubuntu "Additional Drivers" and select instead "Nouveau display driver from xserver-xorg-video-nouveay (open source) that I don't need to uninstall the Nvidia drivers and can swap between the two?
Edit:
I decided to give it a go having researched some. I used Software & Updates, chose Nouveau, applied the changes, rebooted and guess what?
The login appeared on the Primary monitor, success? No, because Ubuntu "Display" settings showed that only one monitor was recognised
I have been a LONG time windows user and although I know some linux, I never tried to make it my default. The X11org.conf save issue (on multiple distros/versions) was just another thing that made me not want to keep trying since I never found an answer in the past and it seemed like such a basic thing...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.