scaling changes when closing/re-opening the lid

Bug #1793496 reported by Matthias Klose
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Mutter
New
Undecided
Unassigned
mutter (Ubuntu)
Fix Released
Medium
Marco Trevisan (Treviño)
Bionic
Fix Released
Medium
Marco Trevisan (Treviño)
Focal
Fix Released
Medium
Marco Trevisan (Treviño)

Bug Description

[ Impact ]

scaling changes when closing/re-opening the lid. Seen in bionic.

My scaling is set to 100%, but the laptop is considered highdpi by mutter, and during suspend/resume it changes back to default ignoring settings.

$ xprop -spy -root RESOURCE_MANAGER
[...]
RESOURCE_MANAGER(STRING) = "*customization:\t-color\nXft.dpi:\t192\nXft.antialias:\t1\nXft.hinting:\t1\nXft.hintstyle:\thintslight\nXft.rgba:\trgb\nXcursor.size:\t48\nXcursor.theme:\tDMZ-White\n"
RESOURCE_MANAGER(STRING) = "*customization:\t-color\nXft.dpi:\t96\nXft.antialias:\t1\nXft.hinting:\t1\nXft.hintstyle:\thintslight\nXft.rgba:\trgb\nXcursor.size:\t24\nXcursor.theme:\tDMZ-White\n"

xrandr
Screen 0: minimum 320 x 200, current 2560 x 1440, maximum 8192 x 8192
eDP-1 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 309mm x 174mm
   2560x1440 60.00*+ 59.99 59.99 59.96 59.95

[ Test case ]

In a laptop with HiDPI screen, force the scaling to 1:

Run this and close the lid:
 xprop -spy -root RESOURCE_MANAGER

Once reopened the value should not change and if it does the `Xft.dpi:\t96` value should stay constant, and not change to 192.

[ Regression potential ]

Wrong resolution is set for the laptop lid

