[regression] Xmir: Some buttons are unclickable after rotating the screen

Bug #1613708 reported by Victor gonzalez
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
High
Daniel van Vugt
xorg-server (Ubuntu)
Fix Released
High
Daniel van Vugt
Trusty
Invalid
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned
xorg-server-lts-xenial (Ubuntu)
Invalid
Undecided
Unassigned
Trusty
Fix Committed
Undecided
Unassigned
Xenial
Invalid
Undecided
Unassigned

Bug Description

[Impact]

XMir clients do not have their input transform matrix modified properly when the screen dimensions and orientation change (ie. rotation).

This shows up primarily on Bq M10 tablets which rotate on startup.

[Test Case]

Install XMir on a device that supports screen rotation. Connect a client (using Libertine is the easiest way to do this). Attempt to use direct or indirect pointer input on the right side of the screen. The bug is it does nothing.

[Regression Potential]

This change affects only the XMir server. There is potential that XMir functionality is compromized but mainline x.org functionality is unaffected.

This XMir patch update is pulled directly from Ubuntu current development release "Yakkety Yak" where it has been in production for more than 6 weeks without apparent regressions.

[Other Info]

The patch update also includes bugfixes for bug #1617925, bug #1617932, and bug #1591356.

This patch differs from the patch in Ubuntu "Yakkety Yak" to compile with Mir 0.21. The only functional difference is an extra message logged when run against Mir 0.24.

-- original bug description follows --

Enviroment:

current build number: 169
device name: frieza
channel: ubuntu-touch/rc-proposed/bq-aquaris-pd.en
last update: 2016-08-16 10:23:29
version version: 169
version ubuntu: 20160816
version device: 20160809.0
version custom: 20160805--42-20-vivid

Product: BQ M10 FHD

Steps to reproduce:

1º Open LibreOffice and try to print something
2º Print settings window appear, try to click on Accept/Cancel/Exit etc
3º Buttons on LibreOffice won't respond

1º Open Firefox
2º Mouse-over on search,downloads,bookmarks etc
3º Seems like mouse-over is not focused and is clicking is not responding

Current result: Some Xapps buttons are not responding(tested on Firefox and LibreOffice Writer)

Expected result:

Add info: This is using xmir from https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/landing-053/+packages.

Revision history for this message
Victor gonzalez (victor-gonzalez-0) wrote :
summary: - Xapps buttons are not responding
+ Some Xapps buttons are not responding
description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: Some Xapps buttons are not responding

Sounds like bug 1590553, but the PPA you refer to seems to have that fix already.

Changed in xorg-server (Ubuntu):
importance: Undecided → High
assignee: nobody → Daniel van Vugt (vanvugt)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I've been trying and can't seem to reproduce any such bug with the latest Unity8 and the latest Xmir in yakkety. Everything is clickable in LibreOffer and Firefox.

It's possible your vivid image is missing the most recent Xmir fix that was bug 1590553 (like what you describe).

It's also possible matchbox-wm is misplacing windows as looks like the case in your video (the dialog should not appear on the right hand side). It also seems that matchbox-wm will ignore mouse input in the non-focused window without making it obvious which one that is. So try clicking around to see what is responding.

Sorry, I also don't have an M10 to test with. But I can at least say that I can't reproduce this with the latest Xmir.

Changed in xorg-server (Ubuntu):
status: New → Incomplete
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Sorry, ignore bug 1590553... Both its description and its fix apply to -rootless mode only, which we don't use in Unity8.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I can think of two more reasons why buttons would become unclickable:

1. One of your modifier keys (Alt/Shift/Ctrl) are either physically or logically (in software) stuck down. Try tapping all the Alt/Shift/Ctrl keys. This is definitely a problem for X apps under the Mir demo servers after you Alt+Tab but not a problem under Unity8 AFAIK.

2. Try rotating the tablet to a different orientation. You might be experiencing a problem similar to bug 1502805.

Revision history for this message
Christopher Townsend (townsend) wrote :

Hey Daniel,

I do not see this issue on Yakkety xmir on desktop, nor do I see it on Xenial+overlay using a locally compiled xmir made from the head of the xmir git tree.

However, I can reproduce the issue described in the bug on my frieza using the version of xmir found in the Vivid overlay candidate at https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/landing-053/+packages.

Perhaps the patch was not fully applied or something else is missing?

Revision history for this message
Christopher Townsend (townsend) wrote :

Update:

So I tried rotating the tablet into portrait mode as suggested, and the buttons suddenly work!

I'm not sure where the bug lies in this case, but wherever the bug is, the version of xmir that is currently in the overlay is not affected by it whereas the overlay candidate is.

Revision history for this message
Christopher Townsend (townsend) wrote :

Here is the debdiff between the version of xmir in the overlay (working) and the candidate version:

http://pastebin.ubuntu.com/23064583/

Revision history for this message
Stephen M. Webb (bregma) wrote :

The problem is caused by commit d19641fc01f77420b4ec5d6db6723f519f8f8272 which fixes bug #1602561.

