Mirror displays not offered, buggy

Bug #1714302 reported by Danny Howard
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Xfce4 Settings
Incomplete
Medium
xfce4-settings (Ubuntu)
Triaged
Undecided
Unassigned

Bug Description

What happens:
In xubuntu-desktop, I have checked "Configure new displays when connected"

When I connect a new display, I am given options from Use 1st screen, mirror displays, extend desktop, or use the 2nd screen.

I would like to Mirror Displays, but that option is ghosted in the connection dialog.

I can then hit "Advanced" and check "Use this display" on each display and then check "Mirror displays" and then the displays mirror but the Resolution gets set to 1920x1200.

I then have to manually set each "mirrored" display individually to 3840x2160.

What I expect to happen:
1. In the connection dialog, "Mirror Displays" should be available.
2. When mirroring displays, the resolution should not be changed.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: xfce4-settings 4.12.0-2ubuntu1
ProcVersionSignature: Ubuntu 4.4.0-93.116-generic 4.4.79
Uname: Linux 4.4.0-93-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.10
Architecture: amd64
CurrentDesktop: XFCE
Date: Thu Aug 31 09:14:32 2017
DistributionChannelDescriptor:
 # This is a distribution channel descriptor
 # For more information see http://wiki.ubuntu.com/DistributionChannelDescriptor
 canonical-oem-somerville-trusty-amd64-osp1-20150720-0
EcryptfsInUse: Yes
InstallationDate: Installed on 2016-10-14 (321 days ago)
InstallationMedia: Ubuntu 14.04 "Trusty" - Build amd64 LIVE Binary 20150720-04:06
SourcePackage: xfce4-settings
UpgradeStatus: Upgraded to xenial on 2016-10-14 (321 days ago)

Revision history for this message
In , Blt2i4b72d (blt2i4b72d) wrote :

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

Revision history for this message
In , netllama (netllama) wrote :

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)?

Revision history for this message
In , J-novak-k (j-novak-k) wrote :

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

Revision history for this message
In , Tony-paulic (tony-paulic) wrote :

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.

Revision history for this message
In , J-novak-k (j-novak-k) wrote :

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.

Revision history for this message
In , J-novak-k (j-novak-k) wrote :

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.

Revision history for this message
In , J-novak-k (j-novak-k) wrote :

(In reply to j.novak from comment #5)
> 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 of issue no 11712.

Revision history for this message
Danny Howard (dannyman) wrote :
description: updated
description: updated
Changed in xfce4-settings:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xfce4-settings (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Bluesabre-1 (bluesabre-1) wrote :

We've made a large number of improvements in this area recently. Can you please test with the current development release or git master?

Changed in xfce4-settings:
status: Confirmed → Incomplete
Revision history for this message
In , Stanley-king (stanley-king) wrote :

I'm seeing this problem, past the middle of year 2019!

What would you like to know about my configuration?

Revision history for this message
In , J-novak-k (j-novak-k) wrote :

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

Revision history for this message
In , Simon Steinbeiß (ochosi) wrote :

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.

Revision history for this message
In , J-novak-k (j-novak-k) wrote :

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.

Revision history for this message
In , Bakhelit (bakhelit) wrote :

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.

Revision history for this message
In , Bakhelit (bakhelit) wrote :

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)

Revision history for this message
In , Bakhelit (bakhelit) wrote :

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)

Revision history for this message
In , Bakhelit (bakhelit) wrote :

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.

Sean Davis (bluesabre)
Changed in xfce4-settings (Ubuntu):
status: Confirmed → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.