How to Automake xorg.conf

Write tutorials and howtos in here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please. Before you post please read this

How to Automake xorg.conf

Postby beefstu on Fri Mar 26, 2010 10:39 am

This tutorial shows how to make an xorg.conf file automatically if one was not created by default and you need it to add a new resolution for example.

Most of this is done by dropping to a terminal session and you will therefore not be able to see this page whilst you are doing it, therefore it is a good idea to read all this through and make sure you understand it and then either write it down or print it out before starting. Save and close any work you have open before starting too.


First drop to a terminal by pressing Ctrl+Alt+F1 Log in with your usual Username and Password.

Then
Code: Select all
sudo stop *dm
where the * you replace with the letter which represents your desktop manager --> g for Gnome, k for KDE or x for xfce
Then put in your password

once that has finished,
Code: Select all
sudo Xorg -configure

This will then create an xorg.conf file in your home directory.

Once this is done,
Code: Select all
startx

and you will be bought back to the desktop.

To make the computer use the xorg file next time you boot, create a file in /etc/X11/xorg.conf either by navigating to that folder and Right-click 'Open as Root' and then create a new file or
Code: Select all
gksudo gedit /etc/X11/xorg.conf
(or the relevant code for KDE etc(kdesudo kate /etc/X11/xorg.conf (i think)))
and paste into it what is in the xorg.conf file in your Home directory and click save.

You now need to reboot to check the file works before you try to change anything in it. If like me when you go to the shutdown icon, shutdown and reboot are both greyed out, drop to a different terminal Ctrl+Alt+F2, login with usual details again and
Code: Select all
sudo reboot
then your password.

It should boot you to your desktop as usual, however if it fails, you will get a pop-up which says "Ubuntu is running in low-graphics mode". To solve this you can do one of the following things:

1. Click OK on the message then with "Run Ubuntu in low graphics mode for just one session" selected, click OK, it will go to the normal login screen/desktop but usually at a very low resolution, then go to /etc/X11Right-click 'Open as root' the delete the xorg.conf file and reboot
OR
2. Click OK on the message then select "Reconfigure Graphics" then OK then select "Use Default (generic) Configuration" then click ok, unless you have a backup configuration which worked, in which case select the third option on that list and locate your backup file. Once it has reconfigured your graphics, keep clicking cancel on all the prompts which will leave you at a command-line login, where you can use your normal details to login then
Code: Select all
sudo reboot

