Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Blogs > cjparad
User Name


Rate this Entry

Screen Resolution Problem

Posted 06-06-2009 at 01:09 AM by cjparad

Originally Posted by cjparad View Post
Like I stated in my last post now you have lock files and log files stopping you from getting into the GUI, right?

if so try using the xfix in recovery or

The problem is the correct driver is not installed. You need to install envy:
Open a terminal
type sudo aptitude install Envy
type Envy -t

sudo dpkg-reconfigure xserver-xorg" and follow the prompts
/etc/init.d/gdm restart

If you have an NVIDIA card then you need to open the NVIDIA xconfig:

open terminal and type:
sudo nvidia-xconfig

Newer third party cards like Sparkle and Diamond NVIDIA cards seem to give issues with standard driver installation. For instance the Sparkle Geforce 9500gt will give problems and can cause some head aches.

I never ATI so it should be similar use Envy and download the appropriate ATI software as needed.

Also try

at the logon screen press CTRL+ALT+F1
sudo dpkg-reconfigure xserver-xorg

If you get a .X0-lock error download tmpclear

Save it to the root then type:
cd \
cd /root
tar xvzf tmpclear.gz
mv tmpclear
chmod +x /root/
sudo tmpclear

and in the future if you get this error again all need to do is
cd \
cd /root
sudo tmpclear

or just download and install Ultra X Linux tmpclear is built in all you have to do in Ultra X Linux is just type tmpclear.

Ultra X Linux can be downloaded at

Then you have to correct the driver issue that put you here in the first place.

What video card do you have before we go any further?

There are tons of support forums for ubuntu to install newer video cars. using the repos is always first suggested. but sometimes you have a card that just wont install and let you change resolution. Next do not change your xorg file till it is backed up.

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup

sudo /etc/init.d/gdm stop (or kdm for KDE)

sudo dpkg-reconfigure xserver-xorg

sudo /etc/init.d/gdm start (or kdm for KDE)

Check this out found it in the Ubuntu forums

How to edit or add HorizSync and VertRefresh lines
Find your monitors manual (manufacturers website and Google are useful).
Look for hozizontal sync and vertical refresh rates, also if bandwidth or maximum dot clock / pixel clock is mentioned, write it down.

Edit xorg.conf and put correct values to your's Monitor section. Something like this:

Section "Monitor"
Identifier "CM752ET"
HorizSync 31-101
VertRefresh 60-160

Be sure that Identifier is same as the Monitor line in Screen section.

Adding custom modeline
If you know what your monitor can do, for example 1024x768@75Hz, you can use this page to generate a custom Modeline for you xorg.conf:

* online modeline generator

Copy paste the new Modeline to Monitor section (for example):


# 1024x768 @ 75.00 Hz (GTF) hsync: 60.15 kHz; pclk: 81.80 MHzModeline "1024x768_75.00" 81.80 1024 1080 1192 1360 768 769 772 802 -HSync +Vsync

Watch that the hsync is in range with the HorizSync on the same section (in this example the range is 31-101 and this modelines hsync is 60.15, so we're safe). Also the VertRefresh and the refresh rate you selected (75Hz in this example) should match - in this example VertRefresh is 60-160 and modeline is 75Hz, so that's all good.

Now you can select the default resolution and colordepth by tweaking the Screen section. It should look something like this:


Section "Screen"
Identifier "Default Screen"
Device "NVIDIA Corporation NV34 [GeForce FX 5200]"
Monitor "CM752ET"
DefaultDepth 16
SubSection "Display"
Depth 16
Modes "1024x768_75.00"

Monitor name here (CM752ET) matches the Identifier on your Monitor Section. Device line here matches the identifier on your Device section - you get the idea? It ties together some settings for your screen - the graphics card and your monitor. You may have more Subsections here, but only one is needed.

Change the DefaultDepth to what you would want it to be, 16 (65536 colors) or 24 (16M colors). Change the Modes line to match the resolutions you want to use - Depth must match DefaultDepth (here it's 16).

Save the config. If you're in X, hit CTRL+ALT+BACKSPACE to restart X (if you're running logon manager like xdm, kdm or gdm). Change between virtual consoles with CTRL + F1 F2 F3 and so on - your X should be on F7.

Starting the X:
startx OR sudo /etc/init.d/gdm start (in KDE it's kdm)

If that doesn't work, try fixing the xorg.conf or get back to your original by copying the backup over your changed one with:

sudo cp /etc/X11/xorg.conf_backup /etc/X11/xorg.conf

When you're back in X, you can cycle through different modes by pressing CTRL+ALT++ (plus sign on numpad), or go to System->Preferences->Screen Resolution.

How to adjust position of your screen?
open terminal(Applications->Accessories->Terminal), run xvidtune (type: "xvidtune"), adjust the screen and hit Show-button. You'll see a line with something like this on the terminal screen:

"1280x1024" 157.50 1280 1332 1492 1728 1024 1025 1028 1072 +hsync +vsync

Next you should:

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
sudo nano /etc/X11/xorg.conf

In Monitor section, add the above line with a prefix "Modeline", like this:

Modeline "1280x1024" 157.50 1280 1332 1492 1728 1024 1025 1028 1072 +hsync +vsync

That should do it. There should be no need to restart X if you did make the change (hit Apply in xvidtune), but you should test that this new change works. Hit ctrl+alt+backspace to restart X. If it doesn't work, you can copy back the old configuration file using:

sudo /etc/X11/xorg.conf_backup /etc/X11/xorg.conf

and restart X using:

sudo /etc/init.d/gdm start

Hope this helps
Screen Res Problem
Posted in Uncategorized
Views 1122 Comments 0
« Prev     Main     Next »
Total Comments 0




All times are GMT -5. The time now is 11:00 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration