flathub/org.mozilla.Thunderbird

Wayland with mixed DPI monitor setup not working correctly for Thunderbird

Opened this issue · 10 comments

Please see flatpak/flatpak#5033 for details.

If you run Ubuntu/Wayland with two monitors using different scaling, the default startup of flatpak-Thunderbird makes Thunderbird ignore the scaling setting. Moving Thunderbird from the hidpi monitor to the lodpi monitor and back, the application window will not rescale its UI.

Using --nosocket=fallback-x11 --nosocket=x11 --socket=wayland makes it work as expected again.

I do not know if this is a generic flatpak issue or if it is a packaging problem.

--nosocket=x11 disables xorg support so it's no-go for packaging. Do you use --env=MOZ_ENABLE_WAYLAND=1 for launching app?

Frankly, I have no idea. How do I find out?

I installed flatpak support using the instructions for Ubuntu on Flathub, installed the application using gnome-software and then started the application using the application menu icon.

So I'm using whatever the default settings are for using flatpak on Ubuntu 22.04 while using Wayland.

Could you try flatpak run --env=MOZ_ENABLE_WAYLAND=1 org.mozilla.Thunderbird?

(This is a copy from flatpak/flatpak#5033)

This is suspicious as those apps don't even work on native wayland out of the box. How they work without x11 socket then? Could they escape sandbox through abstract socket?

I have no idea.

Just tested again to be sure:

I can confirm that on my Ubuntu 22.04 default installation with Wayland and a two-monitor setup, Thunderbird works as expected with --nosocket=fallback-x11 --nosocket=x11 --socket=wayland: It will display its window and the UI will change its scaling according to the monitor's scaling settings it is moved to.

UI also appears as expected with --nosocket=fallback-x11 --socket=x11 --socket=wayland and with --nosocket=fallback-x11 --socket=x11 --nosocket=wayland, but in both cases Thunderbird will not change scaling when moving between monitors.

Let me know if there's any way I can help debugging this on my system.

Hi @Erick555, thanks for your response.

As requested, I tested flatpak run --env=MOZ_ENABLE_WAYLAND=1 org.mozilla.Thunderbird with no other parameters.

That works as expected! The UI changes its scaling according to the monitor's scaling settings the Thunderbird window is moved to.

Also tested flatpak run org.mozilla.Thunderbird with no other parameters. Then the Thunderbird window does not change its scaling and stays at 200% on both monitors.

When you use --nosocket=fallback-x11 --nosocket=x11 --socket=wayland and open Help -> More Troubleshooting information then what Graphics -> Window Protocol section says?

Also could you test --nosocket=x11 --socket=fallback-x11 --socket=wayland?

This is from Thunderbird.

--nosocket=fallback-x11 --nosocket=x11 --socket=wayland
Window Protocol: wayland
Rescaling works.

--nosocket=x11 --socket=fallback-x11 --socket=wayland
Windows Protocol: wayland
Rescaling works.

Ok, so I think the situation is like this:

  1. mixed DPI doesn't work for X11 and work on wayland (this is by technical design)
  2. TB & FF default to X11 but you may force them to use wayland either by setting MOZ_ENABLE_WAYLAND=1 or make x11 socket unavailable.
  3. Some distros do this by default

Since upstream still prefer x11 I don't want to change this behavior. I recommend you to chose one of possible workarounds:

flatpak override --user --socket=fallback-x11 org.mozilla.Thunderbird
or
flatpak override --user --env=MOZ_ENABLE_WAYLAND=1 org.mozilla.Thunderbird

Thanks. It's unfortunate that this is the case. I read through the Bugzilla entries and was surprised to learn that Wayland isn't officially supported, when it apparently has been enabled in Ubuntu's .deb builds for some time.

AFAIK ubuntu stopped shipping deb, I guess snap would behave similarly to flatpak.