RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1018180 - primary monitor is switched if some screen gets bigger then current primary screen
Summary: primary monitor is switched if some screen gets bigger then current primary s...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-viewer
Version: 6.5
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Jonathon Jongsma
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 1009018 1011077 (view as bug list)
Depends On:
Blocks: 1009648 1018182 1022787
TreeView+ depends on / blocked
 
Reported: 2013-10-11 11:43 UTC by David Jaša
Modified: 2014-10-14 06:30 UTC (History)
14 users (show)

Fixed In Version: virt-viewer-0.6.0-1.el6
Doc Type: Bug Fix
Doc Text:
Cause: Display configuration sometimes used outdated information about the position of the virt-viewer/remote-viewer windows in order to align and configure the guest displays Consequence: Sometimes the guest displays became unexpectedly swapped when a window is resized Fix: Always use the current window location to align and configure displays Result: Display configuration is predictable and guest displays don't get swapped between client windows when resizing a window
Clone Of:
: 1018182 (view as bug list)
Environment:
Last Closed: 2014-10-14 06:30:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1379 0 normal SHIPPED_LIVE virt-viewer bug fix update 2014-10-14 01:05:43 UTC

Description David Jaša 2013-10-11 11:43:31 UTC
Description of problem:
when user resizes monitors in a way that current primary monitors gets smaller than some other monitor, the now-biggest screen becomes primary. This is quite confusing for the users and it should not happen.
The issue occurs just with new clients, I didn't manage to reproduce with old (3.2) client/new vdagent combo.

Version-Release number of selected component (if applicable):
RHEL 6.5: spice-gtk-0.20-9.el6.x86_64
Windows 7 32b: mingw-virt-viewer-0.5.6-6.el6_64

How reproducible:
with 3.3 vdagent: roughly 70-100 % of cases
with 3.2 vdagent: occurs in one of multiple tries

Steps to Reproduce:
1. connect to multiple monitor guest (windowed)
2. resize primary monitor (with taskbar) to be smaller than some other monitor (or vice versa - resize non-primary monitor to be larger than primary)
3.

Actual results:
the now-biggest monitor becomes primary

Expected results:
primary monitor is not changed at all

Additional info:
The only case when primary monitor is changed is when current primary monitor is disabled - guest should however handle this condition entirely itself

Comment 1 RHEL Program Management 2013-10-15 01:34:08 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 2 Marc-Andre Lureau 2013-10-15 14:01:54 UTC
can you investigate whether the issue appears more often because of vdagent update or client update?

Comment 3 David Jaša 2013-10-15 14:27:28 UTC
I did before reporting - comment 0 presented in table looks like this:

client \ agent       3.2                   3.3
--------------------------------------------------------------------
3.2                  never                 never
3.3 and RHEL 6.5     sometimes happens     sometimes does not happen

therefore I filed the bug against client components.

