Changing to the desired ubuntu resolution

The Ubuntu 9.10 upwards supports 1024×768 resolution. You can run the commands below to achieve the resolution you want

Use xrandr to find current mode used & output name.
e.g here VGA1 is used, it is easy to use current output name.

xrandr

samlpe output:
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192
VGA1 connected 1024×768+0+0 (normal left inverted right x axis y axis) 310mm x 230mm
   1024×768       85.0*+   75.1
   800×600        75.0
   640×480        75.0     60.0
   720×400        70.1

find modeline details for resolution 1240×1024 using the cvt command. Modeline is required for xrandr.

cvt 1240 1024

sample output:
# 1240×1024 59.93 Hz (CVT) hsync: 63.71 kHz; pclk: 105.50 MHz
Modeline “1240x1024_60.00”  105.50  1240 1320 1448 1656  1024 1027 1037 1063 -hsync +vsync

Use modeline config with xrandr to add resolution mode with the command below.

xrandr –newmode “1240x1024_60.00”  105.50  1240 1320 1448 1656  1024 1027 1037 1063 -hsync +vsync

 xrandr

output
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192
VGA1 connected 1024×768+0+0 (normal left inverted right x axis y axis) 310mm x 230mm
   1024×768       85.0*+   75.1
   800×600        75.0
   640×480        75.0     60.0
   720×400        70.1
  1240x1024_60.00 (0x102)  105.5MHz
        h: width  1240 start 1320 end 1448 total 1656 skew    0 clock   63.7KHz
        v: height 1024 start 1027 end 1037 total 1063           clock   59

Use following command to add new mode

xrandr –addmode VGA1 1240x1024_60.00

you can change output using the command below  or  go to System–> Preferenses –> Display

xrandr –output VGA1 –mode 1240x1024_60.00

to make the command permanent you need to edit the file /etc/gdm/PreSession/Default

xrandr –newmode “1240x1024_60.00”  105.50  1240 1320 1448 1656  1024 1027 1037 1063 -hsync +vsync
xrandr –addmode VGA1 1240x1024_60.00

alternatively you can edit the file /etc/gdm/Init/Default to make the changes permanent

gksudo gedit /etc/gdm/Init/Default

Look for the following lines

    PATH=/usr/bin:$PATH
    OLD_IFS=$IFS

and Add the the following lines below them

xrandr –newmode “1024×768″ 70.00 1024 1072 1176 1328 768 771 775 798 -hsync +vsync

    xrandr –addmode VGA1 1024x768_60.00

    xrandr –output VGA1 –mode 1024×768
Reboot to enable the more resolution mode in System–> Preferences –> Display when you need to select the desired resolution

You can remove any mode using the command below

xrandr –rmmode 1240x1024_60.00

Screen 0: minimum 320 x 200, current 1024 x 768, maximum 4096 x 4096
VGA1 connected 800×600+0+0 (normal left inverted right x axis y axis) 267mm x 200mm
800×600 85.1* +
640×480 75.0 60.0
720×400 70.1

Advertisements

Comments are closed.

%d bloggers like this: