cursor does not track window when dragging between monitors with different scaling factors

Bug #2015861 reported by Tim Holmes-Mitra
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mutter
Fix Released
Unknown
mutter (Ubuntu)
Fix Released
Low
Unassigned
Lunar
Fix Released
Low
Unassigned

Bug Description

Impact
-------
I have two screens. My laptop is using 200% scaling and the other external screen is using 100% scaling. When I drag windows between the monitors the cursor moves to unexpected locations when it moves onto another screen with a different scaling factor.

I would expect the cursor to stay in the relative location when I started dragging the window. Hopefully this is clear the the attached screencast.

Test Case
---------
1. Install the update
2. Log out
3. Log back in
4. If not already done, open the Settings app. Click one of the displays in the list and set it to 200%. Leave your other display at 100%.
5. Drag a window from one screen to the other.
The cursor and window should smoothly transition from one displays to the other without the cursor jumping dramatically to a different location when it crosses between the displays.

Other Info
----------
Setting different scaling for different displays requires Wayland. This will not work with the Ubuntu on Xorg session.

What Could Go Wrong
-------------------
This fix is included in the upstream mutter 44.1 release. See LP: #2020225 for more details.

ProblemType: Bug
DistroRelease: Ubuntu 23.04
Package: gnome-shell 44.0-2ubuntu3
ProcVersionSignature: Ubuntu 6.2.0-19.19-generic 6.2.6
Uname: Linux 6.2.0-19-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.26.0-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Tue Apr 11 11:04:51 2023
DisplayManager: gdm3
InstallationDate: Installed on 2023-04-05 (5 days ago)
InstallationMedia: Ubuntu 23.04 "Lunar Lobster" - Daily amd64 (20230404)
RelatedPackageVersions: mutter-common 44.0-2ubuntu3
SourcePackage: gnome-shell
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Tim Holmes-Mitra (timhm) wrote :
Tim Holmes-Mitra (timhm)
description: updated
Tim Holmes-Mitra (timhm)
tags: added: rls-ll-incoming
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I have looked into this bug before. From what I recall there was a fundamental conflict between:

 (a) Keeping the absolute cursor position on both monitors' boundaries when crossing; and
 (b) Keeping the relative cursor position on the titlebar.

So mutter chose (a) over (b).

More recently however, upstream claim to have solved (changed) it in mutter 44.1:
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2942

affects: gnome-shell (Ubuntu) → mutter (Ubuntu)
Changed in mutter (Ubuntu):
status: New → Fix Committed
importance: Undecided → Low
tags: added: fixed-in-mutter-44.1 fixed-upstream
Changed in mutter:
status: Unknown → New
Changed in mutter:
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mutter - 44.1-1ubuntu1

---------------
mutter (44.1-1ubuntu1) mantic; urgency=medium

  * Merge with Debian (LP: #2020225, LP: #2012100, LP: #2012717,
    LP: #2013216, LP: #2019225, LP: #2006044, LP: #2015861, LP: #1999578,
    LP: #2011251, LP: #2016308)
  * Remaining changes:
    - Add x11-Add-support-for-fractional-scaling-using-Randr.patch
    - Add window-Add-ability-to-override-the-edge-constraints.patch
      + Make possible for extensions (such as Tiling Assistant) to override
        window constraints. (LP: #2007710, #2011611)

mutter (44.1-1) experimental; urgency=medium

  [ Jeremy Bícha ]
  * New upstream release
  * Drop bash patch applied in new release
  * debian/libmutter-12-0.symbols: Add new symbols

  [ Daniel van Vugt ]
  * Update triple buffering patch for Mutter 44.1

  [ Marco Trevisan (Treviño) ]
  * Fix issue with Firefox opening black window in wayland sessions
    - Add d/p/display-Set-compositor-selection-earlier-on-XWayland.patch
      (LP: #1987976)

 -- Jeremy Bícha <email address hidden> Fri, 19 May 2023 16:24:49 -0400

Changed in mutter (Ubuntu):
status: Fix Committed → Fix Released
Jeremy Bícha (jbicha)
description: updated
Changed in mutter (Ubuntu Lunar):
importance: Undecided → Low
status: New → In Progress
Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello Tim, or anyone else affected,

Accepted mutter into lunar-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mutter/44.1-0ubuntu1 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, what testing has been performed on the package and change the tag from verification-needed-lunar to verification-done-lunar. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-lunar. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in mutter (Ubuntu Lunar):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-lunar
Revision history for this message
Tim Holmes-Mitra (timhm) wrote :

Fixes in proposed resolves the issue for me.

After testing I removed the packages because overview was very laggy on my Z16 but only when connected to an external monitor. Not sure if its related?

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

Thanks, fix verified then.

As for "overview was very laggy", this is the first I've heard of any regressions from the proposed packages. We definitely want to get to the bottom of that so when you have time please open a new bug about it and mention:

  * Wayland or Xorg
  * What GPU(s) and drivers are active (lspci -k)

If the problem is real then it will probably block the release.

tags: added: verification-done-lunar
removed: verification-needed-lunar
Revision history for this message
Robie Basak (racb) wrote :

I don't see a report so I presume this is OK to release?

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mutter - 44.1-0ubuntu1

---------------
mutter (44.1-0ubuntu1) lunar; urgency=medium

  [ Jeremy Bícha ]
  * New upstream release (LP: #2020225, LP: #2012717, LP: #2013216,
    LP: #2015861, LP: #2017097)
  * debian/libmutter-12-0.symbols: Add new symbols
  * Drop 3 patches applied in new release

  [ Daniel van Vugt ]
  * Update triple buffering patch for Mutter 44.1 (LP: #2017137)

 -- Jeremy Bícha <email address hidden> Fri, 19 May 2023 16:18:13 -0400

Changed in mutter (Ubuntu Lunar):
status: Fix Committed → Fix Released
Revision history for this message
Robie Basak (racb) wrote : Update Released

The verification of the Stable Release Update for mutter has completed successfully and the package is now being 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.

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.