OR
3. If the problem only occurred after you changed something in the file, click OK on the first message, the select "troubleshoot the error" then OK then "Edit Configuration file"
then either comment out your changes (with a # at the begging of the line) or delete what you changed. Click Close then keep clicking Cancel on all the prompts to be dropped to a command-line where you can login with usual details then
Code: Select all
sudo reboot
.


I welcome feedback if anyone has any problems or thinks something needs better explaining
Last edited by Oscar799 on Thu May 13, 2010 9:23 am, edited 3 times in total.
Reason: Amended title to make clear its a How-to guide
Please go through the steps here when posting a question. Once your question has been resolved, edit the original question post and add [Solved] to the subject. Both of these will help others use the forum effectively.
User avatar
beefstu
Level 5
Level 5
 
Posts: 654
Joined: Tue Dec 29, 2009 10:22 am
Location: Southampton, UK

Linux Mint is funded by ads and donations.
 

Re: Automake xorg.conf

Postby remoulder on Fri Mar 26, 2010 10:56 am

Good post beefstu, was thinking of something similar myself. My only comment is the last couple of paragraphs are not all that clear IMO.
[Edit] your original post and add [SOLVED] once your question is resolved.

“The people are my God” stressing the factor determining man’s destiny lies within man not in anything outside man, and thereby defining man as the dominator and remoulder of the world.
User avatar
remoulder
Level 17
Level 17
 
Posts: 7667
Joined: Fri May 09, 2008 1:14 pm

Re: Automake xorg.conf

Postby beefstu on Fri Mar 26, 2010 11:16 am

Thanks remoulder, I've changed that last paragraphs to make them more clear and accurate. I purposefully broke my xorg.conf file so I could get the correct wording :lol: !
Please go through the steps here when posting a question. Once your question has been resolved, edit the original question post and add [Solved] to the subject. Both of these will help others use the forum effectively.
User avatar
beefstu
Level 5
Level 5
 
Posts: 654
Joined: Tue Dec 29, 2009 10:22 am
Location: Southampton, UK

Re: Automake xorg.conf

Postby remoulder on Fri Mar 26, 2010 2:18 pm

beefstu wrote:I purposefully broke my xorg.conf file so I could get the correct wording

Bit drastic! 1 merit badge for devotion to the cause :D Seems much clearer now, thanks.
[Edit] your original post and add [SOLVED] once your question is resolved.

“The people are my God” stressing the factor determining man’s destiny lies within man not in anything outside man, and thereby defining man as the dominator and remoulder of the world.
User avatar
remoulder
Level 17
Level 17
 
Posts: 7667
Joined: Fri May 09, 2008 1:14 pm

Re: How to Automake xorg.conf

Postby trampintransit on Tue Jun 15, 2010 12:52 pm

gksudo gedit /etc/X11/xorg.conf

after this bit i get...

(gksudo;2133) Gtk-WARNING cannot open display

I have now dedicated about 10hours to trying to make this install work, i'm very close to wiping the install and seeing if ubuntu will work. Although i have distant
memories of ubuntu and nvidia cards leading to madness and bedwetting!!
trampintransit
Level 1
Level 1
 
Posts: 39
Joined: Sun Feb 07, 2010 3:31 pm

Re: How to Automake xorg.conf

Postby beefstu on Tue Jun 15, 2010 12:59 pm

Try rebooting and trying it again. Also could try doing it graphically by going to /etc in the file browser, right-click on X11 folder, then open as administrator then just copy and paste your xorg.conf over to that folder.

TBH I'd be very surprised if you managed to get to work in Ubuntu that you couldn't in Mint, purely as Mint receives almost all its hardware compatibility from ubuntu.
Please go through the steps here when posting a question. Once your question has been resolved, edit the original question post and add [Solved] to the subject. Both of these will help others use the forum effectively.
User avatar
beefstu
Level 5
Level 5
 
Posts: 654
Joined: Tue Dec 29, 2009 10:22 am
Location: Southampton, UK

Re: How to Automake xorg.conf

Postby trampintransit on Tue Jun 15, 2010 1:24 pm

hang on ...i now realise it didn't go to the desktop after 'startx' ?
trampintransit
Level 1
Level 1
 
Posts: 39
Joined: Sun Feb 07, 2010 3:31 pm

Re: How to Automake xorg.conf

Postby oobetimer on Tue Jun 15, 2010 5:09 pm

The other way

1. First drop to a terminal by pressing Ctrl+Alt+F1 Log in with your usual Username and Password.

2. Stop the window manager

Code: Select all
sudo /etc/init.d/gdm stop

....of course if WM is eg kdm, so sudo /etc/init.d/kdm stop


3. Go to the runlevel 3

Code: Select all
sudo telinit 3



4. Some commands on runlevel 3

Code: Select all
sudo Xorg -configure

sudo cp /home/username/xorg.conf.new /etc/X11/xorg.conf

sudo reboot
Last edited by oobetimer on Wed Aug 04, 2010 10:28 am, edited 1 time in total.
User avatar
oobetimer
Level 7
Level 7
 
Posts: 1889
Joined: Tue Jun 01, 2010 12:53 pm
Location: Finland / above the Arctic Circle

Re: How to Automake xorg.conf

Postby miltontl on Fri Jul 23, 2010 2:59 am

when i type startx nothing happens and when i restart manually and copy the code into xorg and restart i get this
(EE) Failed to load module "i915" (module does not exist. 0)
(EE) No drivers available.
miltontl
Level 1
Level 1
 
Posts: 7
Joined: Wed Jul 14, 2010 9:01 pm

Re: How to Automake xorg.conf

Postby Boblebad on Wed Aug 11, 2010 9:03 am

When i try to stop gdm, i just end up on the black screen, i can write, but nothing happens, and i need to turn of my netbook to start again...

I run Mint 9

What went wrong ??
Best regards
Carsten, Denmark
Boblebad
Level 2
Level 2
 
Posts: 57
Joined: Fri Jun 19, 2009 3:58 pm

Re: How to Automake xorg.conf

Postby oobetimer on Wed Aug 11, 2010 11:28 am

Boblebad wrote:When i try to stop gdm, i just end up on the black screen, i can write, but nothing happens, and i need to turn of my netbook to start again...

I run Mint 9

What went wrong ??


You can make a xorg.conf file when booting the recovory mode, and drop to root shell prompt.

username@desktop#Xorg -configure

username@desktop#cp /root/xorg.conf.new /etc/X11/xorg.conf

username@desktop#reboot
User avatar
oobetimer
Level 7
Level 7
 
Posts: 1889
Joined: Tue Jun 01, 2010 12:53 pm
Location: Finland / above the Arctic Circle

Re: How to Automake xorg.conf

Postby Boblebad on Wed Aug 11, 2010 12:08 pm

oobetimer wrote:
You can make a xorg.conf file when booting the recovory mode, and drop to root shell prompt.

username@desktop#Xorg -configure

username@desktop#cp /root/xorg.conf.new /etc/X11/xorg.conf

username@desktop#reboot


And how do i get the menu up so i can choose to boot into recovery mode, what key do i hit at boot ??
Best regards
Carsten, Denmark
Boblebad
Level 2
Level 2
 
Posts: 57
Joined: Fri Jun 19, 2009 3:58 pm

Re: How to Automake xorg.conf

Postby Boblebad on Wed Aug 11, 2010 12:22 pm

Boblebad wrote:
And how do i get the menu up so i can choose to boot into recovery mode, what key do i hit at boot ??


Found the "StartUp-manager" in the menu and got it that way :)

