When trying to save new X configuration, I get an error message: Failed to parse existing x config file '/etc/X11/xorg.conf'

Bug #477309 reported by Henning_Vejlen
102
This bug affects 16 people
Affects Status Importance Assigned to Milestone
nvidia-settings (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Binary package hint: nvidia-settings

This is a new bug seen in Ubuntu 9.10. In previous versions I was able to save x configuration with the help of the sudo command.

But here it looks like the file /etc/X11/xorg.conf has a changed structure or layout, at least compared to what Nvidia expects.

ProblemType: Bug
Architecture: i386
Date: Sat Nov 7 11:33:53 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/nvidia-settings
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
NonfreeKernelModules: nvidia
Package: nvidia-settings 180.25-0ubuntu1
ProcEnviron:
 LANG=da_DK.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: nvidia-settings
Uname: Linux 2.6.31-14-generic i686

Revision history for this message
Henning_Vejlen (hjn-vejlen) wrote :
Revision history for this message
TJ (tj) wrote :

Confirmed here with a clean install of Karmic (64-bit) and the restricted '185' driver installed by jockey.

-----
apt-cache policy nvidia-glx-185
nvidia-glx-185:
  Installed: 185.18.36-0ubuntu9
  Candidate: 185.18.36-0ubuntu9
-----

When run from a terminal nvidia-settings reports:

-----
nvidia-settings

VALIDATION ERROR: Data incomplete in file /etc/X11/xorg.conf.
Undefined Device "(null)" referenced by Screen "Default Screen".

Segmentation fault
-----

The default /etc/X11/xorg.conf, in its Screen section, doesn't declare a Device. Adding one to the Screen section solves the problem:

Section "Screen"
 Identifier "Default Screen"
 DefaultDepth 24
 Device "Default Device"
EndSection

Changed in nvidia-settings (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
TJ (tj) wrote :

I think the issue may be in jockey if it is responsible for generating the xorg.conf that omits the Device reference.

Revision history for this message
Vik (vik-catalyst) wrote :

Just done a clean install of Karmic, an apt-get upgreade used the "Hardware drivers" to install the nvidia driver and got exactly the same fault. This could make using twin screens awkward.

Revision history for this message
Delan Azabani (azabani) wrote :

It's because you aren't running nvidia-settings as root; I get the problem only when running as myself, when root the problem doesn't appear. Run gksudo nvidia-settings

Revision history for this message
hugo_laffez (lars-lydersen) wrote : Re: [Bug 477309] Re: When trying to save new X configuration, I get an error message: Failed to parse existing x config file '/etc/X11/xorg.conf'

It is not correct, of course I know that I have to run as root,
otherwise the program cannot write xorg.conf. I did however find a
solution. Its not nvidia-settings, but rather the xorg.conf shipped with
karmic. I had to delete and regenerate xorg.conf. Afterwards it worked fine.

On 2010-02-21 11:05, Delan Azabani wrote:
> It's because you aren't running nvidia-settings as root; I get the
> problem only when running as myself, when root the problem doesn't
> appear. Run gksudo nvidia-settings
>
>

Revision history for this message
sciencequeen (stephanie-hendy) wrote : Re: [Bug 477309] Re: When trying to save new X configuration, I get an error message: Failed to parse existing x config file '/etc/X11/xorg.conf'

I tried running it under root and I still got the same problem.

On Sun, Feb 21, 2010 at 2:05 AM, Delan Azabani <email address hidden>wrote:

> It's because you aren't running nvidia-settings as root; I get the
> problem only when running as myself, when root the problem doesn't
> appear. Run gksudo nvidia-settings
>
> --
> When trying to save new X configuration, I get an error message: Failed to
> parse existing x config file '/etc/X11/xorg.conf'
> https://bugs.launchpad.net/bugs/477309
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “nvidia-settings” package in Ubuntu: Confirmed
>
> Bug description:
> Binary package hint: nvidia-settings
>
> This is a new bug seen in Ubuntu 9.10. In previous versions I was able to
> save x configuration with the help of the sudo command.
>
> But here it looks like the file /etc/X11/xorg.conf has a changed structure
> or layout, at least compared to what Nvidia expects.
>
> ProblemType: Bug
> Architecture: i386
> Date: Sat Nov 7 11:33:53 2009
> DistroRelease: Ubuntu 9.10
> ExecutablePath: /usr/bin/nvidia-settings
> InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
> NonfreeKernelModules: nvidia
> Package: nvidia-settings 180.25-0ubuntu1
> ProcEnviron:
> LANG=da_DK.UTF-8
> SHELL=/bin/bash
> ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
> SourcePackage: nvidia-settings
> Uname: Linux 2.6.31-14-generic i686
>
> To unsubscribe from this bug, go to:
>
> https://bugs.launchpad.net/ubuntu/+source/nvidia-settings/+bug/477309/+subscribe
>

Revision history for this message
Scott6368 (scott6368) wrote :

Hugo,
How did you delete and regenerate xorg.conf? Did you just delete and relaunch Nvidia Xserver settings? I get an error when trying to delete xorg.conf. Says I don't have permission. I'm guessing its because I'm running the driver while trying to delete it?

My linux knowledge is measured in hours, but I'm trying to learn quickly.

Thanks,
Scott

Revision history for this message
Vik (vik-catalyst) wrote :

Probably best to not be running X, yeah. Using sudo would probably delete it, but start the PC in rescue mode anyway.

Vik :v)

Revision history for this message
hugo_laffez (lars-lydersen) wrote : Re: [Bug 477309] Re: When trying to save new X configuration, I get an error message: Failed to parse existing x config file '/etc/X11/xorg.conf'

The way to fix it:
*sudo rm /etc/X11/xorg.conf # Removes xorg.conf*
*sudo nvidia-xconfig # Generates new one
gksudo nvidia-settings # Make changes and save them.
*
Good luck! Hugo

On 2010-02-22 05:03, Vik wrote:
> Probably best to not be running X, yeah. Using sudo would probably
> delete it, but start the PC in rescue mode anyway.
>
> Vik :v)
>
>

