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)?
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)
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.
When you attach new display, the mirror option is grey (in minimal dialog and in standard dialog too, no patch #53 (closed) 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 (closed) from link too.
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.
Created attachment 6656 [details]
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 (closed) of issue no 11712.
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.
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.
I am also affected by this bug, on Xubuntu with xfce 4.14 version. My laptop's display resolution is 60.1 Hz, which will practically never match any external display.
(There was a similar very unpleasant experience with a presentation)
Looking up the mirror = resolution && frequency both needs be matching, I would suggest to abandon mirroring, and instead support cloning in the Display Manager. Mirroring can be used in special circumstances, when really identical monitors are used.
This issue looks like a verbal misunderstanding, as someone understood the original 'mirroring' name of the feature as the x11 term for mirroring, which are not the same. People using the display manager thought about the cloning ~ just see the same thing on the displays.
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:
create option (advanced settings) whether to prefer match for refresh rate or for highest resolution
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.
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.
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.
The problem of mode matching (resolution + refresh rate), which was too restrictive, has been fixed in 8ffd34fb (4.17.3). Matching is now done by resolution only.
The problem of grayed-out mirror mode due to some monitors being connected but disabled has been fixed more recently in 8b20d64b (4.19.2, to be released).