Bug 680227

Summary: vdagent does not automatically align guest resolution while using multiple monitors
Product: Red Hat Enterprise Linux 6 Reporter: Marian Krcmarik <mkrcmari>
Component: spice-vdagentAssignee: Hans de Goede <hdegoede>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: high    
Version: 6.1CC: dblechte, hdegoede, lkocman, mkenneth
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spice-vdagent-0.6.3-6.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 13:13:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
PATCH: fix setting the resolution through the agent from multi mon clients none

Description Marian Krcmarik 2011-02-24 18:19:30 UTC
Description of problem:
It's not able to connect to a VM using spice client from cli using --full-screen=auto-conf, --disable-effects wallpaper/font-smooth/animation/all and --color-depth 16/32 options.

Version-Release number of selected component (if applicable):
spice-client-0.7.3-1.el6.x86_64
spice-vdagent-0.6.3-5.el6.x86_64
Host: Linux 2.6.32-71.el6.x86_6
Client and Guest: Linux 2.6.32-114.0.1.el6.x86_64

Steps to Reproduce:
1. Run VM with vdagent (/usr/libexec/qemu-kvm -vga qxl -m 1024 -spice port=3001,disable-ticketing -device virtio-serial -chardev spicevmc,id=vdagent,debug=0,name=vdagent -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 /dev/rootvg/RHEL61_x64_mkrcmari)
2. Try to connect to the Guest with using spicec and --color-depth option
(spicec  -h 10.34.58.2 -p 3001 --color-depth 32)
  
Actual results:
It fails with output:
Warning: abort
Error: unhandled exception: vdagent timeout

Expected results:
It should connect to the Guest with desired property indicated by option.

Additional info:
without the options connection is established properly and properties enabled by vdagent work fine.

Comment 2 Hans de Goede 2011-03-01 14:20:48 UTC
It does work with spice on spice, so it looks like a vnc bug/issue to us.

Comment 3 Marian Krcmarik 2011-03-02 15:41:52 UTC
I reopen the bug.
Options  --disable-effects wallpaper/font-smooth/animation/all
and --color-depth 16/32 are not supported now for RHEL clients, but option --full-screen=auto-conf should be supported, but It doesn't work in RHEL6.1 client in configuration mentioned above (see comment 0).
Resolution is not switched to native resolution of display.

Comment 5 Lubos Kocman 2011-03-02 15:51:00 UTC
Last comment is wrong. It does work with windows guest but not with Linux guest.

xrandr  sees wide range of resolutions but guest resolution is not aligned with client resolution.

Reproducibility 100% with latest spice-vdagent

Comment 6 Lubos Kocman 2011-03-02 15:52:07 UTC
It should be blocker for this component. As one of three features is not working.

Comment 7 Hans de Goede 2011-03-02 16:19:08 UTC
Hi,

What you're seeing is likely pretty much the same thing as bug 674796. The linux spice-vdagent (nor the newer windows agent (fixed in the latest windows ver)) will not work unless the virtual machine uses a virtio serial port for the agent channel. qemu-kvm in RHEL-6.0 still uses the custom vdiport pci-device. Please retry with a 6.1 hosted vm (sorry). Make sure that you've a version of qemu which is using spice-server-0.6.x or higher (0.7.x or 0.8.0). Also try disabling selinux in the guest, there are some known issues with selinux and spice-vdagent. If it works with selinux disabled, but not with it enabled, please file a separate bug for this!!

Thanks,

Hans

Comment 8 Marian Krcmarik 2011-03-02 18:28:46 UTC
I retried with RHEL6.1 - all Host, Guest, Client and the same configuration.

Host and Client
$ rpm -qa | egrep "qemu-kvm|spice"
spice-client-0.7.3-1.el6.x86_64
spice-server-0.7.3-2.el6.x86_64
spice-server-debuginfo-0.7.3-2.el6.x86_64
spice-vdagent-0.6.3-5.el6.x86_64
qemu-kvm-debuginfo-0.12.1.2-2.148.el6.x86_64
qemu-kvm-0.12.1.2-2.148.el6.x86_64
spice-client-debuginfo-0.7.3-1.el6.x86_64

Guest:
SELinux disabled.
$ rpm -qa | grep vdagent && service spice-vdagentd status
spice-vdagent-0.6.3-5.el6.x86_64
spice-vdagentd (pid  1529) is running...

I run qemu-kvm with virtio serial options manually:
sudo /usr/libexec/qemu-kvm -vga qxl -m 2048 -spice port=3001,disable-ticketing -device virtio-serial -chardev spicevmc,id=vdagent,debug=0,name=vdagent -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 /dev/rootvm/RHEL61_x64_test

It does not work for me anyway but what I noticed and I didn't mention earlier is that I am using two displays - first one is laptop's and second one is external display and after starting spicec with --full-screen-auto-conf resolution of guest is not aligned with client resolution of external display where spicec window always opens. 
If I do turn external display off then Guest resolution after starting spicec is aligned on my only one laptop as It is expected.
With windows guests it does work.

Comment 9 Hans de Goede 2011-03-07 14:01:12 UTC
Created attachment 482683 [details]
PATCH: fix setting the resolution through the agent from multi mon clients

Here is a patch fixing this, adding devel-ack.

Comment 11 Lubos Kocman 2011-03-08 11:19:49 UTC
Verified on spice-vdagent-0.6.3-6.el6.{i686,x86_64}

Comment 12 errata-xmlrpc 2011-05-19 13:13:06 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0576.html