This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 992961 - Can't expand guest window to a big size when zoom in the guest to very small
Can't expand guest window to a big size when zoom in the guest to very small
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-viewer (Show other bugs)
6.5
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Daniel Berrange
Virtualization Bugs
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-05 05:49 EDT by CongDong
Modified: 2015-05-11 18:16 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-06 02:32:23 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
spice-vdagent.log (339 bytes, text/plain)
2013-08-05 05:49 EDT, CongDong
no flags Details
virt-viewer debug log (12.77 KB, text/plain)
2013-08-05 05:50 EDT, CongDong
no flags Details

  None (edit)
Description CongDong 2013-08-05 05:49:02 EDT
Description of problem:
Connect guest with virt-viewer, I can't expand the guest window to a big size  when zoom in the rhel guest to very small.

Version-Release number of selected component (if applicable):
virt-viewer-0.5.6-6.el6.x86_64
libvirt-0.10.2-21.el6.x86_64
qemu-kvm-0.12.1.2-2.382.el6.x86_64
spice-vdagent-0.14.0-1.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Prepare a rhel guest with spice+qxl+spicevmc, make sure the spice-vdagentd is running.
2.# virt-viewer $guest -z 10, can see the window will popup with a small size.
3.Drag the window's edge or cornet with mouse, try to expend the window size to a big one.

Actual results:
Step3, When drag the window to a big one, after release the moune, the window will change to the previous size.

Expected results:
The window should change the size successfully.

Additional info:
Comment 1 CongDong 2013-08-05 05:49:32 EDT
Created attachment 782731 [details]
spice-vdagent.log
Comment 2 CongDong 2013-08-05 05:50:06 EDT
Created attachment 782732 [details]
virt-viewer debug log
Comment 4 Hans de Goede 2013-08-05 05:55:29 EDT
Sounds like a client issue to me changing component to virt-viewer.
Comment 5 Hans de Goede 2013-08-05 06:22:02 EDT
Correction, this is not a client issue, it is not a bug.

If you set zoom to a 10%, and try to make the window 400x300 then the guest resolution will be 4000x3000 which is to big for video memory, this also matches the error messages in vdagent.log:

Aug  5 05:29:04.789761 spice-vdagent[2460]: err: XRRSetScreenSize failed, not enough mem?
Aug  5 05:29:04.789776 spice-vdagent[2460]: warning: Restoring previous config
Aug  5 05:29:11.778181 spice-vdagent[2460]: err: XRRSetScreenSize failed, not enough mem?
Aug  5 05:29:11.778197 spice-vdagent[2460]: warning: Restoring previous config

