Firefox scales incorrectly when next to a hidpi screen on Wayland
Categories
(Core :: Widget: Gtk, defect, P3)
Tracking
()
People
(Reporter: akdor1154, Unassigned, NeedInfo)
References
(Blocks 1 open bug, )
Details
Attachments
(4 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4464.5 Safari/537.36
Steps to reproduce:
For context, I'm using Firefox in Wayland mode with Gnome Shell 40 as my compositor (stock Pop OS / Ubuntu 21.10).
I have three screens -
[ laptop internal ] [ Dell 1 , 1920x1200 ], [ Dell 2, 1280x1024]
laptop internal is High DPI, set to 200% scaling with fractional scaling disabled in wayland. Dell 1 and Dell 2 are 100% scaling. Dell 1 is my primary.
When Firefox is on the laptop internal display, it scales at 2× correctly.
When Firefox is on the Dell 2 display, it scales at 1× correctly.
When Firefox is on the right side of the Dell 1 display, it scales at 1× correctly.
These are all fine.
However, when Firefox is on the left side of the Dell 1 display, it scales roughly correctly (widgets are the right size visually), but text becomes a bit blurry and it gets a little bit slower when scrolling etc. I believe it's rendering at 2× and getting scaled down to 1× at some point.
I've attached a full log with Widget:5 debug, and also some excerpts annotated with me moving windows
- start on internal (ok)
- move to left of dell 1 (blurry problem here)
- move to right of dell 1 (ok)
- move back to left of dell 1 (blurry)
- move to dell 2 (ok)
When I say "left of", "right of", I'm tiling my windows so that firefox takes up roughly half the screen. My tiler adds a margin of 2-4pixels or so, so Firefox is not at the very edge of the screen in these cases, it's inset a little bit (so likely this is more an off by >1 error than an off by 1 error ;) ).
This seems to support my theory that Firefox is getting rendered at 2× when on the left of Dell 1, and scaled down to 1× in some post step somewhere (firefox, gnome shell, who knows) that hides the problem.
Expected results:
Firefox should not be blurry when it's next to the HiDPI display.
| Reporter | ||
Comment 1•4 years ago
|
||
| Reporter | ||
Comment 2•4 years ago
|
||
| Reporter | ||
Comment 3•4 years ago
|
||
Here is another way to show the problem - here, firefox is in windowed mode and I'm dragged it so the left edge is on either side of about X=10 or so on the left edge of Dell 1. If the left edge of FF is on the right of this line we get Scale=1, if it's on the left we get Scale=2.
This log shows output when I drag back and forth over this invisible line.
Comment 4•4 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Comment 5•4 years ago
|
||
You may see https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3941 - gdk sends wrong scales.
Try latest nightly:
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems?rd=Bug_info_Firefox#Testing_Mozilla_binaries
tun on terminal and unset XDG_CURRENT_DESKTOP env variable.
i.e. run something like:
XDG_CURRENT_DESKTOP="none" MOZ_ENABLE_WAYLAND=1 ./firefox
(but that introduces scaling issues on Gnome as it sends wrong screen sizes). So generally wait until https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3941 hits stable.
| Reporter | ||
Comment 6•4 years ago
|
||
Nah in the meantime I realized it actually affects all GTK apps as well, I just noticed the text rendering in Firefox before I saw it in Gnome Terminal :)
Raised upstream at https://gitlab.gnome.org/GNOME/gtk/-/issues/4372 (well.. i tested with Gtk4 actually which I'm guessing Firefox isn't using, but the behaviour is identical)
Will check nightly in a bit just in case though.
Comment 7•4 years ago
|
||
Okay, moving then.
Description
•