! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Mirror Displays not working after upgrade
Status:
RESOLVED: MOVED
Product:
Xfce4-settings
Component:
Display Settings

Comments

Description Share Doe 2015-03-16 19:00:37 CET
Created attachment 6088 
Mirror Displays bug

After upgrading Xfce 4.10 to 4.12, "Mirror Displays" (xfce4-display-settings --minimal) appears disabled.

The command "xrandr --output HDMI-0 --auto --same-as DVI-I-1" works as before.

So, yes, it's a Xfce bug.

xorg-xrandr 1.4.3
libxrandr 1.4.2
Comment 1 netllama 2015-11-06 21:21:29 CET
Just upgraded to 4.12, and I'm hitting this bug as well.  Any chance of a work around or fix in the near future (this bug has been open for nearly 8 months)?
Comment 2 j.novak 2016-04-20 11:46:39 CEST
Hello,

I touched this problem too.
The reason is that 4.10 code checks just resolution of two displays and if it match, it allows to mirror it.
New 4.12 code checks resolution and frequency of two or more displays. If all parameters match, it allows to mirror it on all displays.
Therefor when one display supports e.g. 1920x1080 (0x27e) 138.650MHz and second display supports 1920x1080 (0x2dc) 148.500MHz, 4.12 code do not allow to mirror it even it is possible.

I see the idea that 4.12 code supports multiple (more than two) displays active when old code supported only two displays (which is enough from my point of view).

I can write a patch to allow 4.12 code to accept resolution match on multiple screens. Is it welcomed or XFCE team will do so?

Workaround:
You can use xrandr from command line:

xrandr -q 
=> check names of your outputs (I have LVDS-O and HDMI-0)

