How to Automake xorg.conf

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
beefstu

How to Automake xorg.conf

Post by beefstu »

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
remoulder
Level 17
Level 17
Posts: 7621
Joined: Fri May 09, 2008 1:14 pm

Re: Automake xorg.conf

Post by remoulder »

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.
beefstu

Re: Automake xorg.conf

Post by beefstu »

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: !
remoulder
Level 17
Level 17
Posts: 7621
Joined: Fri May 09, 2008 1:14 pm

Re: Automake xorg.conf

Post by remoulder »

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.
trampintransit

Re: How to Automake xorg.conf

Post by trampintransit »

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!!
beefstu

Re: How to Automake xorg.conf

Post by beefstu »

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.
trampintransit

Re: How to Automake xorg.conf

Post by trampintransit »

hang on ...i now realise it didn't go to the desktop after 'startx' ?
oobetimer

Re: How to Automake xorg.conf

Post by oobetimer »

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.
miltontl

Re: How to Automake xorg.conf

Post by miltontl »

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.
Boblebad

Re: How to Automake xorg.conf

Post by Boblebad »

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 ??
oobetimer

Re: How to Automake xorg.conf

Post by oobetimer »

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
Boblebad

Re: How to Automake xorg.conf

Post by Boblebad »

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 ??
Boblebad

Re: How to Automake xorg.conf

Post by Boblebad »

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
oobetimer

Re: How to Automake xorg.conf

Post by oobetimer »

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
Boblebad

Re: How to Automake xorg.conf

Post by Boblebad »

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 ??
oobetimer

Re: How to Automake xorg.conf

Post by oobetimer »

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:
Boblebad

Re: How to Automake xorg.conf

Post by Boblebad »

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 ?
Boblebad

Re: How to Automake xorg.conf

Post by Boblebad »

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...
Boblebad

Re: How to Automake xorg.conf

Post by Boblebad »

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

Code: Select all

sudo xrandr --output LVDS1 --mode 1024x600 --panning 1024x800
It works perfect :)
btetlow

Re: How to Automake xorg.conf

Post by btetlow »

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
Post Reply

Return to “Tutorials”