That commit deletes the code that removes the XRandR outputs associated with the XMir screen after a resize. That means that whatever XRandR configurations are created at XMir startup remain in place for the lifetime of the process even if they do not correspond to the actual size after an X11 resize and rotation (XRandR) and input events get transformed through a matrix corresponding to the original size of the screen. When all the outputs were deleted previously, the identity matrix is assumed for input remapping.

Revision history for this message
Stephen M. Webb (bregma) wrote :
Revision history for this message
Stephen M. Webb (bregma) wrote :

You can verify this incorrect transform using 'xinput map-to-output 7 LVDS-0' followed by 'xinput list-props 7' and examine the values of the input transformation matrix.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks Stephen. Sounds like a reasonable explanation.

Changed in xorg-server (Ubuntu):
status: Incomplete → Triaged
summary: - Some Xapps buttons are not responding
+ [regression] Xmir: Some buttons are unclickable after rotating the
+ screen
tags: added: regression
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

commit 6055ca988532fac82b15100c726c70ea0be033b7
Author: Daniel van Vugt <email address hidden>
Date: Thu Aug 18 16:03:23 2016 +0800

    Create a fake output if the root window resizes.

    This is a new alternate fix for LP: #1504422 and LP: #1602561 which
    has the added bonus of not also causing LP: #1613708 (which technically
    got resolved in the previous revert commit 376a2670fd8ea9).

commit 376a2670fd8ea96db255b46c442469ac83fec2f8
Author: Daniel van Vugt <email address hidden>
Date: Thu Aug 18 15:06:04 2016 +0800

    Revert "Don't delete outputs without replacing them"

    This reverts commit d19641fc01f77420b4ec5d6db6723f519f8f8272.

Changed in xorg-server (Ubuntu):
status: Triaged → Fix Committed
Changed in canonical-devices-system-image:
status: New → Fix Committed
milestone: none → 13
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Fixed in (but not mentioned in):

xorg-server (2:1.18.4-1ubuntu6) yakkety; urgency=medium

  * debian/patches/xmir.patch:
    - Don't call epoxy every frame (LP: #1617932)
    - Ignore 'unknown 11 event' (LP: #1617925)
    - Improve root window resizing code
    - Make randr mode names simpler

 -- Robert Ancell <email address hidden> Wed, 07 Sep 2016
15:50:30 +1200

Changed in xorg-server (Ubuntu):
status: Fix Committed → Fix Released
Stephen M. Webb (bregma)
description: updated
Revision history for this message
Stephen M. Webb (bregma) wrote :

Debdiff for Xenial SRU

Changed in canonical-devices-system-image:
assignee: nobody → Daniel van Vugt (vanvugt)
importance: Undecided → High
Revision history for this message
Stephen M. Webb (bregma) wrote :

Updated debdiff after adding new changelog and backporting to Mir 0.21.

description: updated
Revision history for this message
Andy Whitcroft (apw) wrote : Please test proposed package

Hello Victor, or anyone else affected,

Accepted xorg-server into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/xorg-server/2:1.18.4-0ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in xorg-server (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Christopher Townsend (townsend) wrote :

I have installed xmir from xenial-proposed and confirmed no regressions are caused by this change.

tags: added: verification-done
removed: verification-needed
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xorg-server - 2:1.18.4-0ubuntu0.1

---------------
xorg-server (2:1.18.4-0ubuntu0.1) xenial; urgency=medium

  * New upstream bugfix release. (LP: #1619142)
  * randr-adjust-masters-last-set-time.diff,
    randr-do-not-check-the-screen-size.diff:
    Fix issues changing display mode on prime setups. (LP: #1586260)
  * os-treat-ssh-as-a-non-local-client.diff: Dropped, upstream.
  * drm_device_keep_trying.patch: Dropped, shouldn't be needed anymore,
    and causes issues on non-x86 archs. (LP: #1581076)
  * debian/patches/xmir.patch: backport XMir fixes from Ubuntu "Yakkety Yak"
    - fix button/menu focus failures (lp: #1590553)
    - ignore 'unnkown 11 event' (lp: #1617925)
    - don't call epoxy every frame (lp: #1617932)
    - fix unclickable parts of the screen after rotation (lp: #1613708)
    - fix key repeat issues (lp: #1591356)

 -- Timo Aaltonen <email address hidden> Thu, 01 Sep 2016 10:28:26 +0300

Changed in xorg-server (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Update Released

The verification of the Stable Release Update for xorg-server has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello Victor, or anyone else affected,

Accepted xorg-server-lts-xenial into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/xorg-server-lts-xenial/2:1.18.4-0ubuntu0.2~trusty1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: removed: verification-done
tags: added: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Victor, or anyone else affected,

Accepted xorg-server-lts-xenial into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/xorg-server-lts-xenial/2:1.18.4-0ubuntu0.2~trusty2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in xorg-server-lts-xenial (Ubuntu):
status: New → Invalid
Changed in xorg-server-lts-xenial (Ubuntu Xenial):
status: New → Invalid
Changed in xorg-server-lts-xenial (Ubuntu Trusty):
status: New → Fix Committed
Changed in xorg-server (Ubuntu Trusty):
status: New → Invalid
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.