Make mirror:
xrandr --output LVDS-0 --auto --primary
xrandr --output HDMI-0 --auto
xrandr --output HDMI-0 --same-as LVDS-0
Comment 3 ToZ editbugs 2016-04-22 15:18:21 CEST
I think bug 11107 is somehow related to this issue that causes the mirror option to be greyed out. If you read through the comments in that bug report, xfsettingsd is not re-activating the display when it is turned on again. When the display dialog is shown, it does not know about the attached and/or reactivated monitor, thus it does not enable the mirror option. Interestingly, it does know that a second display is attached as it presents the options to extend or make the external monitor primary. Searching the code, it appears that the check for the clone option occurs in the xfce_randr_clonable_mode function (http://git.xfce.org/xfce/xfce4-settings/tree/dialogs/display-settings/xfce-randr.c line #651).The check for extended occurs in http://git.xfce.org/xfce/xfce4-settings/tree/dialogs/display-settings/main.c (line 2947).

I applied the patch from comment #53 and now on connect of an external monitor, the "mirror" option is no longer greyed out and is functional.

However, I'm noticing some unexpected behaviour as a result of this patch as well. After applying this patch and attaching an external monitor, my system automatically goes into clone (mirror) mode while the display dialog is displayed (even though my preference and previous state was extended). The dialog is functional and I can easily change it back to extended.
Comment 4 j.novak 2016-04-22 16:44:57 CEST
I'm afraid the problem is deeper, see below.

When you attach new display, the mirror option is grey (in minimal dialog and in standard dialog too, no patch #53 applied). Then you can enable deactivated display in standard dialog, but it don't enable mirror option in my case.

xfce_randr_clonable_mode checks for same mode on both displays (same dimensions and refresh rate). My system uses same dimensions but different refresh rates for two displays. Therefor in my case mirror option stayed disabled. But I can imagine it might gets enabled for others.

As consequence I made patch which check for correct dimensions only. When it finds it, it enables mirror buttons (minimal and standard dialog) and allows to select such mode.

Before I will post it there, I will check patch #53 from link too.
Comment 5 j.novak 2016-04-22 22:24:02 CEST
Created attachment 6656 
Patch for display setting dialog

The patch make mirror function working when xfce_randr_clonable_mode function do not allow it.
New xfce_randr_mirrorable_mode function calls old xfce_randr_clonable_mode. When it do not allow cloning, xfce_randr_mirrorable_mode checks whether there are one or more common resolutions (same dimensions) on attached displays. If it finds it, select the biggest one.

Note: xfce_randr_mirrorable_mode works for two displays only.
Comment 6 j.novak 2016-04-23 20:49:33 CEST
(In reply to j.novak from comment #5)
> Created attachment 6656 
> Patch for display setting dialog
> 
> The patch make mirror function working when xfce_randr_clonable_mode
> function do not allow it.
> New xfce_randr_mirrorable_mode function calls old xfce_randr_clonable_mode.
> When it do not allow cloning, xfce_randr_mirrorable_mode checks whether
> there are one or more common resolutions (same dimensions) on attached
> displays. If it finds it, select the biggest one.
> 
> Note: xfce_randr_mirrorable_mode works for two displays only.

I forgot to add additional information:
Patch is based on 4.12.0 source. It do not require patch mentioned in commend #53 of issue no 11712.
Comment 7 Sean Davis editbugs 2019-01-20 20:00:09 CET
We've made a large number of improvements in this area recently. Can you please test with the current development release or git master?
Comment 8 Stan King 2019-07-18 03:26:31 CEST
I'm seeing this problem, past the middle of year 2019!

What would you like to know about my configuration?
Comment 9 j.novak 2019-07-22 23:39:54 CEST
Hi,

  I checked latest xfce 4.13.3 in Fedora Core 30. I have notebook Dell Precision 3530 with Intel and NVidia cards. I'm using it with external display. Internal and external display has same dimensions, but different refresh rates.
  If I use NVidia, xfce enables mirror button, but it selects last but highest resolution automatically. It works, but looks ugly. I can change resolution on both displays to highest (native for both displays) manually and it works fine. Therefore it looks there is some issue in resolution selection code.
  If I use Intel (NVidia/nouveau is disabled), it enables mirror button and select correct (highest/native) resolution.
  I didn't checked why there is observed difference and I can provide diagnostic/debug outputs if anyone interested in.

Best regards,

Jirka Novak
Comment 10 Simon Steinbeiss editbugs 2019-07-23 01:27:27 CEST
There is a difference between display "cloning" and "mirror" mode.

Cloning means same x,y coordinates but different resolutions, so the displays only overlay/intersect.
Mirroring means that the resolution AND refresh rate has to be identical. That's how X11 defines mirror.

So if you have different refresh rates you can manually achieve something like mirror by letting the displays overlay and by selecting the same resolution.
Comment 11 j.novak 2019-07-23 08:52:40 CEST
I see. From technical point of view it makes sense, but for a user difference is not important. BTW there is no clone function in XFCE. I suggest to change mirror button behaving:
1) create option (advanced settings) whether to prefer match for refresh rate or for highest resolution
2) based on 1):
- if set to prefer refresh rate, use current approach
- if set to prefer resolution, find matching resolutions and prefer highest refresh rate on each display