Comment 4 Marc-Andre Lureau 2013-11-07 13:38:49 UTC
is this with happening only with windows guest? (spice-gtk as no notion of primary monitor, so it's quite likely a vdagent bug)

Comment 5 David Jaša 2013-11-09 00:28:44 UTC
We (Spice QE) don't know for sure as we don't have reliable tools to recognize the primary monitor in RHEL, but some indices such as icons moving to 2nd monitor say that it does happen there, too.

Comment 6 Marc-Andre Lureau 2013-11-09 00:36:00 UTC
(In reply to David Jaša from comment #5)
> We (Spice QE) don't know for sure as we don't have reliable tools to
> recognize the primary monitor in RHEL, but some indices such as icons moving
> to 2nd monitor say that it does happen there, too.

afaik, xrandr tell you which screen is primary.

Comment 7 David Blechter 2013-12-08 20:55:18 UTC
needinfo is for about 1 month, so pushing to 6.6 as no blocker flag proposed and it is too late for 6.5.

Comment 8 Jonathon Jongsma 2013-12-11 22:57:50 UTC
David Jaša, are you sure this is related to the size of the displays? Also, when the taskbar switches to the other monitor, does the arrangement of the monitors also get switched? (in other words, is the display with the taskbar always aligned to the 'left' of display without the taskbar?)

I can reproduce this primary-switching behavior with e.g. 0.5.6-9 using the following steps, but the relative size of the displays doesn't seem to matter. I suspect that this is the same issue you're describing, and the display size is actually just a red herring:

- start virt-viewer and enable 2 displays
- make sure both virt-viewer windows are at a non-zero X position (e.g. not maximized, not fullscreen, not aligned with the left edge of the screen)
- resize window for display 1 ("primary") => taskbar will switch to display 2
- resize window for display 2 => taskbar will switch back to display 1
- etc.

If this is the same bug from your original report, it is caused by the auto-alignment in spice-gtk and has already been fixed in upstream virt-viewer (we do all display alignment in virt-viewer now and don't depend on spice-gtk to do auto-alignment). If it's not the same issue, getting a debug log from virt-viewer would be useful.

Comment 9 David Jaša 2013-12-12 16:55:37 UTC
(In reply to Jonathon Jongsma from comment #8)
> David Jaša, are you sure this is related to the size of the displays? Also,
> when the taskbar switches to the other monitor, does the arrangement of the
> monitors also get switched? (in other words, is the display with the taskbar
> always aligned to the 'left' of display without the taskbar?)
> 
> I can reproduce this primary-switching behavior with e.g. 0.5.6-9 using the
> following steps, but the relative size of the displays doesn't seem to
> matter. I suspect that this is the same issue you're describing, and the
> display size is actually just a red herring:
> 
> - start virt-viewer and enable 2 displays
> - make sure both virt-viewer windows are at a non-zero X position (e.g. not
> maximized, not fullscreen, not aligned with the left edge of the screen)
> - resize window for display 1 ("primary") => taskbar will switch to display 2
> - resize window for display 2 => taskbar will switch back to display 1
> - etc.
> 

This is how I usually test the thing. I can confirm that lately, the behaviour is slightly different and it's not coupled to what screen is bigger any more.

> If this is the same bug from your original report, it is caused by the
> auto-alignment in spice-gtk and has already been fixed in upstream
> virt-viewer (we do all display alignment in virt-viewer now and don't depend
> on spice-gtk to do auto-alignment). If it's not the same issue, getting a
> debug log from virt-viewer would be useful.

Based on your description, it sounds like the same issue.

Comment 10 Jonathon Jongsma 2013-12-12 21:12:36 UTC
OK, moving to POST for now.

Comment 11 David Jaša 2013-12-16 18:14:16 UTC
(In reply to Jonathon Jongsma from comment #8)
> and has already been fixed in upstream
> virt-viewer (we do all display alignment in virt-viewer now and don't depend
> on spice-gtk to do auto-alignment). If it's not the same issue, getting a
> debug log from virt-viewer would be useful.

Trying on F20:
virt-viewer-0.5.7-1.fc20.x86_64
spice-gtk-0.21-5.fc20.x86_64

If the "has already been fixed in upstream virt-viewer" applies on versions above, then unfortunately, the bug was not fixed - 2nd resize was just enough to make primary monitor switched (Windows 7 guest).

Comment 12 Jonathon Jongsma 2013-12-16 20:33:21 UTC
The fixes for this particular issue went in after 0.5.7, so it's not available in a released version yet, I'm afraid.

Comment 14 Jonathon Jongsma 2014-03-07 18:04:26 UTC
*** Bug 1011077 has been marked as a duplicate of this bug. ***

Comment 15 Jonathon Jongsma 2014-03-19 16:23:05 UTC
*** Bug 1009018 has been marked as a duplicate of this bug. ***

Comment 16 Jonathon Jongsma 2014-03-19 16:24:14 UTC
QE: when verifying, please also verify related scenario from duplicate bug described here: https://bugzilla.redhat.com/show_bug.cgi?id=1009018#c6

Comment 17 Marc-Andre Lureau 2014-06-03 12:37:48 UTC
Jonathon, please fill the Doc Text. thanks

Comment 19 CongDong 2014-06-10 05:54:55 UTC
I can reproduce with virt-viewer-0.5.6-8.el6.x86_64

Verify with virt-viewer-0.6.0-5.el6.x86_64

Steps:
1. Prepare a guest with two displays on rhevm
2. connect the guest in windowed mode
3. Make sure two displays come out.
4. resize the primary display small than another display
5. resize the dispay in step 4 bigger than another display
6. repeat step 4 and step 5 5 times

Result:
Primary display didn't switch to another display

Also test with win7 and windows xp guest.
As the result, VERIFIED

Comment 20 errata-xmlrpc 2014-10-14 06:30:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1379.html


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