xorg.conf cannot be overwritten to allow two monitors to function between reboots - Intrepid 8.10

Asked by pistonpilot

I have Ubuntu 8.10 Intrepid loaded on my laptop and desktop. I have 4 monitors. I am running an ATI video card on my desktop and it remembers the monitor configuration. I did not load the ATI drivers other than what comes native in Ubuntu's install.

My problem is the laptop with an Nvidia card. I have to use NVIDIA X Server Settings from ADMINISTRATION to make my second monitor come to life.

Laptop is a HP Pavillion dv6000 with a GeForce Go 7400. Native laptop screens runs 1280X800 and my second monitor is a 22 inch Flatron L222WS by LG running 1680x1050.

If I manually turn on the monitor in twinview at each boot it runs fine.

If I try to use the Save to X configuration file button, I get this error:

Unable to create new X config backup file '/etc/X11/xorg.conf.backup'

Click OK

This is what is in my xorg.conf file:

pistonpilot@hp:/etc/X11$ more xorg.conf
# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# Note that some configuration settings that could be done previously
# in this file, now are automatically configured by the server and settings
# here are ignored.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "Monitor"
 Identifier "Configured Monitor"
EndSection

Section "Screen"
 Identifier "Default Screen"
 Monitor "Configured Monitor"
 Device "Configured Video Device"
 DefaultDepth 24
EndSection

Section "Module"
 Load "glx"
EndSection

Section "Device"
 Identifier "Configured Video Device"
 Driver "nvidia"
 Option "NoLogo" "True"
EndSection

pistonpilot@hp:/etc/X11$

Here is a preview of my xorg.conf file from the X Server Settings App

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 1.0 (buildd@palmer) Mon Nov 3 08:46:46 UTC 2008

# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# Note that some configuration settings that could be done previously
# in this file, now are automatically configured by the server and settings
# here are ignored.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "ServerLayout"
    Identifier "Layout0"
    Screen 0 "Screen0" 0 0
EndSection

Section "Module"
    Load "glx"
EndSection

Section "ServerFlags"
    Option "Xinerama" "0"
EndSection

Section "Monitor"
    Identifier "Configured Monitor"
EndSection

Section "Monitor"
    Identifier "Monitor0"
    VendorName "Unknown"
    ModelName "LG L222W"
    HorizSync 28.0 - 83.0
    VertRefresh 56.0 - 75.0
EndSection

Section "Device"
    Identifier "Configured Video Device"
    Driver "nvidia"
    Option "NoLogo" "True"
EndSection

Section "Device"
    Identifier "Device0"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    BoardName "GeForce Go 7400"
EndSection

Section "Screen"
    Identifier "Default Screen"
    Device "Configured Video Device"
    Monitor "Configured Monitor"
    DefaultDepth 24
EndSection

Section "Screen"
    Identifier "Screen0"
    Device "Device0"
    Monitor "Monitor0"
    DefaultDepth 16
    Option "TwinView" "1"
    Option "metamodes" "CRT: nvidia-auto-select +1280+0, DFP: nvidia-auto-select +0+0"
    SubSection "Display"
        Depth 16
    EndSubSection
EndSection

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu xorg Edit question
Assignee:
No assignee Edit question
Solved by:
Tom
Solved:
Last query:
Last reply:
Revision history for this message
Andy Ruddock (andy-ruddock) said :
#1

The nvidia-settings program doesn't run as root from the administration menu, and it has no "unlock" button as many of the other admin tools do.

Open a terminal and run :

gksudo nvidia-settings

This will run nvidia-settings with the appropriate rights to overwrite the xorg.conf file.

Revision history for this message
Best Tom (tom6) said :
#2

    i think that meant ... open a terminal window from
Applications - Accessories - Terminal
    type in
sudo nvidia-settings
<enter your user (not root) password>

    I think the gk bit may have been a mistake in which case nothing would have happened
    but then i'm not sure. What happened? Did it work?

    You can always do the change yourself manually from the command line. Type
