Closed Bug 1607745 Opened 3 years ago Closed 3 years ago

[wayland] Window rendered at the wrong dpi when webrender or layers force enabled is on and system is mixed dpi

Categories

(Core :: Widget: Gtk, defect)

73 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1612377

People

(Reporter: luis.pabon, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached image Gnome 1.png

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:73.0) Gecko/20100101 Firefox/73.0

Steps to reproduce:

Set up:

  • sway 1.2 or gnome 3.34.1 (wayland)
  • Ubuntu 19.10
  • New FF profile
  • FF 73.0b2 from mozilla-next ubuntu ppa and FF 72. FF 71 works correctly though
  • 3 displays: main is 4K / scale 2, then externals are 1080 / scale 1
  • Open firefox and move to another display
  • Enable gfx.webrender.all and/or layers.acceleration.force-enabled

Actual results:

On sway:

  • Window renders correctly only on 4k / scale 2 display
  • On scale 1 displays, window contents are rendered fully on the top-left 1/4 of the window (same as "Gnome 2" screenshot below)
  • Window controls (eg toolbar buttons) still respond by clicking on the position they would be if the window was being rendered correctly

On gnome:

  • If FF is opened first on 4k / scale 2 display, exact same behaviour as sway above (screenshot "Gnome 1")
  • if FF is opened first on a 1080 / scale 1 display, the opposite happens: renders correctly on scale 1 display but window contents are exploded to 4 times the size on the 4k / scale 2 display (screenshot "Gnome 2")

Expected results:

Window is rendered correctly regardless of the dpi of the display FF is at.

When disabling layers.accel and webrender, it works correctly.

Affected:

  • FF 72
  • FF 73b2

Not affected:

  • FF 71
Attached image Gnome 2.png

Made a mistake on the gnome explanation above. Should read as

On gnome:

* If FF is opened first on 4k / scale 2 display, exact same behaviour as sway above (screenshot "Gnome 2")
* if FF is opened first on a 1080 / scale 1 display, the opposite happens: renders correctly on scale 1 display but window contents are exploded to 4 times the size on the 4k / scale 2 display (screenshot "Gnome 1")
Component: Untriaged → Widget: Gtk
OS: Unspecified → Linux
Product: Firefox → Core
Hardware: Unspecified → x86_64

Would be great to test on Fedora 31 as it has up-to-date wayland/mutter packages.

I installed Fedora 31 on another computer (3.34.2) and tested via mozilla's tar dists (71, 72, 73b2) with the same results as ubuntu's gnome (3.34.1) and sway.

I've also updated my day to day laptop to sway 1.3-rc2 and wlroots 0.9.1. Same results.

Since this has Status: Unconfirmed, I though I'd mention that I can reproduce this with sway 1.2 too. I previously saw this behavior only when plugging in the upscaled monitor when Firefox was already running, but today this also happened when Firefox was started after the upscaled monitor was already plugged in.

Martin, (if you still wish to see results from a system with a newer software ☺) the problem also happens in
firefox 72.0.1-1
under Arch Linux with
gnome-shell 1:3.34.3-1
mutter 3.34.3-1
wayland 1.17.0-1
wayland-protocols 1.18-1

Just in case, my observation is: Firefox(gfx.webrender.enabled=true) under wayland only scales properly to the factor of the initial display, even if I create new window and close the previous one.
I'm running the experimental fractional scaling with 1.25 factor, but the proportion between expected and actual scales is 2.

As the bug is still unconfirmed, and there were no reports on KDE so far;
I can confirm the bug on the following setups:

KDE 5.17 on Wayland, Arch Linux, Firefox 72
KDE 5.18 on Wayland, Void Linux, Firefox 72
(both with webrender/layers.acceleration enabled)

My monitor setup is:
1x 1080p/14" laptop display at 150% scaling
1x 1080p/21.5" monitor at 100% scaling

Behavior is as described by above posters.

Status: UNCONFIRMED → NEW
Ever confirmed: true

Just noticed that the bug appears to be a duplicate of 1528581, and that 1528581's scope extends beyond sway and affects all Wayland compositors.

This is probably the same as https://bugzilla.mozilla.org/show_bug.cgi?id=1612377 , a new regression with the same symptoms as https://bugzilla.mozilla.org/show_bug.cgi?id=1528581 (which is actually old/fixed i'm pretty sure)

Aye pretty sure it's the same problem.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1612377
Duplicate of this bug: 1622988
You need to log in before you can comment on or make changes to this bug.