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

Notices


Reply
  Search this Thread
Old 12-22-2005, 08:41 AM   #1
kaplan71
Member
 
Registered: Nov 2003
Posts: 809

Rep: Reputation: 39
Changing Video Driver and Screen Resolution


Hi there --

I completed an installation of version 3.1 via the Net Install CD, and I have a GUI desktop running on the system at 800x600 resolution. During the installation I was prompted for a video driver, and I selected what appeared to be the default driver: vesa. During the monitor selection process, I chose the simple configuration and selected the monitor size of 17".

I would like to be able to increase the screen resolution to 1280x1024, and need to know what is the best way to do this. Thanks.
 
Old 12-22-2005, 09:15 AM   #2
Vampirite
Member
 
Registered: Apr 2005
Location: England
Distribution: Arch Linux
Posts: 223

Rep: Reputation: 30
I've heard of this problem alot but I can't remember the place I saw to fix it...

You could try and look on google or other search engines for it, I remember it being a review so that might help.

--Kourosh
 
Old 12-22-2005, 09:37 AM   #3
michapma
Member
 
Registered: Oct 2003
Location: Zürich
Distribution: Debian
Posts: 537

Rep: Reputation: 39
With that resolution, you are sure to have an LCD monitor.

You have at least a couple options:
1. Run a reconfiguration of all of the X server settings, and choose a more advanced option to configure the monitor. (This will overwrite the X server configuration file.)
2. Edit the X server configuration file by hand.

Both have their pros and cons. Before you do anything though, switch to root and do this:
Code:
cp /etc/X11/XF86Config-4 /etc/X11/XF86Config-4.bak1
This saves a backup copy of the X Server configuration file. You should always do this before changing X Server settings (make new names such as bak2, bak3, etc., or something even more useful like .22Dec2005.backup), so that you have a file to fall back on in case the new settings don't work. If you're using testing, the file is "/etc/X11/xorg.conf".

Option 1
After backing up your config file, run (as root):
dpkg-reconfigure xserver-xfree86
(if you are running testing instead of stable, use xserver-xorg)

This will take you through all of those questions again, plus probably a few new ones you didn't see the first time. Fortunately, it remembers most of the defaults, but if you don't know the answer to some of the questions it may be more work than you bargained for. On the plus side, it can be good for you to get familiar with the issues behind these questions.

Unfortunately, off the top of my head I can't recall whether medium allows you to manually choose the screen resolutions you want installed. To be sure, choose advanced, but then you need to know the horizontal and vertical refresh rates of your monitor (look in your manual or at your manufacturer's website).

When you're at the screen for selecting resolutions, use the arrows to move down the list to 1280x1024, press space, then move down to 1024x768 and press space again. 800x600 and 640x480 should already be selected. Now press TAB and Enter. (That stuff confused me the first time around, and I had to redo the whole configuration process.)

Once done, log off as root and restart the X server by logging out of your X session or, to be really sure, closing all programs and pressing Ctl+Alt+Bksp (this kills and restarts the X server).

Now X server should use the highest resolution.


Option 2
This is my preferred method for making changes. Why answer all those questions?

Switch to root and change directories (I'll assume you're running stable, if testing use xorg.conf instead of XF86Config-4):
# cd /etc/X11

Have a look what's there:
# ls -l

Make a backup copy of the X server configuration file:
# cp XF86Config-4 XF86Config-4.bak1
(or whatever you want to name the backup copy)

Now you're free to get down and dirty with the config file:
# nano XF86Config-4
(nano is a good CLI text editor that comes with Debian. Another hint is to use tab completion: type nan and then press TAB, and it should recognize the program name and complete it; then you can type XF+TAB and it will complete the name of the file up to where it is unique to other files in the directory. I like to use it to make sure I don't make a typo, and to make sure sometimes I'm in the right place. Use it carefully though, if you get too quick then you might accidentally open a wrong file without noticing.)

nano should now have opened the config file. Use the Page Down key until you see a section that starts like this:

Section "Screen"