Revision history for this message
sciencequeen (stephanie-hendy) wrote : Re: [Bug 477309] Re: When trying to save new X configuration, I get an error message: Failed to parse existing x config file '/etc/X11/xorg.conf'

YES!! OMG THANK YOU THANK YOU THANK YOU!!

I don't know how to buy you a beer, but in my heart, it's out there, to
you!!

Stephanie

On Sun, Feb 21, 2010 at 11:25 PM, hugo_laffez <email address hidden>wrote:

> The way to fix it:
> *sudo rm /etc/X11/xorg.conf # Removes xorg.conf*
> *sudo nvidia-xconfig # Generates new one
> gksudo nvidia-settings # Make changes and save them.
> *
> Good luck! Hugo
>
> On 2010-02-22 05:03, Vik wrote:
> > Probably best to not be running X, yeah. Using sudo would probably
> > delete it, but start the PC in rescue mode anyway.
> >
> > Vik :v)
> >
> >
>
> --
> When trying to save new X configuration, I get an error message: Failed to
> parse existing x config file '/etc/X11/xorg.conf'
> https://bugs.launchpad.net/bugs/477309
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “nvidia-settings” package in Ubuntu: Confirmed
>
> Bug description:
> Binary package hint: nvidia-settings
>
> This is a new bug seen in Ubuntu 9.10. In previous versions I was able to
> save x configuration with the help of the sudo command.
>
> But here it looks like the file /etc/X11/xorg.conf has a changed structure
> or layout, at least compared to what Nvidia expects.
>
> ProblemType: Bug
> Architecture: i386
> Date: Sat Nov 7 11:33:53 2009
> DistroRelease: Ubuntu 9.10
> ExecutablePath: /usr/bin/nvidia-settings
> InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
> NonfreeKernelModules: nvidia
> Package: nvidia-settings 180.25-0ubuntu1
> ProcEnviron:
> LANG=da_DK.UTF-8
> SHELL=/bin/bash
> ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
> SourcePackage: nvidia-settings
> Uname: Linux 2.6.31-14-generic i686
>
> To unsubscribe from this bug, go to:
>
> https://bugs.launchpad.net/ubuntu/+source/nvidia-settings/+bug/477309/+subscribe
>

