Managing display resolutions from the shell

Standard

A few days back, I connected my Fedora 17 system to an external LED monitor using the RGB port.
Was kind of startled to see that the external display came up with 4:3 resolution, when it should be 16:9. And worse, even my display manager showed only 4:3 resolutions as my options.
Naturally, the experience wasn’t good at all. Hence, I started to google and came up with a solution worth sharing :

1. To see the available resolutions, type,

xrandr -q

The output was :


Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
 1366x768 60.0*+
 1024x768 60.0
 800x600 60.3 56.2
 640x480 59.9
VGA1 connected 1024x768+1366+0 (normal left inverted right x axis y axis) 0mm x 0mm
 1024x768 60.0*
 800x600 60.3 56.2
 848x480 60.0
 640x480 59.9

Note : This output shows the modes available for each monitor.
2. Now, my required resolution was 1360×768.


gtf 1360 768 60

where 60 is the refresh rate.

I got an output like this :

# 1360x768 @ 60.00 Hz (GTF) hsync: 47.70 kHz; pclk: 84.72 MHz

Modeline "1360x768_60.00" 84.72 1360 1424 1568 1776 768 769 772 795 -HSync +Vsync

3. Copy the above line and paste with the command :

xrandr --newmode "1360x768_60.00"  84.72  1360 1424 1568 1776  768 769 772 795  -HSync +Vsync

4. Add this mode :

xrandr --addmode VGA1 1360x768_60.00

GNOME Display Manager

Worked like a charm for me. Hope this works for you as well. 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s