I happen to be using an LCD monitor with a 1280x1024 max resolution. Here is what my section looks like:
Code:
Section "Screen"
        Identifier      "Default Screen"
        Device          "Matrox G400"
        Monitor         "Generic Monitor"
        DefaultDepth    24
        SubSection "Display"
                Depth           1
                Modes           "1280x1024" "1024x768" "800x600" "640x480"
        EndSubSection
        SubSection "Display"
                Depth           4
                Modes           "1280x1024" "1024x768" "800x600" "640x480"
        EndSubSection
        SubSection "Display"
                Depth           8
                Modes           "1280x1024" "1024x768" "800x600" "640x480"
        EndSubSection
        SubSection "Display"
                Depth           15
                Modes           "1280x1024" "1024x768" "800x600" "640x480"
        EndSubSection
        SubSection "Display"
                Depth           16
                Modes           "1280x1024" "1024x768" "800x600" "640x480"
        EndSubSection
        SubSection "Display"
                Depth           24
                Modes           "1280x1024" "1024x768" "800x600" "640x480"
        EndSubSection
EndSection
As you can see, I'm using a Matrox G400 video card, and my monitor is labeled "Generic Monitor". In addition, the default color depth is set to 24 (fourth line, DefaultDepth). The SubSection entries are listed in order of color depth. First 1-bit color (shudder at the thought), then 4-bit, 8-bit, 15-bit, 16-bit and finally, the beloved default 24-bit, which gives each pixel 16.7 million possible colors. (At 1280x1024 pixels, the color space of your monitor is fantastically huge.)

The important difference to what you should be seeing in your configuration file is that each line has only
Code:
Modes           "800x600" "640x480"
Simply insert the entries "1280x1024" and "1024x768" at the beginning of each Modes line (for each color depth).

Next you should save the file. In nano, it's written at the bottom of the screen, but I'll tell you: Press Ctl+O (as in Oscar), accept to overwrite the file by pressing Enter, then press Ctl+X to quit nano.

Voilà, you've edited your config file. Now you again need to log off of root and restart the X server, either by logging out of your X session or, to be really sure, by quitting your programs and pressing Ctl+Alt+Bksp.

Troubleshooting
If you don't get the desired results, or if your display goes blank and nothing happens, do this:
Press Ctl+Alt+F1

This should bring you to console tty1. (There are several more, just press Ctl+Alt+F2, Ctl+Alt+F3 and so on; Ctl+Alt+F7 should bring you back to your X server.) Now login (as root, or as the normal user and then switch to root by using the "su" command) and restore your original X server configuration file:
# cd /etc/X11
# mv XF86Config-4 XF86Config-4.failed.bak
# cp XF86Config-4.bakversion.I.want.to.use XF86Config-4
... or something similar (use the appropriate backup version name).

Then press Ctl+Alt+F7 and Ctl+Alt+Bksp. If that doesn't work, logout as root and log back in as normal user (or else use tty2 with Ctl+Alt+F2 without forgetting you're logged in as root on tty1), and enter this command:
startx

Hope that helps. Now you just need to optimize your mouse, dpi settings, etc.

Last edited by michapma; 12-22-2005 at 09:39 AM.
 
Old 12-22-2005, 09:43 AM   #4
michapma
Member
 
Registered: Oct 2003
Location: Zürich
Distribution: Debian
Posts: 537

Rep: Reputation: 39
I should have mentioned that you should make a backup copy of any currently working X server configuration file, most especially if you have altered it by hand. Using dpkg-reconfigure xserver-xfree86 doesn't preserve any changes you made by hand to the configuration file, so if you reconfigured like that they would be lost, lost, lost unless you back them up.
 
Old 12-22-2005, 09:47 AM   #5
michapma
Member
 
Registered: Oct 2003
Location: Zürich
Distribution: Debian
Posts: 537

Rep: Reputation: 39
As for your video card, what kind do you have? If nVidia or ATI, you may find the following site handy:
http://www.serios.net/

(It's got other useful stuff there anyway.)
 
  


Reply



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
Problem changing the video adapter setting and changing the screen resolution habiblove Linux - General 3 02-18-2006 05:10 PM
Changing Screen Resolution gunner_uk2000 Fedora 3 11-28-2005 02:24 PM
Changing video resolution HarryLeBlanc Mandriva 1 03-17-2005 02:06 AM
changing screen resolution.. kurrupt Debian 4 10-24-2004 12:45 PM
Changing the screen resolution? Stillwell Linux - Newbie 2 09-28-2003 04:30 PM

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

All times are GMT -5. The time now is 03:31 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