LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 06-02-2009, 09:47 AM   #1
HSN
LQ Newbie
 
Registered: Dec 2006
Distribution: Ubuntu
Posts: 25

Rep: Reputation: 15
Not a new problem: Modifying desktop resolution, how?


I have been trying to understand how to modify desktop resolution through searching. But I have not been able to find a clean description of this.

I ONLY need to bigger my desktop, for example 1280*1024 would be OK for me. I using Ubuntu as a VirtualBox on my MAC.
Can I just add a line to xorg.conf to reflect this need or is there a clear procedure on how to resolve this issue?
 
Old 06-02-2009, 10:50 AM   #2
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Look in your xorg.conf for a subsection like the one I've highlighted in red, below. (You may need to scroll the code window to see that.)

Add the 1280x1024 as the first element of the modes line (after the modes, of course) and that should be the default.

Code:
$ cat /Jaunty/etc/X11/xorg.conf | grep -v '[[:space:]]*#' | grep -v ^[[:space:]]*$
Section "ServerLayout"                                                         
    Identifier     "X.org Configured"                                          
    Screen      0  "Screen0" 0 0                                               
    InputDevice    "Mouse0" "CorePointer"                                      
    InputDevice    "Keyboard0" "CoreKeyboard"                                  
EndSection                                                                     
Section "Files"                                                                
    ModulePath      "/usr/lib64/xorg/modules/extensions/nvidia"                
    ModulePath      "/usr/lib64/xorg/modules/extensions"                       
    ModulePath      "/usr/lib64/xorg/modules"                                  
    FontPath        "/usr/share/fonts/X11/misc"                                
    FontPath        "/usr/share/fonts/X11/100dpi/:unscaled"                    
    FontPath        "/usr/share/fonts/X11/75dpi/:unscaled"                     
    FontPath        "/usr/share/fonts/X11/Type1"                               
    FontPath        "/usr/share/fonts/X11/100dpi"                              
    FontPath        "/usr/share/fonts/X11/75dpi"                               
    FontPath        "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"         
EndSection                                                                     
Section "Module"                                                               
    Load           "dbe"                                                       
    Load           "glx"                                                       
    Load           "extmod"                                                    
    Load           "dri2"                                                      
    Load           "record"                                                    
EndSection                                                                     
Section "InputDevice"                                                          
    Identifier     "Keyboard0"                                                 
    Driver         "kbd"                                                       
EndSection                                                                     
Section "InputDevice"                                                          
    Identifier     "Mouse0"                                                    
    Driver         "mouse"                                                     
    Option         "Protocol" "auto"                                           
    Option         "Device" "/dev/input/mice"
    Option         "ZAxisMapping" "4 5 6 7"
EndSection
Section "InputDevice"
    Identifier     "Mouse1"
    Driver         "synaptics"
    Option         "Device" "/dev/input/mouse1"
    Option         "SHMConfig" "yes"
    Option         "Emulate3Buttons" "yes"
EndSection
Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "HP"
    ModelName      "Seiko"
    HorizSync       30.0 - 75.0
    VertRefresh     60.0
    Option         "DPMS"
EndSection
Section "Device"
    Identifier     "Card0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 7150M / nForce 630M"
EndSection
Section "Screen"
    Identifier     "Screen0"
    Device         "Card0"
    Monitor        "Monitor0"
    Option         "AddARGBGLXVisuals" "True"
    SubSection     "Display"
        Viewport    0 0
        Modes      "1440x900" "1024x768" "800x600" "640x480"
    EndSubSection
EndSection
 
Old 06-03-2009, 02:46 AM   #3
HSN
LQ Newbie
 
Registered: Dec 2006
Distribution: Ubuntu
Posts: 25

Original Poster
Rep: Reputation: 15
Good, I did this and restarted. But this by itself did not change my resolution. Should I do something else to reflect the change?
 
Old 06-03-2009, 02:42 PM   #4
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
It should have corrected the problem.

Do a cat/var/log/Xorg.0.log | grep '\(EE\)' (in a terminal window) to see if the X-server is complaining about something.

By the way, you don't need to reboot your system to see what a change to /etc/X11/xorg.cong has accomplished. Just reboot the X-server. (On most distributions a <ctrl>-<alt>-<backspace> key combination will do that.)

Post the error messages if they're not clear.
 
Old 06-03-2009, 11:16 PM   #5
someone Awesome
Member
 
Registered: Nov 2008
Posts: 70

Rep: Reputation: 17
system=>preferences=>display
 
Old 06-04-2009, 01:16 AM   #6
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
You can try booting to recovery mode and choose the option "XFIX fix video", then reboot.
If that does not work, the try using xrandr to set the proper resolution:
https://wiki.ubuntu.com/X/Config/Resolution
 
Old 06-04-2009, 08:46 AM   #7
cjparad
Ultra X Creator
 
Registered: Mar 2009
Location: USA
Distribution: Ultra X Linux
Posts: 29
Blog Entries: 5

Rep: Reputation: 15
Drivers

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

press CTRL+ALT+F1
type:
sudo dpkg-reconfigure xserver-xorg

If you get a .X0-lock error download tmpclear
download: http://ultraxlinux.org/src/tmpclear.gz

Save it to the root then type:
cd \
cd /root
wget http://ultraxlinux.org/src/tmpclear.gz
tar xvzf tmpclear.gz
mv tmpclear tmpclear.sh
chmod +x /root/tmpclear.sh
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 http://ultraxlinux.org


