Bug 754559 - RFE: option to auto change guest resolution with spice+agent
Summary: RFE: option to auto change guest resolution with spice+agent
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: virt-manager
Version: 20
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Cole Robinson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 804099 (view as bug list)
Depends On: 754562
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-16 20:38 UTC by David Jaša
Modified: 2015-04-28 13:37 UTC (History)
21 users (show)

Fixed In Version: virt-manager-1.0.0-3.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 754562 (view as bug list)
Environment:
Last Closed: 2014-03-04 06:46:50 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
unnecessary black stripes (1.02 MB, image/png)
2011-11-16 20:38 UTC, David Jaša
no flags Details
right edge of guest screen hidden under black stripe after manual resize to client resolution (1.04 MB, image/png)
2011-11-16 20:40 UTC, David Jaša
no flags Details
test case virt-manager-1.0 (436.47 KB, application/x-tar-gz)
2014-02-26 16:21 UTC, Emilio Scalise
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 491683 0 medium CLOSED virt-manager no longer auto adjusts to guest screen size 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1216099 0 unspecified CLOSED virt-manager does not show full desktop at high display resolution 2021-02-22 00:41:40 UTC

Internal Links: 491683 1216099

Description David Jaša 2011-11-16 20:38:26 UTC
Created attachment 534081 [details]
unnecessary black stripes

Description of problem:
SSIA

Version-Release number of selected component (if applicable):
all versions up to latest virt-manager-0.9.0-8.fc17

How reproducible:
always

Steps to Reproduce:
1. run a guest with a console in window
2. make sure that qxl driver and spice-vdagent up & running within the guest
2. make sure that guest supports client native resolution
4. make sure that in console window, option View -> Scale Display -> Always is checked
5. switch console window to fullscreen
  
Actual results:
1. window is switched to full screen but guest resolution is changed to lower than client-native (e.g. to 1440x900 on 1600x900 client - screenshot - or 1600x900 on 1680x1050 client), leaving black stripes at the edge of the screen
2. when user increases guest resolution to client-native, black stripes are not eliminated, but guest display will overflow leaving some part of guest display hidden (see screenshot 2)

Expected results:
guest is resized to the same resolution as client

Additional info:
another symptom: when window is resized so that spice-gtk widget can occupy ~1400x1000 pixels, 1280x720 is picked instead of bigger 1280x960, and again, when user increases relution manually, the client canvas is not resized but part of guest screen is not displayed at all.

spicy does not suffer these problems so it might make sense to compare the implementation of spice-gtk windget in both clients

Comment 1 David Jaša 2011-11-16 20:40:56 UTC
Created attachment 534082 [details]
right edge of guest screen hidden under black stripe after manual resize to client resolution

Comment 2 Cole Robinson 2011-12-09 21:34:45 UTC
Sounds like this might be spice or agent issues? Reassigning there for further triage but please reassign to virt-manager if it is the culprit.

David, can you reproduce using virt-viewer or vinagre?

