You are not logged in.

#1 2026-04-24 17:14:17

koroki
Member
Registered: 2013-08-03
Posts: 59

xwayland scaling is wrong

Since I updated to gnome 50, the xwayland scale is wrong completelly if I am using a fractional scaling. I use a 125% scaling and all wayland native programs works properly but programs taht runs over xwayland are unusable since appears super small...

Offline

#2 2026-04-24 18:39:13

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,652

Re: xwayland scaling is wrong

programs that runs over xwayland  … appears super small

Can you quantify that? What processes specifically and how small is "super small"? 100% scale? 80% scale?
Do things works normally w/ any integer scale (100% or 200%)?

Offline

#3 2026-04-25 06:12:33

koroki
Member
Registered: 2013-08-03
Posts: 59

Re: xwayland scaling is wrong

seth wrote:

programs that runs over xwayland  … appears super small

Can you quantify that? What processes specifically and how small is "super small"? 100% scale? 80% scale?
Do things works normally w/ any integer scale (100% or 200%)?

I cannot... seams 50% but I cannot check it.

I upload a screenshot:

Captura-de-pantalla-de-2026-04-25-08-10-29.png
It is blackboc-terminal (GTK3/wayland) vs xterm (in xwayland) over my laptop screen FullHD at 125%.

Last edited by koroki (2026-04-25 06:13:33)

Offline

#4 2026-04-25 08:06:05

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,652

Re: xwayland scaling is wrong

The screenshot is scaled down?
Please don't embed "larger" images anyway but just link them.

xdpyinfo | grep -i resol
xrandr -q
seth wrote:

Do things works normally w/ any integer scale (100% or 200%)?

https://wiki.archlinux.org/title/HiDPI#Xwayland is enabled?

Though I'd actually not do that if your interest is xterm, https://wiki.archlinux.org/title/HiDPI#X_Server to scale dpi sized fonts will likely get you better visual results.

Offline

#5 2026-04-25 09:47:45

koroki
Member
Registered: 2013-08-03
Posts: 59

Re: xwayland scaling is wrong

Up as I know, since some years, this is not an experimental feature.

It does not happen when the scale is integer.
https://ibb.co/ds47JsjF

Offline

#6 2026-04-25 10:59:21

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,652

Re: xwayland scaling is wrong

fractional xwayland scaling is only supported since 20 months w/ v47, no idea whether it's still experimental.
You're apparently using a bitmap font, ie. it will not be DPI scaled and you'd *have* to employ some sort of (blurry) upscaling of the rendered image, is that intentional?

Offline

#7 2026-04-25 11:46:33

hex1337
Member
Registered: 2026-04-25
Posts: 2

Re: xwayland scaling is wrong

Seth is right about the bitmap font that error is xterm failing to load it and falling back to something tiny.

Maybe try this:

xterm -fa 'Monospace' -fs 12

Or set it permanently in ~/.Xresources:

XTermfaceName: Monospace
XTermfaceSize: 12

Fix that first, then see if the scaling still looks off.

Offline

#8 2026-04-26 14:00:54

koroki
Member
Registered: 2013-08-03
Posts: 59

Re: xwayland scaling is wrong

I am using xterm simply as example. In fact, xterm is not a program that I usually use.


I have the same problem with any program that requires xwayland, such as vmd or jdownload.

In gnome 49, the xwayland works correctly.

Offline

#9 2026-04-26 15:22:58

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,652

Re: xwayland scaling is wrong

Consider sharing actually relevant data… are you also using a bitmap font in those clients?
Have you checked whether fractional xwayland scaling is actually enabled resp. tried to explicitly enable it?

In gnome 49, the xwayland works correctly.

Yeah… gnome is constantly regressing - the last good version was some 2.x release.

Offline

#10 2026-04-27 21:00:47

rouelle
Member
Registered: 2018-03-13
Posts: 54

Re: xwayland scaling is wrong

I had a similar problem with programs that require Xwayland and I solved (almost completely) by editing /etc/environment and modify a Gnome setting with gsetting by CLI (but can be done also with dconf-editor). My fractional scale is 150%.

/etc/environment:

# This file is parsed by pam_env module
#
# Syntax: simple "KEY=VAL" pairs on separate lines
#
KITTY_ENABLE_WAYLAND=1
QT_AUTO_SCREEN_SCALE_FACTOR=1
QT_QPA_PLATFORM=wayland

GSK_RENDERER=opengl
#ROC_ENABLE_PRE_VEGA=1
#OCL_ICD_FILENAMES=/etc/OpenCL/vendors/rusticl.icd

# GTK — use Wayland backend
# GDK_BACKEND=wayland

# Qt — use Wayland backend
QT_QPA_PLATFORM=wayland;xcb

# Firefox — native Wayland
MOZ_ENABLE_WAYLAND=1

# Electron apps (VS Code, Slack, Discord, etc.)
ELECTRON_OZONE_PLATFORM_HINT=auto

# Clutter (legacy GNOME apps)
# CLUTTER_BACKEND=wayland

# SDL2 — use Wayland
SDL_VIDEODRIVER=wayland,x11

# Java (JDK 21+)
_JAVA_AWT_WM_NONREPARENTING=1

# XDG session type hint
XDG_SESSION_TYPE=wayland
#XDG_CURRENT_DESKTOP=sway  # or GNOME, KDE, Hyprland 

Several lines are commented, you may have to comment or uncomment according to your situation. Some lines are probably useless and others usefull, but you'll find your way. This file acts system wide.

Gnome settings

