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 894421 - Small change in guests resolution results in wrong resolution.
Summary: Small change in guests resolution results in wrong resolution.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: xorg-x11-drv-qxl
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Default Assignee for SPICE Bugs
QA Contact: Desktop QE
URL:
Whiteboard:
: 908100 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-11 17:26 UTC by Tomas Jamrisko
Modified: 2015-03-02 13:20 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-02 13:20:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
log from the VM (100.69 KB, text/plain)
2013-01-14 10:08 UTC, Tomas Jamrisko
no flags Details
Output from remote-viewer. (295.08 KB, text/plain)
2013-01-14 10:09 UTC, Tomas Jamrisko
no flags Details

Description Tomas Jamrisko 2013-01-11 17:26:45 UTC
Description of problem:
Lowering resolution of guest results in a completely wrong resolution and remote-viewer windows size. 

Version-Release number of selected component (if applicable):
spice-vdagent-0.12.0-4.el6.i686
spice-gtk-0.14-7.el6.x86_64
virt-viewer-0.5.2-18.el6.x86_64


How reproducible:
Always

Steps to Reproduce:
1. Connect to a machine 
2. Open a second display
3. Start gnome-display-properties
4. Select 1280x768 on primary display, apply
5. Select 1280x760 on primary display, apply
  
Actual results:
the window will be a lot smaller, resolution will be wrong.

Expected results:
it should stay at 1280x760

Comment 2 Hans de Goede 2013-01-11 22:06:59 UTC
(In reply to comment #0)
> Steps to Reproduce:
> 1. Connect to a machine 
> 2. Open a second display
> 3. Start gnome-display-properties
> 4. Select 1280x768 on primary display, apply
> 5. Select 1280x760 on primary display, apply

I tried this but I cannot reproduce. Can you please retry on a freshly booted vm ? If you can then
still reproduce we need to figure out what is going on...

Comment 3 Tomas Jamrisko 2013-01-14 10:08:36 UTC
Created attachment 678157 [details]
log from the VM

Sometimes it doesn't even reduce the size, but keeps flickering, trying to change the resolution somehow. You can see at the end of log when it tried to go from 1280x768 to 1280x760 several times per second.

Comment 4 Tomas Jamrisko 2013-01-14 10:09:11 UTC
Created attachment 678158 [details]
Output from remote-viewer.

Comment 5 Hans de Goede 2013-01-14 11:42:36 UTC
(In reply to comment #3)
> Created attachment 678157 [details]
> log from the VM
> 
> Sometimes it doesn't even reduce the size, but keeps flickering, trying to
> change the resolution somehow. You can see at the end of log when it tried
> to go from 1280x768 to 1280x760 several times per second.

Hmm, it seems as if gnome-display-settings is fighting with itself, here is what
I believe is happening:

1) gnome-display-settings changes the size from 1280x768 to 1280x760
2) Something (likely gnome-display-settings) asks the driver for a new modelist
3) gnome-display-settings sees this new modelist as a new monitor, and
has remembered that the setting for this monitor is 1280x768
4) gnome-display-settings changes the setting back to 1280x760
5) rince repeat with 1280x768 <-> 1280x760 swapped

Is this with the client full-screen or maximized, or just regular windowed?

After doing the following in gnome-display-settings:
1) select 1280x768 => apply
2) select 1280x760 => apply
3) select 1280x768 => apply

I can make the switch between the 2 happen by running "xrandr" from the
cmdline, as calling "xrandr" cause the driver to be asked for an updated
modelist.

But by default neither gnome-display-setting nor the agent will ask the
driver for an updated modelist. So this should not be happening ...

Ah, ok I can reproduce now. To reproduce this requires:
1) open a second display
2) In gnome-display-settings do;
 1) select 1280x768 => apply
 2) select 1280x760 => apply
 3) select 1280x768 => apply

And then I get the rapid changing between the 2 settings. Will investigate
this further.

Comment 6 RHEL Program Management 2013-01-18 06:47:47 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 7 Hans de Goede 2013-01-22 09:06:29 UTC
(In reply to comment #5)
> Ah, ok I can reproduce now. To reproduce this requires:
> 1) open a second display
> 2) In gnome-display-settings do;
>  1) select 1280x768 => apply
>  2) select 1280x760 => apply
>  3) select 1280x768 => apply

Ok, so what is happening here is the following:

1) When making changes on a *dual* monitor setup gnome-display-settings calls
XRRGetScreenResources rather then XRRGetScreenResourcesCurrent, causing a
call to xf86-video-qxl's modelist update function

2) xf86-video-qxl's modelist update function function gives a modelist for the monitor with
all standard modes from the rom header + the current mode with the preferred mode flag set

3) What happens now is:

a) Running at 1280x768, modelist is standard + preferred 1280x768, lets call this modelist1
b) change mode to 1280x760, gnome-settings-daemon remembers this as the user-selected mode for the monitor with modelist1
c) modelist gets updated, gnome-settings-daemon now sees a modelist of standard + preferred 1280x760, sees this as a new monitor with modelist2
d) change mode to 1280x768, gnome-settings-daemon remembers this as the user-selected mode
    for the monitor with modelist2
e) modelist gets updated, gnome-settings-daemon now sees a modelist of standard + preferred 1280x768, sees this as the return of the monitor with modelist1, has a user set mode of 1280x760 for this
f) gnome-settings-daemon changes to the user set mode for this monitor of 1280x760
g) modelist gets updated, gnome-settings-daemon now sees a modelist of standard + preferred 1280x760, sees this as the return of the monitor with modelist2, has a user set mode of 1280x768 for this
f) gnome-settings-daemon changes to the user set mode for this monitor of 1280x768, goto
   e) and loop infinitely

I propose to fix this by not adding the current-mode as preferred mode. Instead always set 1024x768 as preferred mode to stop the initial mode too big problem for which the patch, adding the setting the current-mode as preferred mode, was added.

Comment 8 Hans de Goede 2013-01-24 11:52:37 UTC
This is fixed by this patch which has been posted upstream:
http://lists.freedesktop.org/archives/spice-devel/2013-January/012137.html
Note that upstream will likely go for this, more complete, patch which also fixes some other issues:
http://lists.freedesktop.org/archives/spice-devel/2013-January/012125.html

Comment 9 Hans de Goede 2013-02-06 16:47:44 UTC
*** Bug 908100 has been marked as a duplicate of this bug. ***

Comment 11 Tomas Jamrisko 2013-02-11 14:42:41 UTC
I tried the scratch build you posted. Thought you might to be interested in knowing, that it introduces some more problems. It doesn't flicker permanently now, but instead messes up resolutions settings at a few places (so far found two)
  -- opening a second display resizes the first display (opening/closing channels in general)
  -- following the original reproducer results in a resolution that user never intended to set.

Strangely though, the problems aren't permanent, but can be reproduced just once per session (or VM power cycle).

Won't open any new bugs just yet as that wasn't a "serious" build.

Comment 12 Hans de Goede 2013-02-12 09:48:40 UTC
(In reply to comment #11)
> I tried the scratch build you posted. Thought you might to be interested in
> knowing, that it introduces some more problems. It doesn't flicker
> permanently now, but instead messes up resolutions settings at a few places
> (so far found two)
>   -- opening a second display resizes the first display (opening/closing
> channels in general)

Yes I've seen this too, but if we want to fix the flickering problem, there is not much we can do here, for some reason sometimes when a new monitor shows up, or one goes away, gnome-settings-daemon decides to also re-init the existing ones. Quite annoying I agree, once we have an official build with the fix we should file a bug against gnome-settings-daemon for this.

Note that if your windows have a fixed size, ie they are maximized or fullscreen, the agent will correct the mode after gnome-settings-daemon has done its damage. But with "floating" windows, the gnome-settings-daemon re-init of existing displays will cause the window to resize, and then the agent won't make any changes since the new window size matches the new resolution set by g-s-d.

>   -- following the original reproducer results in a resolution that user
> never intended to set.

I cannot reproduce this one, there also have been quite a few fixes elsewhere, notably in
the agent, spice-gtk and virt-viewer, Possibly one of the fixes there fixes this.

Comment 13 Alon Levy 2013-10-20 14:39:42 UTC
commit beccf8e81ea6bb4c86bcaf3cd4aac5e18f6d3f0d claims to have fixed this.

Comment 15 Christophe Fergeau 2015-03-02 13:20:50 UTC
(In reply to Alon Levy from comment #13)
> commit beccf8e81ea6bb4c86bcaf3cd4aac5e18f6d3f0d claims to have fixed this.

This commit is part of xf86-video-qxl 0.1.1 which we rebased to for rhel 6.6


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