su
<root password>
cd /etc/X11
ls
cp xorg.conf xorg.bak1
ls
    now compare the listing with the previous one to check that you have made a backup of xorg.conf
gedit xorg.conf
    to open xorg.conf in a text-editor called gedit (any other text-editor will do too)
    Now copy and paste the preview you posted here to totally over-write everything in the xorg.conf file
    Save & close gedit.
    Log-out and login straight back again, unless it's already worked

If this doesn't work then you may need to boot from a LiveCd (such as the Ubuntu installation disc or any other, i prefer Wolvix or Puppy linux Cds for this sort of thing) and then make the changes to xorg.conf through that but make sure you do back-up the original xorg.conf in case of problems.

Good luck :)

Revision history for this message
Tom (tom6) said :
#3

Errr, if you do have problems with any of these answers you may have to bootup using a LiveCd to delete xorg.conf and replace it with your back-up one (just rename it back to xorg.conf)

Revision history for this message
Tom (tom6) said :
#4

Just found out that

gksudo nvidia-settings

was right too (and beat me to it)

Revision history for this message
pistonpilot (pistonpilot) said :
#5

Thank you Tom, you solved the problem. Would you mind telling me how you know this? I never heard of gksudo - what is that? Without the community solving pieces of the problems for others this project would fail.

PistonPilot

Revision history for this message
pistonpilot (pistonpilot) said :
#6

I'm sorry, I clicked on Tom's answer when Andy answered it correctly. Thanks for the help everyone. I'm sorry for the hasty click.

Revision history for this message
Andy Ruddock (andy-ruddock) said :
#7

No problem - glad we could help.

gksudo is like sudo, except that it uses a GUI to ask for the password. for more information on just about any command open a terminal and type "man <command>" where <command> is the command you want more information about.
If you can't remember a command you can use "apropos <keyword>" to help you find it. This searches the description section of each manual page for <keyword>.
For example :

apropos sudo

Returns :
gksu (1) - GTK+ frontend for su and sudo
gksudo (1) - GTK+ frontend for su and sudo
gnome-sudoku (6) - puzzle game for the popular Japanese sudoku logic puzzle
sudo (8) - execute a command as another user
sudo_root (8) - How to run administrative commands
sudoedit (8) - execute a command as another user
sudoers (5) - list of which users may execute what
visudo (8) - edit the sudoers file

The number in brackets after the command is the section number the manual page is in.

Use "man man" for more information about the manual.

Revision history for this message
Tom (tom6) said :
#8

I'm happy with the hasty click :))))

Thanks for those extra Karma points :)

If you do manage to give them to Andy instead that'd be cool but i'm quite happy as it is ;)

Linux and Free Software generally is almost entirely all about the communities almost every time a laptop is returned it's because the person made little or no effort to use forums to get help.

Back in the Windows world there's often an expensive 'Technical Support' line but i've always found that they can't help me (and i still had to pay for the call). A number of times i've even been given a freephone number or a Tech Support persons own mobile number because i got back to them with details on how i fixed an error message they said i couldn't be getting or didn't exist!!

I found out the gksudo wasnt a typo because i found it cropped up in another Answer and then there was somewhere else i stumbled on a link to a manual (i tend to ignore manuals). Then my memory kicked-in (for once) so i got back here to correct my error.

Revision history for this message
Tom (tom6) said :
#9

Anyway

Welcome in pistonpilot & i'm glad you're enjoying the forums so far
Good luck and regards from
Tom

PS Thanks Andy, guess i owe you 1 ;)

Revision history for this message
Tom (tom6) said :
#10

Oh, on a command line you can also get brief help on most commands by typing the name of the command and then type --help For example
gedit --help
to learn more about that text-editor

This usually works in any linux distro from the tiniest to the heaviest ;)