I thing that 'prefer highest resolution' should be default.
Comment 12 Bakhelit 2019-11-20 13:33:32 CET
I can confirm that the workaround from comment 2 still works. I was hit by this bug recently when attempting to mirror my laptop screen and a projector at work (NEC P502HL-2: https://www.necdisplay.com/p/np-p502hl-2). Both support 1920x1080 resolution but refresh rates differ very slightly and as XFCE tries to find an exact refresh rate match it sets lower 1680x1050 resolution. Unfortunately the projector was really unhappy about this and started to flicker like mad:(. So I had to use the screens in a side by side configuration without mirroring (this made the presentation a bit less comfortable for me:).

I also tested this at home with my monitor (EIZO EV2313W: https://www.eizoglobal.com/support/db/products/model/EV2313W) and the result was similar. Although both screens also support 1920x1080 resolution the refresh rates differ very slightly too and thus XFCE finds an exact refresh rate match with 1680x1050 resolution. Fortunately my EIZO monitor worked flawlessly (as it always does) and did not produce any flickering stroboscope effects like that poor NEC projector:).

I also noticed a warning in my "~/.xsession-errors" file when working with the projector:
(xfwm4:782): xfwm4-WARNING **: output size (1680x1050) and logical screen size (3840x1080) do not match
and with the monitor:
(xfwm4:786): xfwm4-WARNING **: output size (1680x1050) and logical screen size (1920x2160) do not match

But I am not sure if these warnings are completely relevant for this bug or if it is a slightly different issue.

I will post the exact "xrandr -q" outputs for my laptop display with the projector and monitor in the following comments.
Comment 13 Bakhelit 2019-11-20 13:35:38 CET
The output of "xrandr -q" command with the projector connected:

Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 8192 x 8192
eDP-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 345mm x 194mm
   1920x1080     59.97*+  59.93  
   1680x1050     59.95    59.88  
   1600x1024     60.17  
   1400x1050     59.98  
   1280x1024     60.02  
   1440x900      59.89  
   1280x960      60.00  
   1360x768      59.80    59.96  
   1152x864      60.00  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   960x600       60.00  
   960x540       59.99  
   800x600       60.00    60.32    56.25  
   840x525       60.01    59.88  
   800x512       60.17  
   700x525       59.98  
   640x512       60.02  
   720x450       59.89  
   640x480       60.00    59.94  
   680x384       59.80    59.96  
   576x432       60.06  
   512x384       60.00  
   400x300       60.32    56.34  
   320x240       60.05  
VGA-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1920x1080     60.00*+  50.00    59.94    24.00    23.98  
   1920x1080i    60.00    50.00    59.94  
   1680x1050     59.88  
   1400x1050     59.95  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1440x900      59.90  
   1280x960      60.00  
   1366x768      59.79  
   1280x800     119.91    59.91  
   1152x864      75.00  
   1280x768      59.87  
   1280x720     120.00    60.00    50.00    59.94  
   1024x768      60.00  
   832x624       74.55  
   800x600       60.32  
   720x576       50.00  
   720x576i      50.00  
   720x480       60.00    59.94  
   720x480i      60.00    59.94  
   640x480       60.00    59.94  
   720x400       70.08  
DP-1 disconnected (normal left inverted right x axis y axis)
Comment 14 Bakhelit 2019-11-20 13:37:26 CET
The output of "xrandr -q" command with the monitor connected:

Screen 0: minimum 320 x 200, current 1920 x 2160, maximum 8192 x 8192
eDP-1 connected 1920x1080+0+1080 (normal left inverted right x axis y axis) 345mm x 194mm
   1920x1080     59.97*+  59.93  
   1680x1050     59.95    59.88  
   1600x1024     60.17  
   1400x1050     59.98  
   1280x1024     60.02  
   1440x900      59.89  
   1280x960      60.00  
   1360x768      59.80    59.96  
   1152x864      60.00  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   960x600       60.00  
   960x540       59.99  
   800x600       60.00    60.32    56.25  
   840x525       60.01    59.88  
   800x512       60.17  
   700x525       59.98  
   640x512       60.02  
   720x450       59.89  
   640x480       60.00    59.94  
   680x384       59.80    59.96  
   576x432       60.06  
   512x384       60.00  
   400x300       60.32    56.34  
   320x240       60.05  
VGA-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 510mm x 287mm
   1920x1080     60.00*+
   1680x1050     59.88  
   1280x1024     60.02  
   1280x960      60.00  
   1280x720      60.00  
   1024x768      60.00  
   800x600       60.32  
   640x480       59.94  
   720x400       70.08  
DP-1 disconnected (normal left inverted right x axis y axis)
Comment 15 Bakhelit 2019-11-20 14:14:07 CET
I forgot to mention that I have the current XFCE 4.12.3 from Debian Stretch. I may be able to test this with XFCE 4.12.5 in Debian Buster when I migrate to a new stable (hopefully in a month:). Although I am not sure it will be all that different - maybe in due time Debian backports will offer XFCE 4.14 and I will be able to finally enjoy a new XFCE:). But still XFCE 4.12 is good enough for now since the stability and configurability with readable XML files are the main reasons I use XFCE in the first place on all computers I maintain.

Thus, big thanks to all XFCE devs for the reasonable development pace that brings actual improvements to a mature and stable GUI without making it a bloatware full of unremovable eye candy features like we see in many other DEs.
Comment 16 Git Bot editbugs 2020-05-28 23:02:27 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-settings/-/issues/58.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #11712

Reported by:
Share Doe
Reported on: 2015-03-16
Last modified on: 2020-05-28

People

Assignee:
Jérôme Guelfucci
CC List:
12 users

Version

Version:
4.12.0

Attachments

Mirror Displays bug (36.09 KB, image/png)
2015-03-16 19:00 CET , Share Doe
no flags
Patch for display setting dialog (13.14 KB, patch)
2016-04-22 22:24 CEST , j.novak
no flags

Additional information