But i'm not sure what to do where, it seams that people has different opinions about that ??

This is how it looks now..

Code: Select all
Section "Device"
   Identifier   "Configured Video Device"
   Driver      "fbdev"
EndSection

Section "Monitor"
   Identifier   "Configured Monitor"
EndSection

Section "Screen"
   Identifier   "Default Screen"
   Monitor      "Configured Monitor"
   Device      "Configured Video Device"
EndSection
Best regards
Carsten, Denmark
Boblebad
Level 2
Level 2
 
Posts: 57
Joined: Fri Jun 19, 2009 3:58 pm

Re: How to Automake xorg.conf

Postby oobetimer on Wed Aug 11, 2010 1:19 pm

Boblebad wrote:
But i'm not sure what to do where, it seams that people has different opinions about that ??



There is a good guidance.. :D

http://linux.fi/wiki/X.orgin_asetukset

http://translate.google.fi/translate?js ... l=fi&tl=en
User avatar
oobetimer
Level 7
Level 7
 
Posts: 1889
Joined: Tue Jun 01, 2010 12:53 pm
Location: Finland / above the Arctic Circle

Re: How to Automake xorg.conf

Postby Boblebad on Wed Aug 11, 2010 1:32 pm



Thanks :)

But i don't know anything about what's under the hood in this Samsung NC10, is there some standard that can be used, or do i need to have every section filled out ??
Best regards
Carsten, Denmark
Boblebad
Level 2
Level 2
 
Posts: 57
Joined: Fri Jun 19, 2009 3:58 pm

Re: How to Automake xorg.conf

Postby oobetimer on Wed Aug 11, 2010 1:48 pm

Boblebad wrote:But i don't know anything about what's under the hood in this Samsung NC10, is there some standard that can be used, or do i need to have every section filled out ??


