Views and Feelings

My Photo
Name:
Location: Amsterdam, Netherlands

Sunday, 31 August 2008

Getting a higher resolution with your external monitor on an Asus Eee

Some Eee models (such as the 901) only offer up to 1024x768 resolution when you attach an external monitor. It took me a while to track down the problem, but here is the solution. (This doesn't seem to solve the problem with the 701 where higher resolutions only give static).

The solution comes in two parts. First, you need to change /etc/X11/xorg.conf, which is set up to say that the maximum resolution is that of the built-in screen.

Part one, do this once only

Open a terminal with ctrl-alt-T, and change to the right directory by typing:
    cd /etc/X11
Make a backup of the existing file, just in case:
    sudo cp xorg.conf xorg.conf.orig
Now edit the file to set up the correct maximum resolution:
    sudo kwrite xorg.conf
Find the line that says
    DefaultDepth   16
and change the 16 to 24.

Find all the lines that say
    Virtual   1024 768
(there were 4 of them in my file) and change them to:
    Virtual   2048 2048
Save the file (ctrl-S), and exit (ctrl-Q).

Now reboot (ctrl-alt-backspace is enough).

Now you have a system that is capable of handling higher resolutions.

Part two, do this each time you want to switch an external monitor on

Unfortunately, for some reason that I haven't yet cracked, the "Desktop Mode" program in the Settings tab still doesn't recognise the extended resolution (the resolutions it offers may be just hardwired in). So to start up the external monitor you have to use a terminal again.

Plug your monitor in, switch it on, and crank up a terminal again (ctrl-alt-T).

Type in the terminal:
    xrandr
This will then tell you which screens are available, and at what resolutions. Mine said:
    Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 2048 x 2048
  VGA connected 1680x1050+0+0 (normal left inverted right x axis y axis) 433mm x 271mm
  1680x1050 59.9*+ 60.0 1600x1200 59.9
   1280x1024 75.0
   1152x864 75.0
   1024x768 84.9 75.1 70.1 60.0
   1024x600 60.0
   832x624 74.6
   800x600 84.9 72.2 75.0 60.3 56.2
   800x480 60.0
   640x480 84.6 75.0 72.8 66.7 60.0
   720x400 70.1  
  LVDS connected 1024x600+0+0 (normal left inverted right x axis y axis) 195mm x 113mm
  1024x600 60.0*+ 60.0
   800x600 60.3
   800x480 60.0
   640x480 59.9
VGA is the name of the external screen, and LVGS the internal LCD. Now you can turn on your external screen.
    xandr --auto
and bingo!, this should leave you with both screens (internal and external) on, at the maximum resolution of the external screen.

You can also pick the resolution you want to use from the available list (for instance 1680x1050), and type in the terminal:
    xrandr --output VGA --mode 1680x1050
You can switch the internal LCD off with
    xrandr --output LVDS --off
To return to using just the laptop screen the 'Desktop Mode' program works just fine, but you can also type:
   xrandr --output LVDS --on   xrandr --output VGA --off

Advanced stuff

It works like this: you have a virtual screen of 2048x2048 (which is the largest the hardware supports). You have screens which are windows onto that space.

When you say 'xrandr --auto', both screens are windows on to the same part of the virtual screen (the top left part). However, either or both can be moved to another part.

Simple ways include:
    xrandr --output VGA --right-of LVDS
which puts the external screen to the right of the internal screen. So dragging stuff to the right of the internal screen will make them appear on the external screen.

But there is a caveat: the combined resolution in any direction must be less than 2048. So if you have the internal screen at 1024, the external screen may not be wider than 1024 for this to work.

However, since vertical resolutions are usually the smaller, this is likely to work for high-resolution external screens:
    xrandr --output VGA --above LVDS
(or --below). This is because the sum of the two vertical resolutions is likely to be less than 2048.
Then you have to drag windows to the top or the bottom of the internal screen to get them on the external monitor.

Another option is to have the two screens overlap slightly so that the combination doesn't exceed 2048.

So for instance, if you want to put a 1680x1050 screen to the right of the 1024x600 internal screen, they will have to overlap from pixel position (2048-1680)=368:
    xrandr --output LVDS --mode 1024x600 --pos 0x0 --output VGA --mode 1680x1050 --pos 368x0

Even more advanced stuff

You can even rotate one or more screens!
    xrandr --output LVDS --rotate left
Note that the mouse 'rotates' with it.

You can return it with
    xrandr --output LVDS --rotate normal

Labels: