Mirror displays not offered, buggy

Bug #1714302 reported by Danny Howard on 2017-08-31
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
xfce4-settings
Incomplete
Medium
xfce4-settings (Ubuntu)
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)

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

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

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

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.

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.

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.

(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.

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

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

Changed in xfce4-settings (Ubuntu):
status: New → Confirmed

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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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