I hope you have some luck with this

Last edited by cjparad; 06-04-2009 at 08:50 AM. Reason: add text
 
Old 06-05-2009, 12:25 AM   #8
HSN
LQ Newbie
 
Registered: Dec 2006
Distribution: Ubuntu
Posts: 25

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by PTrenholme View Post
It should have corrected the problem.

Do a cat/var/log/Xorg.0.log | grep '\(EE\)' (in a terminal window) to see if the X-server is complaining about something.

By the way, you don't need to reboot your system to see what a change to /etc/X11/xorg.cong has accomplished. Just reboot the X-server. (On most distributions a <ctrl>-<alt>-<backspace> key combination will do that.)

Post the error messages if they're not clear.
This is what I get:

$ cat Xorg.0.log | grep '\(EE\)'
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(II) Loading extension MIT-SCREEN-SAVER


When I look at System -> Preferences -> Display, I see that I can only use 800x600 or below.
 
Old 06-05-2009, 12:27 AM   #9
HSN
LQ Newbie
 
Registered: Dec 2006
Distribution: Ubuntu
Posts: 25

Original Poster
Rep: Reputation: 15
I installed Envy but Envy -t did not work!
What is Envy for?
 
Old 06-05-2009, 12:43 AM   #10
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
Quote:
Originally Posted by HSN View Post
I installed Envy but Envy -t did not work!
What is Envy for?
Envy is for installing the nvidia drivers from from nvidia.com. If you do have a nvidia card though, you should first try the nvidia driver from the Ubuntu repos. Go to: system > administration > hardware_drivers to enable any proprietary graphics drivers you may need.
What video card do you have? And do you have the proper driver installed for it? If you don't know what video card you have, open a terminal and run:
Code:
lspci | grep -i vga
This will list the graphics card your computer uses.

Have you tried booting to recovery mode and running "XFIX fix video", or using xrandr, as I suggested in my last post?

Last edited by tommcd; 06-05-2009 at 12:48 AM.
 
Old 06-06-2009, 12:14 AM   #11
cjparad
Ultra X Creator
 
Registered: Mar 2009
Location: USA
Distribution: Ultra X Linux
Posts: 29
Blog Entries: 5

Rep: Reputation: 15
What to do now

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



Drivers
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
type:
sudo dpkg-reconfigure xserver-xorg

If you get a .X0-lock error download tmpclear
download: http://ultraxlinux.org/src/tmpclear.gz

Save it to the root then type:
cd \
cd /root
wget http://ultraxlinux.org/src/tmpclear.gz
tar xvzf tmpclear.gz
mv tmpclear tmpclear.sh
chmod +x /root/tmpclear.sh
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 http://ultraxlinux.org

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 xconf.org's Monitor section. Something like this:
Code:

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

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

Code:

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

Code:

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

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

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

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

Next you should:
Code:

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

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

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

and restart X using:
Code:

sudo /etc/init.d/gdm start



Hope this helps
 
Old 06-06-2009, 12:51 AM   #12
HSN
LQ Newbie
 
Registered: Dec 2006
Distribution: Ubuntu
Posts: 25

Original Poster
Rep: Reputation: 15
Thanks everybody for the solutions.
As I said before, I'm using Ubuntu on VirtualBox. The problem was that the video driver was not installed correctly. I tried first to install VB guest additions. Then when I edited xorg.conf and logged out, the screen resolution was set based on my preferences.
 
Old 06-10-2009, 02:11 AM   #13
Jeaninie
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Rep: Reputation: 0
Ubuntu Screen Resolution Issue; max resolution option 640x480. (used to work better!)

I've been searching for a way to solve my issue, and none of the posted answers seem to work for me! My screen resolution used to be just fine, not sure what it was at but it looked totally okay and worked well. One day it decided not to work! I'm running Ubuntu and the current max resolution I can set using preferences is 640x480.

Quote:
Originally Posted by cjparad View Post
Drivers
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
I tried this, and got "Bash: Envy: command not found"

Quote:
Originally Posted by cjparad View Post
If you have an NVIDIA card then you need to open the NVIDIA xconfig:

open terminal and type:
sudo nvidia-xconfig
I tried this, although I don't know what a nvidia card is. It gave me a message saying
"Using X configuration file: "/etc/X11/xorg.conf".

WARNING: The CorePointer device was not specified explicitly in the layout; using the first mouse device.

WARNING: The CoreKeyboard device was not specified explicitly in the layout; using the first keyboard device.

Backed up file '/etc/X11/xorg.conf' as '/etc/X11/xorg.conf.backup'
New X configuration file written to '/etc/X11/xorg.conf'"

I don't know what any of this means! I'm sorry but the rest of your post doesn't make sense to me either, so I wasn't able to try it. If anyone wants to help me out that would be SO helpful, since as you can imagine, having a screen this big is sucky.

Jeanine
 
  


Reply

Tags
config, configure, drivers, linux, resolution, ubuntu, xserver



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Modifying screen resolution Eredeath Linux - Hardware 2 07-31-2008 08:07 PM
Desktop Resolution Problem SBN Linux - General 3 07-19-2007 05:22 PM
My desktop resolution problem nigeljames SUSE / openSUSE 9 07-14-2006 02:30 PM
Modifying resolution in Debian JimmyL Debian 9 12-16-2005 04:23 AM
Modifying GUI screen resolution thru text jenson Red Hat 1 03-18-2005 03:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 05:51 AM.

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