Comment 3 David Jaša 2011-12-09 23:57:24 UTC
(In reply to comment #2)
> Sounds like this might be spice or agent issues? Reassigning there for further
> triage but please reassign to virt-manager if it is the culprit.

See end of the original report. The problem is nowhere in spice stack because the feature works flawlessly in at least one spice-gtk-based client, that's why I blame virt-manager.

> 
> David, can you reproduce using virt-viewer or vinagre?

I used spicy for verification before reporting. ATM, I have access only to RHEL machine where virt-viewer does not trigger display resize at all (it only scales guest's display) and vinagre does not support spice at all.

Comment 4 Cole Robinson 2012-01-25 20:51:35 UTC
This is essentially a request for auto changing guest resolution based on window size adjustment.

Comment 5 David Jaša 2012-01-26 11:31:03 UTC
(In reply to comment #4)
> This is essentially a request for auto changing guest resolution based on
> window size adjustment.

The auto-change of guest resolution itself already works, it's just buggy - described in #c0. I suggest you to spend five minutes reproducing steps in #c0 with spicy and virt-manager and you will see yourself.

Comment 6 Cole Robinson 2012-01-26 12:55:22 UTC
David, sorry if that came off as terse, it was really more a note for myself. I meant supporting this in virt-manager. I am aware that spice and spicey/spice-gtk already allow this, we just need to wire up some UI to enable that feature in virt-manager.

Comment 7 David Jaša 2012-01-26 13:13:22 UTC
(In reply to comment #6)
> David, sorry if that came off as terse, it was really more a note for myself. 

no harm done.

> I
> meant supporting this in virt-manager. I am aware that spice and
> spicey/spice-gtk already allow this, we just need to wire up some UI to enable
> that feature in virt-manager.

From my experience, all the necessary UI bits are already in virt-manager, the only two problems are this bug and virt-manager occasional freezes (that made me switch to virt-viewer instead for daily use).

Comment 8 Julian Sikorski 2012-03-28 20:26:51 UTC
Same here. spicy works with both Windows 7 and Fedora 17 guests, while virt-manager does not.

Comment 9 Julian Sikorski 2012-03-28 20:29:53 UTC
Also, with my guests configured to 1280x800 and host running in 1920x1080, going fullscreen in virt-manager does absolutely nothing.

Comment 10 Emilio Scalise 2013-02-03 11:07:49 UTC
This happens also on  virt-manager / virt-viewer on fedora 17 with fedora-virt-preview repo enabled (so probably also on f18 as the package versions are similar).
My guest is xp, and I've installed spice package version 0.3. vdagent is running fine on it.

Using spicy from spice-gtk-tools-0.16-1.f17 resolution change works well.

Comment 11 Sam Kingston 2013-05-15 06:26:49 UTC
I can confirm this behaviour in virt-manager 0.9.5-1 on F18. vinagre/virt-viewer scales correctly to the window size, but virt-manager console will only scale when set to full-screen (in which case it scales up to host's resolution as expected).

Comment 12 Robert Hancock 2013-07-08 04:45:04 UTC
Doesn't work in F19 either. When connecting with spicy, the guest desktop does (if the option is enabled) resize when the window size is changed, but this doesn't seem to work in virt-manager.

Comment 13 Cole Robinson 2013-08-17 15:03:19 UTC
*** Bug 804099 has been marked as a duplicate of this bug. ***

Comment 14 Sam Hegarty 2013-08-30 14:04:28 UTC
This feature can be fairly easily implemented. Just involves setting the "resize" property on the SpiceClientGtk.Display. How should this be implemented in the UI? I personally expected the scale display options to do this if it was possible.

Comment 15 Sam Hegarty 2013-08-30 14:05:14 UTC
"resize-guest" that is sorry.

Comment 16 Emilio Scalise 2014-01-27 09:46:19 UTC
Using 
virt-manager-0.10.0-5.git1ffcc0cc.fc19.noarch

from virt-preview repo on fedora 19, this still happens.

Any news?

Comment 17 Cole Robinson 2014-01-31 14:07:19 UTC
This will be upstream shortly. So the next virt-manager update will have an auto resize option available. it will be disabled by default, but you can enable it globally in Edit->Preferences or per-vm in the View->Scaling menu.

Since there seem to be quite a few people watching this bug, I'm moving it to the fedora tracker so folks know when it hits F20 and virt-preview. The next virt-manager release is planned for 2 weeks from now.

Also, we are now tracking a larger console/display rework in a different upstream bug, if people are looking for further improvements:

https://bugzilla.redhat.com/show_bug.cgi?id=1060226

Comment 18 Cole Robinson 2014-01-31 15:15:17 UTC
Upstream now

Comment 19 Fedora Update System 2014-02-15 00:56:57 UTC
virt-manager-1.0.0-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/virt-manager-1.0.0-1.fc20

Comment 20 Fedora Update System 2014-02-18 23:03:53 UTC
virt-manager-1.0.0-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/virt-manager-1.0.0-2.fc20

Comment 21 Fedora Update System 2014-02-22 00:38:51 UTC
Package virt-manager-1.0.0-2.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing virt-manager-1.0.0-2.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-2789/virt-manager-1.0.0-2.fc20
then log in and leave karma (feedback).

Comment 22 Emilio Scalise 2014-02-24 12:11:52 UTC
Hi, I upgraded my system to fedora 20, and installed virt-manager 1.0.0-2 from testing updates.

I tried with my windows 7 VM, with spice agent (virtio-win 0.1-52
QXL 0.1-16
mingw-vdagent-win 0.7.0).

Resize guest with windows works well when it's disabled (!!), that's strange!

If I enable screen resize -> always then I cannot reduce virt-manager window size (only enlarge it, and guest resolution is changed).

"auto resize window with vm" setting does nothing, it's always enabled.


I'm happy because it works, but settings menu is broken for me.

Comment 23 Cole Robinson 2014-02-26 15:23:29 UTC
(In reply to Emilio Scalise from comment #22)
> Hi, I upgraded my system to fedora 20, and installed virt-manager 1.0.0-2
> from testing updates.
> 
> I tried with my windows 7 VM, with spice agent (virtio-win 0.1-52
> QXL 0.1-16
> mingw-vdagent-win 0.7.0).
> 
> Resize guest with windows works well when it's disabled (!!), that's strange!
> 

Do you mean when 'Autosize VM with window' is grayed out? If so, when you roll over that item, what does the tooltip say?

> If I enable screen resize -> always then I cannot reduce virt-manager window
> size (only enlarge it, and guest resolution is changed).
> 
> "auto resize window with vm" setting does nothing, it's always enabled.
> 

Always enabled? Like, even if you click it the check mark doesn't go away?

Can you run with virt-manager --debug and see if there's any backtraces when you are clicking around?

Comment 24 Emilio Scalise 2014-02-26 15:53:47 UTC
checkmark is not grayed, and it works (graphically).
Functionally, it's behaviour is always on, if I tick it or not, guest resolution is always changed if I resize guest window.

Do I need to provide you a video? What program can I use to do so?
I think that a screenshot is not sufficient.

Comment 25 Emilio Scalise 2014-02-26 15:55:22 UTC
I'll send you debug output as soon as I can..

Comment 26 Emilio Scalise 2014-02-26 16:21:41 UTC
Created attachment 868098 [details]
test case virt-manager-1.0

Here are some screenshots, debug output and my rpm package versions.

What I did to reproduce this "always on" behaviour:
- clean reboot of my fedora machine
- virt-manager --debug
- started my windows 7 VM, with spice agent (virtio-win 0.1-52 QXL 0.1-16 mingw-vdagent-win 0.7.0
- screenshot on boot, option "auto resize vm with window" grayed out, that's correct since vdagent is not yet running
- screenshot on boot completed "auto resize vm with window" is enabled
- if I resize guest window, guest resolution is changed correctly
- maximize window, resolution is changed again. Disable "auto resize vm with window"
- resize again window, I expect that resolution is not changed on guest, but it is.
- maximize again, resolution is changed again.

So the "auto resize vm with window" setting seems always enabled.

Global setting "resize guest with window" is off.

Comment 27 Cole Robinson 2014-02-26 16:29:29 UTC
Thanks for the detailed info. Could be an issue with the windows spice agent or similar.

Can you install spice-gtk-tools and try to reproduce the issue with the 'spicy' tool? You need to do

spicy --host localhost --port 5900

(but check sudo virsh dumpxml $vmname when the windows VM is running to see what actual port is in use).

Make sure it says 'agent: yes' at the bottom, and turn off options->resize guest... and see if the display resolution still autochanges.

Comment 28 Emilio Scalise 2014-02-27 10:00:57 UTC
Same VM, spicy works as expected:
- options->resize guest enabled, guest is resized
- options->resize guest disabled, guest is not resized, image is scaled only if scale display is enabled.

I think that's not a vdagent problem.

Comment 29 Cole Robinson 2014-02-28 16:48:48 UTC
Thanks Emilio, indeed unsetting the 'auto resize' property from virt-manager's UI was busted. Fixed upstream now:

commit 4a2493f1e4bede671eac713081f61965f036d6ed
Author: Cole Robinson <crobinso>
Date:   Fri Feb 28 11:46:05 2014 -0500

    console: Fix unsetting 'resize-guest' property from UI
    
    Reported in the followup of bz 754559

Comment 30 Fedora Update System 2014-02-28 18:25:19 UTC
virt-manager-1.0.0-3.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/virt-manager-1.0.0-3.fc20

Comment 31 Fedora Update System 2014-03-04 06:46:50 UTC
virt-manager-1.0.0-3.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.