Screen resolution capplet unnecesarily tries to set virtual resolution

Bug #287062 reported by Martin Soto on 2008-10-21
12
Affects Status Importance Assigned to Milestone
gnome-control-center (Ubuntu)
Undecided
Alberto Milone
Intrepid
Undecided
Unassigned
Jaunty
Undecided
Alberto Milone

Bug Description

Binary package hint: gnome-control-center

I have observed the problem when using my laptop (Compaq NC6220) with an external monitor or projector. It can be reproduced as follows:

1. Start with both screens in mirrored (clone) mode, and with no virtual resolution line in xorg.conf.
2. Open the screen resolution capplet.
3. Uncheck the "mirror screens" box. The screens are still displayed as a single one, that is, you still see only one of them even if they aren't in mirror mode anymore. This is confusing.
4. Click on the visible screen. This will move it under the other one, which should have happened in step 3, anyway.
5. Check the "mirror screens" box again. The screens come together again. Notice that this state should be exactly equivalent to the initial state, before opening the box.
6. Press the apply button. A message box appears stating that the virtual resolution must be changed, which is obviously not true since we didn't change anything. Accepting the dialog actually inserts some bogus "Virtual" line in xorg.conf.

This happened when using the capplet under intrepid beta (gnome-control-center 2.24.0.1).

[TEST CASE]
1. Start with both screens in mirrored (clone) mode, and with no virtual resolution line in xorg.conf.
2. Open the screen resolution capplet.
3. Uncheck the "mirror screens" box.
4. Click on the visible screen. This will move it under the other one.
5. Check the "mirror screens" box again. The screens come together again.
6. Press the apply button.
  + Expected behavior: Nothing. The "new" configuration is unchanged from the old one; there are no changes to apply. No dialogs should be displayed. The xorg.conf should be identical to before the test.
  + Actual behavior: A message box appears stating that the virtual resolution must be changed. After accepting this, the xorg.conf is modified with a bogus 'Virtual' setting.

To verify the fix, ensure that the Expected behavior described above is seen.

Bryce Harrington (bryce) wrote :

tseliot, could you take a look at this?

Changed in gnome-control-center:
assignee: nobody → albertomilone
Changed in gnome-control-center:
status: New → In Progress
Alberto Milone (albertomilone) wrote :

As regards the problem described in title of this bug report, I have fixed it in my bzr branch and I can't reproduce the problem any more:
https://code.launchpad.net/~albertomilone/gnome-control-center/randr-virtual

Here is my change:
http://bazaar.launchpad.net/~albertomilone/gnome-control-center/randr-virtual/revision/32

Basically we don't try to calculate/apply the virtual resolution if the "mirror screens" box is checked. It's a quick hack and works well.

As regards the way in which displays are show, I think it might be dealt with in a separate bug report.

Bryce, what do you think?

Bryce Harrington (bryce) wrote :

Yep, looks good to me as a quick and safe fix.

Bryce Harrington (bryce) on 2008-10-30
description: updated
description: updated
Cay Horstmann (cay) wrote :

I'd like to confirm the problem, but I am not sure that the quick hack is the right solution. In the past, it was possible to "mirror" a larger screen over a smaller one (e.g. laptop 1400x1050, external monitor 1920x1200) The laptop just displayed the top left corner, which was fine with me. If the external monitor is larger than 1400x1400, one still needs the virtual line. So, the computation to make in case of mirroring would seem to be to take the max of the dimensions, and check that against the default bounds or the current virtual.

Alberto Milone (albertomilone) wrote :

cay: I'll work on an actual solution but that will have to be well tested and done in collaboration with upstream. This is a quick fix which covers a very common use-case.

Martin Pitt (pitti) wrote :

Accepted into intrepid-proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in gnome-control-center:
status: New → Fix Committed
Martin Pitt (pitti) wrote :

Copied intrepid-proposed version to jaunty.

Changed in gnome-control-center:
status: In Progress → Fix Released
Martin Pitt (pitti) wrote :

Can anyone please test this?

Martin Soto (soto255) wrote :

This is working for me, thanks a lot to everyone involved! I would have tested it before, but didn't notice that a package with the fix was available.

Martin Pitt (pitti) wrote :

Copied to intrepid-updates.

Changed in gnome-control-center:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Patches