Changed in mutter (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

This has been fixed by

mutter (3.32.0-1ubuntu2) disco; urgency=medium

  * debian/patches/x11-Add-support-for-fractional-scaling-using-Randr.patch:
    - Don't invert the screen size when rotation is enabled (LP: #1822513)
    - Remove unneeded cleanup changes
    - Use xcb checked function to set scaling to catch errors
    - Update screen size only after monitors modes have been derived
      (LP: #1822616)
    - Trigger a monitors rebuild only if scale has changed (LP: #1823485)
    - Only update UI scaling when output scaling is enabled (LP: #1822478)

 -- Marco Trevisan (Treviño) Wed, 03 Apr 2019 19:19:59 -0400

I expect this is fixed by https://gitlab.gnome.org/GNOME/mutter/merge_requests/336 (issue https://gitlab.gnome.org/GNOME/mutter/issues/407)

Matthias Klose (doko)
tags: added: rls-bb-incoming
Iain Lane (laney)
no longer affects: mutter (Ubuntu Bionic)
Changed in mutter:
status: Unknown → New
Revision history for this message
Matthias Klose (doko) wrote :

fyi, with the packages provided by Marco I still can reproduce the issue with bionic.

tags: added: xrandr-scaling
Changed in mutter:
status: New → Fix Released
Will Cooke (willcooke)
Changed in mutter (Ubuntu Bionic):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
tags: removed: rls-bb-incoming
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in mutter (Ubuntu Bionic):
status: New → Confirmed
Revision history for this message
Matthias Klose (doko) wrote :

still seen in focal, with both X and wayland

Changed in mutter (Ubuntu):
status: Fix Released → New
tags: added: champagne rls-ff-incoming
Changed in mutter (Ubuntu Focal):
status: New → Triaged
tags: removed: champagne rls-ff-incoming
tags: added: bionic focal
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Matthias, I don't see this happening now as per 3.36.1 mutter changes, can you confirm?

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Nope, sorry... Just re-experienced.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Ok, finally found the root issue.

Handled at https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1200

Changed in mutter:
importance: Unknown → Undecided
status: Fix Released → New
Changed in mutter (Ubuntu Focal):
status: Triaged → In Progress
Changed in mutter (Ubuntu Bionic):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mutter - 3.36.1-3ubuntu2

---------------
mutter (3.36.1-3ubuntu2) focal; urgency=medium

  * d/p/monitor-config-manager-Fallback-to-closed-laptop-lid-conf.patch:
    - Fallback to closed laptop lid configuration if no other available
       (LP: #1793496)
  * d/p/x11-Add-support-for-fractional-scaling-using-Randr.patch:
    - Don't override non-fractionally scaled monitors scaling (LP: #1873348)

 -- Marco Trevisan (Treviño) <email address hidden> Thu, 16 Apr 2020 22:04:59 +0200

Changed in mutter (Ubuntu Focal):
status: In Progress → Fix Released
description: updated
Changed in mutter (Ubuntu Bionic):
status: Confirmed → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Matthias, or anyone else affected,

Accepted mutter into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mutter/3.36.2-1ubuntu1~20.04.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 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-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. 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 Focal):
status: Fix Released → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

This was already part of 3.36.1-3ubuntu2, so no need to perform verification (already done, BTW).

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Changed in mutter (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) 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.

Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Matthias, or anyone else affected,

Accepted mutter into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mutter/3.28.4+git20200505-0ubuntu18.04.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 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-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. 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 Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
removed: verification-done
Revision history for this message
Brian Murray (brian-murray) wrote :
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Matthias, or anyone else affected,

Accepted mutter into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mutter/3.28.4+git20200505-0ubuntu18.04.2 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-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. 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.

Revision history for this message
Brian Murray (brian-murray) wrote : [mutter/bionic] verification still needed

The fix for this bug has been awaiting testing feedback in the -proposed repository for bionic for more than 90 days. Please test this fix and update the bug appropriately with the results. In the event that the fix for this bug is still not verified 15 days from now, the package will be removed from the -proposed repository.

tags: added: removal-candidate
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Finally I tested 3.28.4+git20200505-0ubuntu18.04.2 in bionic, and testcase works fine while no regression seems to happen.

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
tags: removed: removal-candidate
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mutter - 3.28.4+git20200505-0ubuntu18.04.2

---------------
mutter (3.28.4+git20200505-0ubuntu18.04.2) bionic; urgency=medium

  * debian/patches: Cherry-pick patch to make mutter compile with newer mesa
    (LP: #1896825)

mutter (3.28.4+git20200505-0ubuntu18.04.1) bionic; urgency=medium

  * New upstream git snapsnot
    - monitor-manager: use MonitorsConfig to track switch_config
    - monitor-manager: Don't use switch-config when ensuring configuration
    - core: Avoid consecutive workspace changes in window construction
    - core: propagate the effective on-all-workspaces setting to transient window
    - window: Really propagate effective on-all-workspaces setting to transients
    - monitor-config-manager: Fallback to closed laptop lid configuration
      (LP: #1793496)
  * debian/control*: update VCS informations to point to ubuntu salsa branch
  * d/p/monitor-manager-Don-t-use-switch-config-when-ensuring-con.patch,
    d/p/monitor-manager-use-MonitorsConfig-to-track-switch_config.patch,
    d/p/screen-Destroy-window-actors-after-windows-while-unmanagi.patch,
    d/p/screen-Unset-the-active-workspace-and-remove-workspaces-o.patch,
    d/p/stack-Add-a-function-to-get-a-sorted-list-of-focus-candid.patch,
    d/p/test-runner-Add-assert_focused-command.patch,
    d/p/test-runner-Add-dispatch-command.patch,
    d/p/test-runner-Add-sleep-command.patch,
    d/p/tests-Add-accept_focus-command-to-runner-and-client.patch,
    d/p/tests-Add-can_take_focus-command-to-runner-and-client.patch,
    d/p/tests-Verify-focused-window-in-closed-transient-tests.patch,
    d/p/tests-stacking-Add-tests-with-no-input-and-no-take-focus-.patch,
    d/p/window-Emit-an-error-and-return-when-trying-to-activate-a.patch,
    d/p/window-x11-Accept-any-focusable-window-as-fallback-focus.patch,
    d/p/window-x11-Don-t-double-check-for-unmanaging-windows.patch,
    d/p/window-x11-Focus-a-window-in-the-active-workspace-as-take.patch,
    d/p/window-x11-Focus-the-default-window-with-delay-while-wait.patch,
    d/p/window-x11-Use-any-focusable-window-as-fallback-delayed-f.patch,
    d/p/workspace-Focus-only-ancestors-that-are-focusable.patch:
    - Dropped, included in the git snapshot already

 -- Marco Trevisan (Treviño) <email address hidden> Wed, 23 Sep 2020 21:29:30 +0200

Changed in mutter (Ubuntu Bionic):
status: Fix Committed → Fix Released
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.