After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 680969 - Error message is shown when switching to 1366x768 mirror mode
Error message is shown when switching to 1366x768 mirror mode
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Display
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-08-01 11:40 UTC by Anthony Wong
Modified: 2012-08-07 14:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
error dialog screenshot (482.50 KB, image/png)
2012-08-01 11:40 UTC, Anthony Wong
  Details
xrandr -q (932 bytes, text/plain)
2012-08-01 11:41 UTC, Anthony Wong
  Details
do not add preferred mode to drop-down when in mirror mode (1.27 KB, patch)
2012-08-07 06:37 UTC, Cyrus
committed Details | Review

Description Anthony Wong 2012-08-01 11:40:16 UTC
Created attachment 220048 [details]
error dialog screenshot

Connect HDMI or D-sub to external monitor, and it works fine when switching to mirror mode in 1024x768, but does not work for mirror mode in 1366x768. Please see the attached screenshot and `xrandr -q` output.

Step:
1. Connect external monitor using HDMI or D-sub
2. Use Display settings to switch to mirror mode, and select 1366x768 for resolution
3. Error dialog window pops up
Comment 1 Anthony Wong 2012-08-01 11:41:05 UTC
Created attachment 220049 [details]
xrandr -q
Comment 2 Anthony Wong 2012-08-01 11:44:54 UTC
1366x768 is added by the second add_mode in rebuild_resolution_combo() in cc-display-panel.c:

for (i = 0; modes[i] != NULL; ++i)
    add_mode (self, modes[i], output_width, output_height, preferred_id);

  /* And force the preferred mode in the drop-down */
  add_mode (self, mode, output_width, output_height, preferred_id);
Comment 3 Cyrus 2012-08-07 06:31:30 UTC
Use preferred resolution to switch to mirror mode will popup error messages if preferred resolution is not a common resolution.

In this case, the mode list of clone mode should be 1360x768, 1024x768, 800x600 (HDMI1 and LVDS1 both supported modes) 
The original logic will force add the preferred mode (1366x768) to the mode list but 1366x768 doesn't exist in xrandr mode list of external monitor.
Comment 4 Cyrus 2012-08-07 06:37:25 UTC
Created attachment 220510 [details] [review]
do not add preferred mode to drop-down when in mirror mode
Comment 5 Bastien Nocera 2012-08-07 14:38:39 UTC
Pushed with a few coding style changes, thanks for tracking this down.