The "Section "Screen" is the most crucial .. :wink:
User avatar
oobetimer
Level 7
Level 7
 
Posts: 1889
Joined: Tue Jun 01, 2010 12:53 pm
Location: Finland / above the Arctic Circle

Re: How to Automake xorg.conf

Postby Boblebad on Wed Aug 11, 2010 2:01 pm

oobetimer wrote:
The "Section "Screen" is the most crucial .. :wink:


Well, i searched the net for some xorg.conf files, and ended up with this result, but with no result at all, didn't get me a virtual display, but i can boot now ;)

Code: Select all
Section "Device"
   Identifier  "Device1"
   Driver      "intel"
   VendorName  "Intel Corporation"
   BoardName   "Mobile 950GMA Express Graphics Controller"
   BusID       "PCI:0:2:0"
EndSection

Section "Monitor"
   Identifier   "Monitor1"
   VendorName   "Samsung"
   ModelName    "NC10"
   Option       "DPMS"
EndSection

Section "Screen"
   Identifier "Screen1"
   Device     "Device1"
   Monitor    "Monitor1"

       SubSection "Display"
           Depth      24
           Modes      "1024x600" "640x480"
           Virtual              1024 768
       EndSubSection

EndSection


My question is - do i need to set the mode i use as virtual ?
Best regards
Carsten, Denmark
Boblebad
Level 2
Level 2
 
Posts: 57
Joined: Fri Jun 19, 2009 3:58 pm

Re: How to Automake xorg.conf

Postby Boblebad on Wed Aug 11, 2010 2:51 pm

Boblebad wrote:
Well, i searched the net for some xorg.conf files, and ended up with this result, but with no result at all, didn't get me a virtual display, but i can boot now ;)

Code: Select all
Section "Device"
   Identifier  "Device1"
   Driver      "intel"
   VendorName  "Intel Corporation"
   BoardName   "Mobile 950GMA Express Graphics Controller"
   BusID       "PCI:0:2:0"
EndSection

Section "Monitor"
   Identifier   "Monitor1"
   VendorName   "Samsung"
   ModelName    "NC10"
   Option       "DPMS"
EndSection

Section "Screen"
   Identifier "Screen1"
   Device     "Device1"
   Monitor    "Monitor1"

       SubSection "Display"
           Depth      24
           Modes      "1024x600" "640x480"
           Virtual              1024 768
       EndSubSection

EndSection


My question is - do i need to set the mode i use as virtual ?


Just found out that there's a problem regarding exactly my graphiccard Intel 950:

http://odkq.com/virtualres.html

But when trying to use "vesa" i get an error that the device is not found, and is changed to "fbdev" in xorg.conf.failsafe...
Best regards
Carsten, Denmark
Boblebad
Level 2
Level 2
 
Posts: 57
Joined: Fri Jun 19, 2009 3:58 pm

Re: How to Automake xorg.conf

Postby Boblebad on Thu Aug 12, 2010 11:01 am

This is how easy it is - Oh my God :roll:

Code: Select all
sudo xrandr --output LVDS1 --mode 1024x600 --panning 1024x800


It works perfect :)
Best regards
Carsten, Denmark
Boblebad
Level 2
Level 2
 
Posts: 57
Joined: Fri Jun 19, 2009 3:58 pm

Re: How to Automake xorg.conf

Postby btetlow on Sat Feb 18, 2012 7:20 am

Just my experience as I needed to make an xorg.conf file..

Code: Select all
sudo stop gdm

Didn't work on my Mint 11, I got some error about a display

instead I used

Code: Select all
sudo service gdm stop

and then was able to do everything else you did in the tutorial.

So thanks, I now have a xorg.conf file
btetlow
Level 1
Level 1
 
Posts: 3
Joined: Sat Feb 18, 2012 2:37 am

Linux Mint is funded by ads and donations.
 
Next

Return to Tutorials / Howtos

Who is online

Users browsing this forum: No registered users and 15 guests