Monday, January 17, 2011

Increasing the X resolution for KVM guests

Today I wondered again, why my KVM guests get only 800x600 display resolution, even though the framebuffer console is configured for 1024x768. While most of the time this does not matter for testing, it does once you want to evalutate desktop environments or such in a VM.
I checked the xorg log file and found, that the Cirrus card emulation apparently has no DDC channel implemented, thus cannot detect the monitor and then X.org falls back to a plain SVGA monitor. From the logfile:
Using default hsync range of 31.50-37.90 kHz
Using default vrefresh range of 50.00-70.00 Hz

Simply setting those ranges to something reasonable (I got my values from "hwinfo --monitor") helps quite a lot. Put this into /etc/X11/xorg.conf.d/50-monitor.conf:
  HorizSync   31 - 61
VertRefresh 50 - 90
and you get a much more usable 1024x768 resolution.

2 comments:

  1. Andreas Schneider17 January, 2011 16:37

    Why don't you simply use the vmware graphics driver?

    ReplyDelete
  2. The VGA / VESA framebuffer emulation of vmvga (which is used during GRUB / system boot) is very slow, I'd say unusably slow, but yes, for guests that are used mainly for testing desktops, this might be an option.
    Maybe someone will write a vmvga KMS driver, then this will be the best option for sure ;)

    ReplyDelete