Using Spice + QXL for a 16.04 guest running on a 16.04 KVM hypervisor. This was working normally until recently.

After the last reboot of the guest, resolution was set to 1024x768. When I try setting it back to 1680x1050 (or any resolution), the session freezes until the timeout reverts back to the previous resolution.

spice-vdagent and the xorg QXL driver are installed on the guest.

(edit: added additional info)

This allowed me to change the resolution, but is not persistent across reboots:

xrandr -s 1680x1050

I had this same issue, but I tried so many things that I am not sure what made the difference. Going in reverse of what I did to get a working solution.

1) In the KVM host, I changed the Video from "QXL" --> "VGA" (worked after this)

2) Updated ~/.config/monitors.xml with:

<monitors version="1">
  <configuration>
    <clone>no</clone>
    <output name="Virtual-0">
      <vendor>unknown</vendor>
      <product>unknown</product>
      <serial>unknown</serial>
      <width>1440</width>
      <height>900</height>
      <rate>59.990913391113281</rate>
      <x>0</x>
      <y>0</y>
      <rotation>normal</rotation>
      <reflect_x>no</reflect_x>
      <reflect_y>no</reflect_y>
      <primary>yes</primary>
      <presentation>no</presentation>
      <underscanning>no</underscanning>
    </output>
  </configuration>
  <configuration>
    <clone>no</clone>
    <output name="Virtual-0">
      <vendor>???</vendor>
      <product>0x0000</product>
      <serial>0x00000000</serial>
      <width>1440</width>
      <height>900</height>
      <rate>60</rate>
      <x>0</x>
      <y>0</y>
      <rotation>normal</rotation>
      <reflect_x>no</reflect_x>
      <reflect_y>no</reflect_y>
      <primary>yes</primary>
      <presentation>no</presentation>
      <underscanning>no</underscanning>
    </output>
  </configuration>
</monitors>

3) Updated /etc/default/grub adding: "GRUB_GFXMODE=1440x900" and then running "sudo update-grub"

4) Using advice from this post ( Reinstall package and its installed dependencies) to reinstall Gnome:

sudo apt-cache depends gnome | grep '[ |]Depends: [^<]' | cut -d: -f2 | tr -d ' ' | xargs sudo apt-get --reinstall install -y

Hope this helps!

  • Thanks for the info, but moving to VGA you lose many of the advantages of QXL. The goal here is to figure out how to get QXL + Spice working correctly again. – lrussell123 Jan 18 at 14:51

The problem is in a new HWE kernel in ubuntu 16.04 (4.13).

As a workaround you can use the kernel from LTS branch (4.4), it doesn't have this problem with resolution switch on QXL and spice, and seems to work good with another QEMU virtual hardware.

sudo apt-get install linux-generic-lts-xenial
sudo apt-get purge linux-image-4.13*

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.