gsettings get org.gnome.mutter experimental-features ['scale-monitor-framebuffer', 'xwayland-native-scaling']

or you can search with dconf-editor org.gnome.mutter experimental-features and select these two options.

Reboot the OS to test the changes and modify accordingly.

--

It's sad that Gnome always bring some glitches every six months but usually there is a solution for most of the regressions.

Last edited by rouelle (2026-04-27 21:02:05)


Sous Linux depuis 1998 / Using Linux since 1998

Offline

#11 2026-04-30 09:32:16

koroki
Member
Registered: 2013-08-03
Posts: 59

Re: xwayland scaling is wrong

seth wrote:

Consider sharing actually relevant data… are you also using a bitmap font in those clients?
Have you checked whether fractional xwayland scaling is actually enabled resp. tried to explicitly enable it?

In gnome 49, the xwayland works correctly.

Yeah… gnome is constantly regressing - the last good version was some 2.x release.

Using integer scaling (100% or 200%), all works properly. The problem appears in fractional scaling.

The problem is NOT the bitmap font... It is an error of xwayland.

I am sorry if my explanation are not the properly.

rouelle wrote:

I had a similar problem with programs that require Xwayland and I solved (almost completely) by editing /etc/environment and modify a Gnome setting with gsetting by CLI (but can be done also with dconf-editor). My fractional scale is 150%.

/etc/environment:

# This file is parsed by pam_env module
#
# Syntax: simple "KEY=VAL" pairs on separate lines
#
KITTY_ENABLE_WAYLAND=1
QT_AUTO_SCREEN_SCALE_FACTOR=1
QT_QPA_PLATFORM=wayland

GSK_RENDERER=opengl
#ROC_ENABLE_PRE_VEGA=1
#OCL_ICD_FILENAMES=/etc/OpenCL/vendors/rusticl.icd

# GTK — use Wayland backend
# GDK_BACKEND=wayland

# Qt — use Wayland backend
QT_QPA_PLATFORM=wayland;xcb

# Firefox — native Wayland
MOZ_ENABLE_WAYLAND=1

# Electron apps (VS Code, Slack, Discord, etc.)
ELECTRON_OZONE_PLATFORM_HINT=auto

# Clutter (legacy GNOME apps)
# CLUTTER_BACKEND=wayland

# SDL2 — use Wayland
SDL_VIDEODRIVER=wayland,x11

# Java (JDK 21+)
_JAVA_AWT_WM_NONREPARENTING=1

# XDG session type hint
XDG_SESSION_TYPE=wayland
#XDG_CURRENT_DESKTOP=sway  # or GNOME, KDE, Hyprland 

Several lines are commented, you may have to comment or uncomment according to your situation. Some lines are probably useless and others usefull, but you'll find your way. This file acts system wide.

Gnome settings

gsettings get org.gnome.mutter experimental-features ['scale-monitor-framebuffer', 'xwayland-native-scaling']

or you can search with dconf-editor org.gnome.mutter experimental-features and select these two options.

Reboot the OS to test the changes and modify accordingly.

--

It's sad that Gnome always bring some glitches every six months but usually there is a solution for most of the regressions.

Thanks for the reply.
However, checking your environment file, most commands are to force the usage of wayland. I'm doing that for the majority of the programs that I used, but the small amount of programs that do not have wayland version, xwayland must work.

Offline

#12 2026-04-30 10:03:47

koroki
Member
Registered: 2013-08-03
Posts: 59

Re: xwayland scaling is wrong

In my research I found that the problem is related with the new version of gnome. Downgrading xwayland and/or wayland does not solve the problem.

Some kind of solution is using xwayland-satelite, where the programs can read properly, but it is quite annoying.

Offline

#13 2026-04-30 16:17:39

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,652

Re: xwayland scaling is wrong

seth wrote:

Have you checked whether fractional xwayland scaling is actually enabled resp. tried to explicitly enable it?

Offline

#14 2026-04-30 18:01:31

Bevan
Member
Registered: 2009-09-08
Posts: 104

Re: xwayland scaling is wrong

I have the same problem with some applications, in particular VirtualBox VMs. Enabling fractional XWayland scaling does not change the behavior. My setup may be a bit special in that I use a notebook with external monitor connected with the integrated display set to 125% scaling and the external display to 100%. Still, this worked fine until a recent update.

@koroki, do you know if there is an upstream bug report about this already?

Offline

#15 2026-04-30 19:50:31

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,652

Offline

#16 2026-05-03 21:32:24

koroki
Member
Registered: 2013-08-03
Posts: 59

Re: xwayland scaling is wrong

Bevan wrote:

I have the same problem with some applications, in particular VirtualBox VMs. Enabling fractional XWayland scaling does not change the behavior. My setup may be a bit special in that I use a notebook with external monitor connected with the integrated display set to 125% scaling and the external display to 100%. Still, this worked fine until a recent update.

@koroki, do you know if there is an upstream bug report about this already?

As seth wrote, I opened an issue.

In my case, I solve the problem with that command:
gsettings set org.gnome.mutter.wayland xwayland-scaling-factor 1

It is not in the Arch wiki and I could find on internet. I'm not sure if it is new.

Offline

#17 2026-05-06 18:10:21

Bevan
Member
Registered: 2009-09-08
Posts: 104

Re: xwayland scaling is wrong

koroki wrote:

In my case, I solve the problem with that command:
gsettings set org.gnome.mutter.wayland xwayland-scaling-factor 1

This worked for me as well. Thanks a bunch, also for taking this issue upstream!

Offline

Board footer

Powered by FluxBB