The most merciful thing in the world is the inability of the human mind to correlate all its contents.
H. P. Lovecraft
Qemu/kvm and xorg screen resolution

Fast virtualization is cheap nowadays on linux. Just apt-get install kvm on a recent kernel and VT-enabled processor and you are ready to run all kind of different os-es on your host. No more recompiling the vmware kernel modules *again* or fiddling with xen-modified kernels and difficult networking setups. Yeah!

One problem I encountered was getting a decent resolution (f.g. 1280x1024 or higher) in the guest xserver (xorg). Google was not really helpful this time so therefore I post this note for future reference. Qemu emulates two kind of video cards, standard is a cirrus, -std-vga provides you with a vesa one. Vesa was not able to help me (garbled screen), so using the (default) cirrus emulator is the way to go for a linux guest.

The trick was in changing the monitor sync and refresh rates, autodetection did not work properly (in my centos 4.0 guest). So here is my working snippet of /etc/X11/xorg.conf:

Section "Device"
  Identifier  "Generic Video Card"
  Driver      "cirrus"

Section "Monitor"
  Identifier  "Generic Monitor"
  Option    "DPMS"
  HorizSync 28-64
  VertRefresh 43-60
Posted by jochem on 2007-10-01, last update on 2007-10-01