Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux Hosts
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Linux Newbie
Reload this Page Screen Resolution from Command Line
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Linux Newbie If you're new to the wonderful world of Linux, start here!

Reply
 
Thread Tools Display Modes
Old 1 Week Ago   #1 (permalink)
ldb88
Just Joined!
 
Join Date: Jul 2006
Posts: 17
Screen Resolution from Command Line

Is there a way to determine the current screen resolution from the command line? What about a way to change the resolution?

Thanks.
ldb88 is offline   Reply With Quote
Old 1 Week Ago   #2 (permalink)
i92guboj
Linux Enthusiast
 
Join Date: Nov 2007
Location: Córdoba (Spain)
Posts: 623
Quote:
Originally Posted by ldb88 View Post
Is there a way to determine the current screen resolution from the command line? What about a way to change the resolution?

Thanks.
It depends on what you are speaking about.

If you mean related to the X graphics driver, you should be able to retrieve some info and make adjustments using xrandr.
i92guboj is offline   Reply With Quote
Old 1 Week Ago   #3 (permalink)
ozar
Super Moderator
 
Join Date: May 2004
Location: Arch Linux
Posts: 7,927
If you are talking about command line resolution, you can add the vga=xxx option to the kernel line in your /boot/grub/menu.lst file.

Here's a table with the different values you can use:

Code:
  FRAMEBUFFER RESOLUTION SETTINGS
     +-------------------------------------------------+
          | 640x480    800x600    1024x768    1280x1024
      ----+--------------------------------------------
      256 | 0x301=769  0x303=771  0x305=773   0x307=775
      32K | 0x310=784  0x313=787  0x316=790   0x319=793
      64K | 0x311=785  0x314=788  0x317=791   0x31A=794
      16M | 0x312=786  0x315=789  0x318=792   0x31B=795
     +-------------------------------------------------+
__________________
oz

New Users: * FAQ *

ozar is offline   Reply With Quote
Old 6 Days Ago   #4 (permalink)
ldb88
Just Joined!
 
Join Date: Jul 2006
Posts: 17
Quote:
Originally Posted by i92guboj View Post
It depends on what you are speaking about.

If you mean related to the X graphics driver, you should be able to retrieve some info and make adjustments using xrandr.

Thanks! Now my boss won't complain because he can't tell what's on the screen!
ldb88 is offline   Reply With Quote
Old 3 Days Ago   #5 (permalink)
ldb88
Just Joined!
 
Join Date: Jul 2006
Posts: 17
Too late to edit, so I have to reply:

xrandr worked on Ubuntu with the nVidia drivers installed. But when I got to my computer at work (CentOS), it doesn't work anymore.

These are the commands I have tried:
Code:
xrandr -s 1280x1024
xrandr -display $DISPLAY -s 1280x1024
xrandr --screen Screen0 -s 1280x1024
None of them have worked.
ldb88 is offline   Reply With Quote
Old 3 Days Ago   #6 (permalink)
smolloy
Linux Guru
 
smolloy's Avatar
 
Join Date: Apr 2005
Location: San Francisco, CA, but from Belfast, N.Ireland.
Posts: 1,712
What were the error messages?
__________________
Registered Linux user #388328 || Registered LFS user #15880
AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 7300 GT 512MB :: ASUS M2N32 Deluxe :: 2X250GB SATAII
Steve and Lisa online
Steve's Blog
smolloy is offline   Reply With Quote
Old 3 Days Ago   #7 (permalink)
i92guboj
Linux Enthusiast
 
Join Date: Nov 2007
Location: Córdoba (Spain)
Posts: 623
Different versions of xrandr can use different syntax, so, be sure you use xrandr -h and read the man page if available. Note also that the machine might be configured to use different video modes.

If your video card, monitor or driver doesn't support a given resolution, then it will not be available. The configuration of the Xorg server is also critical.
i92guboj is offline   Reply With Quote
Old 3 Days Ago   #8 (permalink)
ldb88
Just Joined!
 
Join Date: Jul 2006
Posts: 17
There were no error messages. It just didn't do anything.

I'm pretty sure I am using the correct syntax, since I have read the man page for the version I am using.

The 1280x1024 is listed when I type xrandr -q so I assume it is supported.

Strange things are happening, though. When I go to System->Preferences->Screen Resolution and tell it to change, it doesn't change anything. It shows the message asking if I want to keep the new resolution, but nothing changed. When I go back and check to see what it has as my current resolution, it still says the old one.
ldb88 is offline   Reply With Quote
Old 3 Days Ago   #9 (permalink)
i92guboj
Linux Enthusiast
 
Join Date: Nov 2007
Location: Córdoba (Spain)
Posts: 623
Most problems about non-standard resolutions (those that are not 3:4, like the one you are trying to use) are often due to refresh rate settings.

Make sure that you are specifying correct horizontal and vertical refresh ranges in your xorg.conf. Take them from the manual for your monitor. Maybe you will also need to write a Modeline line for that concrete mode.
i92guboj is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 02:54 PM.

Powered by vBulletin 3.6.8 ©2000 - 2007, content relevant URLs by vBSEO, Property of Core Root.

Content Relevant URLs by vBSEO 3.0.0