Open Bug 1373752 Opened 7 years ago Updated 7 months ago

Scale between HiDPI and LoDPI screens on Linux

Categories

(Core :: Widget: Gtk, defect, P3)

54 Branch
Unspecified
Linux
defect

Tracking

()

People

(Reporter: ryan, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0
Build ID: 20170612121707

Steps to reproduce:

When using Firefox on a multi-monitor setup with both HiDPI and LoDPI screens, Firefox cannot adjust when moved between screens. Some applications built with toolkits (like GTK3) are able to (at least when using Wayland display server).


Actual results:

Whichever display is the "Primary" display is what Firefox uses in order to decide whether to be drawn for a HiDPI or LoDPI screen (seemingly). After that the size does not change to fit the display that it is moved to.


Expected results:

Firefox should be able to utilize the same technology that GTK3 does in order to adjust to accommodate the resolution of the screen it resides on. Thus displaying properly as it is moved across multiple monitors with different resolutions.
Component: Untriaged → Widget: Gtk
Product: Firefox → Core
Priority: -- → P3
I'm affected by this on a fresh install of Ubuntu 17.10 running Firefox 58.0 (64-bit).

Machine is a Dell XPS 9360 with a HiDPI screen, connected via HDMI to a LowDPI external monitor. Firefox doesn't scale windows on the LoDPI monitor, so page elements and browser chrome appear very large. Other GTK apps such as terminal or file browser do scale correctly.

Apparently, I cannot edit the tracking info, but I think this bug blocks bug #635134 - [meta] Firefox Wayland port.

Marking this "New" based on Lindsay's comment and add as a blocker to bug 635134 based on Jan's comment.

Blocks: wayland
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → Linux

X11 does not support correct Hi/Lo DPI scaling across monitors, you need to use Wayland for it.

The dependency should be the other way around: this works on Wayland, so this is blocked by bug 635134

No longer blocks: wayland
Depends on: wayland

Still an issue. In my case a Dell XPS 9310 (running 3840x2400) connected to a external monitor (running 1920x1080). Dragging a Firefox window from laptop to external display exhibits this issue, whereas other apps (terminal, files) do not.

(In reply to mark.drovdahl from comment #6)

Still an issue. In my case a Dell XPS 9310 (running 3840x2400) connected to a external monitor (running 1920x1080). Dragging a Firefox window from laptop to external display exhibits this issue, whereas other apps (terminal, files) do not.

Tinkering a bit, and I believe this is captured above, but perhaps reframing it may help...it appears that Firefox ignores the per display scaling factor for anything except the primary display. That is, Firefox launches scaled to whatever the primary display is scaled at and then does not adjust when the window is moved between displays with differing scaling factors.

Should have clarified, all my comments above are in regards to Firefox on Ubuntu 20.10 running Wayland.

Did a little more research...and found a suitable workaround. If I launch Firefox with $ MOZ_ENABLE_WAYLAND=1 firefox I get proper scaling across displays with different scaling factors. Yay.

(In reply to mark.drovdahl from comment #9)

Did a little more research...and found a suitable workaround. If I launch Firefox with $ MOZ_ENABLE_WAYLAND=1 firefox I get proper scaling across displays with different scaling factors. Yay.

Hehe, right, that's exactly what Martin meant :)

We are getting closer and closer to enabling it by default, but it's still a couple of releases out. Some distributions like Fedora already do so, however. See also bug 1543600

See Also: → wayland-nightly

Removing Wayland tracker as this bug is about X11.

No longer depends on: wayland
Severity: normal → S3

Hi,

I'm also getting this bug on Ubuntu 22.10 on Wayland. When using a 1080p built-in display and a 4k external display (scaling set to 200% in system settings, fractional scaling disabled) Firefox will use the primary display's DPI (in my case the 1080p display) and the UI elements on the 4k display are tiny. Other apps (like the settings app) adjusts scaling when moved from one display to the other, but Firefox does not.

Here is an example of how it looks if the 1080p display is the main display:

Example1080

And here with the 4k display being the main display:

Example4k

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: