You are not logged in.

#1 2024-10-24 09:28:53

pinkink
Member
Registered: 2022-11-26
Posts: 12

[SOLVED] GNOME - inconsistent application scaling

I have multiple displays that require different scaling factors (e.g. 200% and 100%) and I experience inconsistent scaling of applications, depending on the application and on which display is selected as primary.

Examples:

Primary display is scaled 200% secondary is 100%
Run Firefox, it looks good both on the primary and secondary.
Run Chromium, it looks good on primary, but huge on secondary.
If I run chromium with forced QT scale factor 0.5, the contents of the chromium window is ok, but the title bar is huge.

Conversely,
Primary display is scaled 100% secondary is 200%
Firefox - ok.
Chromium - too tiny on the secondary.

Examples of apps that misbehave:
Chromium, virtualbox, gnome's own "do you want to apply display settings" popup.

Apps that are ok:
Terminal, Firefox, most other gnome apps.

What can cause this misbehavior and how to fix?

Last edited by pinkink (2024-10-26 13:09:59)

Offline

#2 2024-10-24 14:02:39

seth
Member
Registered: 2012-09-03
Posts: 60,779

Re: [SOLVED] GNOME - inconsistent application scaling

If I run chromium with forced QT scale factor 0.5

chromium does not use Qt
https://wiki.archlinux.org/title/HiDPI# … gle_Chrome

Is this gnome on wayland or X11?

Offline

#3 2024-10-24 16:27:16

pinkink
Member
Registered: 2022-11-26
Posts: 12

Re: [SOLVED] GNOME - inconsistent application scaling

Sorry! I think I tested that scale factor on virtualbox then. This is wayland, nvidia.

Offline

#4 2024-10-24 19:34:21

seth
Member
Registered: 2012-09-03
Posts: 60,779

Re: [SOLVED] GNOME - inconsistent application scaling

The reason is most likely xwayland, can you control the chromium behavior by forcing a native client?
https://wiki.archlinux.org/title/Chromi … er_Wayland (ignore the symptom, the problem is that chromium accidentally uses xwayland by default)

Offline

#5 2024-10-26 08:18:55

pinkink
Member
Registered: 2022-11-26
Posts: 12

Re: [SOLVED] GNOME - inconsistent application scaling

Hi seth, thank you for the helpful hint. Yes, according to xlsclients both chromium and virtualbox run under Xwayland.
I also lacked the qt5-wayland and qt6-wayland packages.

It seems that chromium behavior is a bug and running chromium --ozone-platform=wayland fixes the problem.
However, I can't figure out how to force virtualbox use wayland. I tried QT_QPA_PLATFORM=wayland but that makes no difference. Do you happen to have an idea here?

Offline

#6 2024-10-26 13:08:25

pinkink
Member
Registered: 2022-11-26
Posts: 12

Re: [SOLVED] GNOME - inconsistent application scaling

I have done some digging and it appears that while the root cause is indeed Xwayland, every app has their own quirks and may or may not be persuaded to use Wayland proper.
I will now mark the thread as resolved, since I understand the root cause.

Chromium - intermittently works and doesn't, has currently a bug that requires extra --ozone-platform=wayland
(some) QT apps - some of them say "Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway." but they can be convinced by using that env var
Virtualbox - cant be convinced, forcibly uses X - https://www.virtualbox.org/ticket/18679

Offline

#7 2024-10-26 13:12:59

seth
Member
Registered: 2012-09-03
Posts: 60,779

Re: [SOLVED] GNOME - inconsistent application scaling

It seems that chromium behavior is a bug and running chromium --ozone-platform=wayland fixes the problem.

Yup.

Judging https://forums.virtualbox.org/viewtopic … 2&start=15 VB doesn't have native wayland support a of this May.
Also see https://wiki.archlinux.org/title/Virtua … tion_fault

xwayland HiDPI support is an open ticket, https://wiki.archlinux.org/title/HiDPI#XWayland & https://gitlab.gnome.org/GNOME/mutter/-/issues/478
Can you steer it using https://wiki.archlinux.org/title/HiDPI#Qt_5 ?

Edit: didn't see your last post wink

Last edited by seth (2024-10-26 13:13:44)

Offline

Board footer

Powered by FluxBB