Bug 1060226 - RFE: Rework console scaling/resizing to work more like virtualbox
Summary: RFE: Rework console scaling/resizing to work more like virtualbox
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Virtualization Tools
Classification: Community
Component: virt-manager
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Cole Robinson
QA Contact:
URL:
Whiteboard:
: 1216099 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-31 14:00 UTC by Cole Robinson
Modified: 2020-09-10 00:00 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-09-10 00:00:50 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1093998 0 unspecified CLOSED Gtk2 [e.g. via Xfce] resolution not preserved across logon/reboot 2021-02-22 00:41:40 UTC

Internal Links: 1093998

Description Cole Robinson 2014-01-31 14:00:01 UTC
This comes from:

https://bugzilla.redhat.com/show_bug.cgi?id=969416#c5

> Vojtech reported this bug on my request. I think the answer depends on
> whether virt-manager will (in the new version) intelligently update the
> window size when guest resolution changes.
> 
> Because I really like what VirtualBox does:
> 1. It matches window size to guest resolution on startup.
> 2. It changes window size to guest resolution on every resolution change,
> unless it's maximized or fullscreen.
> 3. If you have additions installed, it changes guest resolution to match
> your window size.
> 4. It has keyboard shortcuts, which work and don't override guest shortcuts
> at the same time. I can use it the match window size easily, if needed.
> 
> Compared to virt-manager:
> 1. I have a wrong window size on every single startup. It's cased by my
> secondary small screen. (Reported also here, might be a gnome-shell bug:
> https://bugzilla.gnome.org/show_bug.cgi?id=707378 )
> 2. The window size is not adjusted to guest resolution on any resolution
> change.
> 3. The guest resolution is not matched to window size, even though we
> control our full software stack.
> 4. Keyboard shortcuts are not available (overriding the guest ones is not an
> option for me).
> ===> I need to dig deep in the menu (using the mouse) to match window size
> to guest resolution on _every_ VM startup (and I start a lot of VMs during
> my usual work day).
> 
> In addition, I'm forced to use scale=always, because on my 12" notebook
> screen (1366x768) the window with a default Fedora guest simply does not
> fit. Unfortunately, as a result, if I move the window to a large screen (I
> dock the notebook, FullHD), the contents in scaled up a lot and everything
> is just huge, especially when I switch into guest's VT (I do that also a
> lot).
> 
> So, I'm constantly shuffling with window sizes and digging deep in the menus
> to trigger resize-to-vm. And I'm very unhappy about this.
> 
> Having a new option scaling=if-larger would help me, because it would apply
> to me 12" screen (too small even when maximized), but it wouldn't apply to
> my large screen (I also use maximized windows there to avoid all the fuss
> with changing window sizes) and so I wouldn't see gigantic console letters
> in there.
> 
> If you don't want to implement it, but still improve the quality of life for
> some of us:) , I suggest:
> 1. Make the resize-to-vm action more accessible. Possible ways:
> a) Put it into the action bar at the top of the window, next to
> switch-fullscreen button.
> b) Implement keyboard shortcuts that don't override guest shortcuts.
> VirtualBox's "Host" key style is very nice.
> 
> 2. Make resize-to-vm action less needed:
> a) Set a correct window size on start (might not be your bug, but gtk/gnome
> bug, but I'm unable to debug that)
> b) change guest resolution on window size change
> c) or autofit window size on resolution change (and in case you can't
> autofit the window, because the screen is too small, automatically enable
> scaling)
> 
> Thanks. I'd happy to provide any details you need that I haven't covered in
> this reply, just tell me.


We need to take a look at what virtualbox, vmware workstation/player, boxes, and virt-viewer WRT display handling, and try to come up with a plan that's best for virt-manager.

At the very least I expect we will:

- Change 'scaling' to just be a boolean on/off option
- Consider enabling scaling by default
- Consider enabling resize-guest by default
- Make sure that an initial run of a VM resizes to new resolutions correctly.

The difficulty is that we have a lot of variables to handle: spice or vnc, agent or none (or not supported), do we ever want to have scrollbars?, do we want to remember the resolution a user manually resized their window to?, etc.

Comment 1 Cole Robinson 2014-02-01 01:13:00 UTC
Also, we should consider if we want to add a status bar (see pre-existing bug):

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

If not we should close that

Comment 2 Cole Robinson 2014-03-10 20:36:49 UTC
Another bit: say the console is something small, like 640x480. Switch to details view, and the window will be resized to fit the details content. Now switch back to the console and the window is now larger than the guest resolution. We should consider saving the console resolution and switching back to it when toggling between details. Not sure what to do if user explicitly changes the window size when in details mode though.

Comment 3 Raphael Groner 2015-05-20 19:58:46 UTC
*** Bug 1216099 has been marked as a duplicate of this bug. ***

Comment 4 Raphael Groner 2015-08-19 06:43:34 UTC
http://www.gregfreeman.org/2012/fix-wrong-resolution-at-mdm-lightdm-login-screen-in-linux-mint-ubuntu/
https://www.mail-archive.com/spice-devel@lists.freedesktop.org/msg01074.html

Does QXL include the mentioned patch in Fedora 21 and RHEL7/CentOS7? I assume not.

Comment 5 Cole Robinson 2015-08-31 20:53:18 UTC
I don't think any spice patch is going to be a magic fix for all the issues enumerated here and in the comments of your original bug. virt-manager needs some UI work to address this issue

Comment 6 Cole Robinson 2020-09-10 00:00:50 UTC
Per virt-manager's recent DESIGN.md file we I'm not planning to invest much more time in trying to improve the default sizing behavior here.
virt-viewer has better behavior FWIW

I made a change upstream though to default new windows to allocate 1024x768 for the viewer widget, which means by default
OS install wizards with qxl shouldn't end up bigger than the default window size, and require scroll bars or triggering
'Resize to VM'. That should be a small default improvement.

But other than that there are no plans to change anything here


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