scaling changes when closing/re-opening the lid

Bug #1793496 reported by Matthias Klose on 2018-09-20
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Mutter
New
Undecided
Unassigned
mutter (Ubuntu)
Medium
Marco Trevisan (Treviño)
Bionic
Medium
Marco Trevisan (Treviño)
Focal
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

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) on 2019-06-26
tags: added: rls-bb-incoming
Iain Lane (laney) on 2019-06-26
no longer affects: mutter (Ubuntu Bionic)
Changed in mutter:
status: Unknown → New
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) on 2019-09-10
Changed in mutter (Ubuntu Bionic):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
tags: removed: rls-bb-incoming
Launchpad Janitor (janitor) wrote :

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

Changed in mutter (Ubuntu Bionic):
status: New → Confirmed
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

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

Nope, sorry... Just re-experienced.

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

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

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

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.

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