The agent restores the original config when it runs out of video memory, which matches with the window snapping back to its original size.
Comment 6 CongDong 2013-08-06 02:24:20 EDT
(In reply to Hans de Goede from comment #5)
> Correction, this is not a client issue, it is not a bug.
> 
> If you set zoom to a 10%, and try to make the window 400x300 then the guest
> resolution will be 4000x3000 which is to big for video memory, this also
> matches the error messages in vdagent.log:
> 
> Aug  5 05:29:04.789761 spice-vdagent[2460]: err: XRRSetScreenSize failed,
> not enough mem?
> Aug  5 05:29:04.789776 spice-vdagent[2460]: warning: Restoring previous
> config
> Aug  5 05:29:11.778181 spice-vdagent[2460]: err: XRRSetScreenSize failed,
> not enough mem?
> Aug  5 05:29:11.778197 spice-vdagent[2460]: warning: Restoring previous
> config
> 
> The agent restores the original config when it runs out of video memory,
> which matches with the window snapping back to its original size.

Thanks so much for your reply.
I tried to expend the window to a bigger one with a small increment, it works, but if I change it to a really big one, it will change to the previous one.

BTW, how can I get the biggest resolution for the guest?

And there is still a problem, the initial resolution of the window is not correct.
# virt-viewer $NAME,  now the resolution is 800*600, close the window.
# virt-viewer $NAME -z 10, I checked the resolution, it's 2000*600.

I think the resolution shuldn't higher or wider than the physical monitor.
Comment 7 Hans de Goede 2013-08-06 02:32:23 EDT
(In reply to CongDong from comment #6)
> I tried to expend the window to a bigger one with a small increment, it
> works, but if I change it to a really big one, it will change to the
> previous one.

That is expected behavior, the giest cannot be resized to the large size since there is not enough video memory. When the resize fails the agent restores the last known working settings.

> BTW, how can I get the biggest resolution for the guest?

By using a smaller zoom factor, ie 50% instead of 10%

> And there is still a problem, the initial resolution of the window is not
> correct.
> # virt-viewer $NAME,  now the resolution is 800*600, close the window.
> # virt-viewer $NAME -z 10, I checked the resolution, it's 2000*600.

That is because you first did a small resize which did work, when the resize fails, the resolution gets set to the last known working resolution which is the resolution after the small resize.
Comment 8 CongDong 2013-08-06 04:07:41 EDT
(In reply to Hans de Goede from comment #7)
> (In reply to CongDong from comment #6)
> > I tried to expend the window to a bigger one with a small increment, it
> > works, but if I change it to a really big one, it will change to the
> > previous one.
> 
> That is expected behavior, the giest cannot be resized to the large size
> since there is not enough video memory. When the resize fails the agent
> restores the last known working settings.
> 
> > BTW, how can I get the biggest resolution for the guest?
> 
> By using a smaller zoom factor, ie 50% instead of 10%
> 
> > And there is still a problem, the initial resolution of the window is not
> > correct.
> > # virt-viewer $NAME,  now the resolution is 800*600, close the window.
> > # virt-viewer $NAME -z 10, I checked the resolution, it's 2000*600.
> 
> That is because you first did a small resize which did work, when the resize
> fails, the resolution gets set to the last known working resolution which is
> the resolution after the small resize.

Yeah, I know what you mean ,and I agree with you, bug I'm afraid you don't see my point.

The problem is "-z" will change the resolution without resize operation.

Steps:
1. # virt-viewer $NAME , and check the resolution, it's 800*600
   Close the window.
2. Connect the guest again with -z
# virt-viewer $NAME -z 10, check the resolution, it's 2000*600, not the last known working resolution.

The following is the virt-viewer debug message:
# virt-viewer rhel64 -z 10 --debug
Gtk-Message: Failed to load module "pk-gtk-module": libpk-gtk-module.so: cannot open shared object file: No such file or directory
(virt-viewer:31209): virt-viewer-DEBUG: Insert window 0 0x9fab70
(virt-viewer:31209): virt-viewer-DEBUG: fullscreen display 0: 0
(virt-viewer:31209): virt-viewer-DEBUG: connecting ...
(virt-viewer:31209): virt-viewer-DEBUG: Opening connection to libvirt with URI <null>
(virt-viewer:31209): virt-viewer-DEBUG: Add handle 7 1 0xa98970
(virt-viewer:31209): virt-viewer-DEBUG: initial connect
(virt-viewer:31209): virt-viewer-DEBUG: notebook show status 0xa32000
(virt-viewer:31209): virt-viewer-DEBUG: notebook show status 0xa32000
(virt-viewer:31209): virt-viewer-DEBUG: Guest rhel64 is running, determining display
(virt-viewer:31209): virt-viewer-DEBUG: Set connect info: (null),(null),(null),-1,(null),(null),(null),0
(virt-viewer:31209): virt-viewer-DEBUG: Guest rhel64 has a spice display
(virt-viewer:31209): virt-viewer-DEBUG: Guest graphics address is 0.0.0.0:5900
(virt-viewer:31209): virt-viewer-DEBUG: Guest graphics listen '0.0.0.0' is NULL or a wildcard, replacing with 'localhost'
(virt-viewer:31209): virt-viewer-DEBUG: Set connect info: localhost,localhost,5900,-1,(null),(null),(null),0
(virt-viewer:31209): virt-viewer-DEBUG: Error operation virDomainOpenGraphics forbidden for read only access
(virt-viewer:31209): virt-viewer-DEBUG: After open connection callback fd=-1
(virt-viewer:31209): virt-viewer-DEBUG: Opening direct TCP connection to display at localhost:5900:-1
(virt-viewer:31209): virt-viewer-DEBUG: New spice channel 0xabe390 SpiceMainChannel 0
(virt-viewer:31209): virt-viewer-DEBUG: Checking full screen auto-conf
(virt-viewer:31209): virt-viewer-DEBUG: auto-conf disabled
(virt-viewer:31209): virt-viewer-DEBUG: notebook show status 0xa32000
(virt-viewer:31209): virt-viewer-DEBUG: Add timeout 0xa981b0 -1 0x31924ac500 0xa98f30 1
(virt-viewer:31209): virt-viewer-DEBUG: main channel: opened
(virt-viewer:31209): virt-viewer-DEBUG: notebook show status 0xa32000
(virt-viewer:31209): virt-viewer-DEBUG: Checking full screen auto-conf
(virt-viewer:31209): virt-viewer-DEBUG: auto-conf disabled
(virt-viewer:31209): virt-viewer-DEBUG: New spice channel 0xb10e00 SpiceCursorChannel 0
(virt-viewer:31209): virt-viewer-DEBUG: New spice channel 0xb26c00 SpiceDisplayChannel 0
(virt-viewer:31209): virt-viewer-DEBUG: New spice channel 0xb20c00 SpiceInputsChannel 0
(virt-viewer:31209): virt-viewer-DEBUG: new inputs channel
(virt-viewer:31209): virt-viewer-DEBUG: creating spice display (#:0)
(virt-viewer:31209): virt-viewer-DEBUG: creating spice display (#:1)
(virt-viewer:31209): virt-viewer-DEBUG: Insert window 1 0xa53ce0
(virt-viewer:31209): virt-viewer-DEBUG: creating spice display (#:2)
(virt-viewer:31209): virt-viewer-DEBUG: Insert window 2 0xa6aed0
(virt-viewer:31209): virt-viewer-DEBUG: creating spice display (#:3)
(virt-viewer:31209): virt-viewer-DEBUG: Insert window 3 0xc17940
(virt-viewer:31209): virt-viewer-DEBUG: Preparing main window resize
(virt-viewer:31209): virt-viewer-DEBUG: Decided todo 800x600 (desktop is 800x600, fullscreen is 1680x1050
(virt-viewer:31209): virt-viewer-DEBUG: notebook show status 0xa32000
(virt-viewer:31209): virt-viewer-DEBUG: notebook show status 0xa322a0
(virt-viewer:31209): virt-viewer-DEBUG: notebook show status 0xa32540
(virt-viewer:31209): virt-viewer-DEBUG: notebook show status 0xa327e0
(virt-viewer:31209): virt-viewer-DEBUG: Display size request 80x60 (desktop 800x600)
(virt-viewer:31209): virt-viewer-DEBUG: notebook show display 0xa32000

(virt-viewer:31209): GSpice-WARNING **: Warning no automount-inhibiting implementation available
(virt-viewer:31209): virt-viewer-DEBUG: Allocated 200x60
(virt-viewer:31209): virt-viewer-DEBUG: Child allocate 80x60
(virt-viewer:31209): virt-viewer-DEBUG: Display size request 50x50 (desktop 800x600)
(virt-viewer:31209): virt-viewer-DEBUG: Allocated 200x60
(virt-viewer:31209): virt-viewer-DEBUG: Child allocate 80x60
(virt-viewer:31209): virt-viewer-DEBUG: Preparing main window resize
(virt-viewer:31209): virt-viewer-DEBUG: Decided todo 2000x600 (desktop is 2000x600, fullscreen is 1680x1050
(virt-viewer:31209): virt-viewer-DEBUG: Display size request 200x60 (desktop 2000x600)
(virt-viewer:31209): virt-viewer-DEBUG: Allocated 200x60
(virt-viewer:31209): virt-viewer-DEBUG: Child allocate 200x60
(virt-viewer:31209): virt-viewer-DEBUG: Display size request 50x50 (desktop 2000x600)
(virt-viewer:31209): virt-viewer-DEBUG: Allocated 200x60
(virt-viewer:31209): virt-viewer-DEBUG: Child allocate 200x60
(virt-viewer:31209): virt-viewer-DEBUG: notebook show status 0xa32000
(virt-viewer:31209): virt-viewer-DEBUG: notebook show display 0xa32000
(virt-viewer:31209): virt-viewer-DEBUG: Display size request 50x50 (desktop 2000x600)
(virt-viewer:31209): virt-viewer-DEBUG: Allocated 200x60
(virt-viewer:31209): virt-viewer-DEBUG: Child allocate 200x60
(virt-viewer:31209): virt-viewer-DEBUG: Dispatch handler 7 1 0xa98970
(virt-viewer:31209): virt-viewer-DEBUG: Dispatch handler 7 2 0xa98970


As the debug, the virt-viewer window's size is 200*60, so the resolution is changed to match that, but the resolution should keep 800*600.
Comment 9 Hans de Goede 2013-08-06 05:13:01 EDT
(In reply to CongDong from comment #8)
> As the debug, the virt-viewer window's size is 200*60, so the resolution is
> changed to match that, but the resolution should keep 800*600.

800x600 with a zoom of 10% translates to a size for the vm-display part of the window of 80x60, but the minimum with is 200, since you've auto-resize enabled then the guest gets resized to fit into the 200x60 window. So this is expected behavior.

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