Revision history for this message
Scott6368 (scott6368) wrote :

Thanks Hugo! Worked like a charm!

Scott

Bryce Harrington (bryce)
tags: added: karmic
Revision history for this message
jdelima (jdelima307) wrote :

thanks, too, hugo.

u finally solved my problem of having to configure the x server setting everytime i restart the computer.

j

Revision history for this message
Νίκος Αλεξανδρής (nikos.alexandris) wrote :

Hmmm... unfortunately this does not work for me (using driver 195.36.15 and NV-CONTROL 1.22).

Revision history for this message
Buddy Hoopes (techscout) wrote :

Fresh install of Karmic using the 195 driver also repeats the earlier symptom of not being able to save the xorg.conf file. Running gksudo /usr/bin/nvidia-settings lists a few lines that may help:

/etc/X11$ gksudo nvidia-settings
Traceback (most recent call last):
  File "/usr/share/screen-resolution-extra/nvidia-polkit.py", line 75, in <module>
    operation_status = main(options)
  File "/usr/share/screen-resolution-extra/nvidia-polkit.py", line 51, in main
    exit_code = conf.backupAndWriteXorgConf([options.backup_filename, options.filename])
  File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 68, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 140, in __call__
    **keywords)
  File "/usr/lib/pymodules/python2.6/dbus/connection.py", line 620, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/dbus/service.py", line 649, in _message_cb
    (candidate_method, parent_method) = _method_lookup(self, method_name, interface_name)
  File "/usr/lib/pymodules/python2.6/dbus/service.py", line 244, in _method_lookup
    raise UnknownMethodException('%s is not a valid method of interface %s' % (method_name, dbus_interface))
UnknownMethodException: org.freedesktop.DBus.Error.UnknownMethod: Unknown method: backupAndWriteXorgConf is not a valid method of interface com.ubuntu.ScreenResolution.Mechanism

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

Revision history for this message
taur (taur) wrote :

The fix does not work for me either, I get the same output as Buddy Hoops

Revision history for this message
zimcomm@hotmail.com (zimcomm) wrote :

I have the same problem as #15 and #16.

I have already tried #10 and it did not work for me.

Running 9.10

Revision history for this message
Luiz Carlos Geron (luizgeron) wrote :

I'm running kubuntu 10.04 and had the same problem. First, it would fail to parse the xorg.conf file, so i removed it and ran nvidia-xconfig. It warned me that pkg-config was not found, so I installed it and ran nvidia-xconfig again. Now nvidia-settings kept saying "Unable to open X config file '/etc/X11/xorg.conf' for writing.", so I ran it from konsole and noticed this:

Traceback (most recent call last):
  File "/usr/share/screen-resolution-extra/nvidia-polkit.py", line 20, in <module>
    import gtk, gobject, sys, dbus, logging, os, re
ImportError: No module named gtk

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

So I installed the package python-gtk2 and ran nvidia-settings again. It worked perfectly.

Revision history for this message
mando (marcolivier-buob) wrote :

The solution proposed by Luiz Carlos works fine (kubuntu lucid).
The nvidia-settings's maintainer should add a dependancy to fix this bug.

Summary :

sudo aptitude update
sudo aptitude safe-upgrade
sudo aptitude install python-gtk2
sudo rm /etc/X11/xorg.conf
sudo nvidia-xconfig
sudo nvidia-settings

Cheers,
mando

Revision history for this message
Nick Moore (wln2qp-nick) wrote :

Can confirm same problem in 11.10 Ocelot ... on a very minimalist install, nvidia-settings complains to stderr when trying to save xorg.conf:

    sh: pkg-config: not found
    Traceback (most recent call last):
      File "/usr/share/screen-resolution-extra/nvidia-polkit.py", line 20, in <module>
        import gtk, gobject, sys, dbus, logging, os, re
    ImportError: No module named gtk

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

installing 'pkg-config' and 'python-gtk2' fixes the problem. It probably should also be dependent on 'nvidia-current' or something.

piotr zimoch (ebytyes)
Changed in nvidia-settings (Ubuntu):
status: Confirmed → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nvidia-settings (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.