[Bug] UI doesn't scale on linux #643

Open
opened 2025-02-09 13:52:57 +00:00 by dafzor · 8 comments
dafzor commented 2025-02-09 13:52:57 +00:00 (Migrated from github.com)

Description of the issue

I use KDE Plasma with X11 and 2x scaling.

Ryujinx UI is rendered as if scaling was at 1x, previous "official" flatpak version scaled UI to 2x.

Image

Reproduction steps

Open application

Log file

Ryujinx_1.2.81_2025-02-09_13-51-17.log

OS

Arch Linux (X64)

Ryujinx version

1.2.81

Game version

N/A

CPU

AMD Ryzen 9 5950X

GPU

AMD Radeon RX 7900 XTX

RAM

64 GiB

List of applied mods

No response

Additional context?

No response

### Description of the issue I use KDE Plasma with X11 and 2x scaling. Ryujinx UI is rendered as if scaling was at 1x, previous "official" flatpak version scaled UI to 2x. ![Image](https://github.com/user-attachments/assets/96093e31-c628-49ef-a3cd-6263afe13bf9) ### Reproduction steps Open application ### Log file [Ryujinx_1.2.81_2025-02-09_13-51-17.log](https://github.com/user-attachments/files/18724664/Ryujinx_1.2.81_2025-02-09_13-51-17.log) ### OS Arch Linux (X64) ### Ryujinx version 1.2.81 ### Game version N/A ### CPU AMD Ryzen 9 5950X ### GPU AMD Radeon RX 7900 XTX ### RAM 64 GiB ### List of applied mods _No response_ ### Additional context? _No response_
bangfire commented 2025-02-10 10:13:07 +00:00 (Migrated from github.com)

Avalonia doesn't support self-querying display scaling on Wayland. You need to manually tell it via your environment variables. Presumably the old flatpak maintainer automated this process in the sandbox somewhere.
The simplest fire and forget fix is to go to /etc/environment and add the following line somewhere (where X is your scale such as 1.25, 1.5, 1.75, 2 etc.) then restart your DE:

AVALONIA_GLOBAL_SCALE_FACTOR=X

If you have two displays with different fractional scales you could instead use the AVALONIA_SCREEN_SCALE_FACTORS variable as described here: https://github.com/AvaloniaUI/Avalonia/wiki/Configuring-X11-per-monitor-DPI

Avalonia doesn't support self-querying display scaling on Wayland. You need to manually tell it via your environment variables. Presumably the old flatpak maintainer automated this process in the sandbox somewhere. The simplest fire and forget fix is to go to `/etc/environment` and add the following line somewhere (where X is your scale such as 1.25, 1.5, 1.75, 2 etc.) then restart your DE: ``` AVALONIA_GLOBAL_SCALE_FACTOR=X ``` If you have two displays with different fractional scales you could instead use the `AVALONIA_SCREEN_SCALE_FACTORS` variable as described here: https://github.com/AvaloniaUI/Avalonia/wiki/Configuring-X11-per-monitor-DPI
JoeneckSpoeneck commented 2025-02-11 14:19:06 +00:00 (Migrated from github.com)

I have the same issue with Appimage on Wayland

I have the same issue with Appimage on Wayland
JoeneckSpoeneck commented 2025-02-11 18:19:47 +00:00 (Migrated from github.com)

Ok, when I launch Ryujinx from the terminal with AVALONIA_GLOBAL_SCALE_FACTOR=2 it works. In the .desktop file, I wrote "Exec=env AVALONIA_GLOBAL_SCALE_FACTOR=2 ./Applications/Ryujinx.AppImage" so the scaling issue is also fixed when launching Ryujinx from the App Grid. Thanks, @bangfire !

Ok, when I launch Ryujinx from the terminal with AVALONIA_GLOBAL_SCALE_FACTOR=2 it works. In the .desktop file, I wrote "Exec=env AVALONIA_GLOBAL_SCALE_FACTOR=2 ./Applications/Ryujinx.AppImage" so the scaling issue is also fixed when launching Ryujinx from the App Grid. Thanks, @bangfire !
dafzor commented 2025-02-11 19:39:22 +00:00 (Migrated from github.com)

I'm still on X11 but the environment variable worked as well. Maybe add it to the wiki on the config section for future users with the same issue?

I'm still on X11 but the environment variable worked as well. Maybe add it to the wiki on the config section for future users with the same issue?
pbek commented 2025-02-11 21:33:44 +00:00 (Migrated from github.com)

Same issue with the ryubing package on NixOS under KDE Plasma 6 with Wayland. Running AVALONIA_GLOBAL_SCALE_FACTOR=2 ryujinx helped.

Same issue with the `ryubing` package on NixOS under KDE Plasma 6 with Wayland. Running `AVALONIA_GLOBAL_SCALE_FACTOR=2 ryujinx` helped.
awsms commented 2025-02-17 08:12:36 +00:00 (Migrated from github.com)

Avalonia doesn't support self-querying display scaling on Wayland. You need to manually tell it via your environment variables. Presumably the old flatpak maintainer automated this process in the sandbox somewhere. The simplest fire and forget fix is to go to /etc/environment and add the following line somewhere (where X is your scale such as 1.25, 1.5, 1.75, 2 etc.) then restart your DE:

AVALONIA_GLOBAL_SCALE_FACTOR=X

If you have two displays with different fractional scales you could instead use the AVALONIA_SCREEN_SCALE_FACTORS variable as described here: https://github.com/AvaloniaUI/Avalonia/wiki/Configuring-X11-per-monitor-DPI

The NexusMods app (https://github.com/Nexus-Mods/NexusMods.App) scales the UI fine on my 4K TV.
If I set the env var AVALONIA_GLOBAL_SCALE_FACTOR=2, Ryujinx scales fine, but the NexusMod app will be scaled *2.
AVALONIA_GLOBAL_SCALE_FACTOR=1 nexusmods-app => correct scale, AVALONIA_GLOBAL_SCALE_FACTOR=1 ryujinx too small.
This seems to have nothing to do with Wayland or X11, Ryujinx scales at "0.5" for me on i3 by default on my 4K TV.

> Avalonia doesn't support self-querying display scaling on Wayland. You need to manually tell it via your environment variables. Presumably the old flatpak maintainer automated this process in the sandbox somewhere. The simplest fire and forget fix is to go to `/etc/environment` and add the following line somewhere (where X is your scale such as 1.25, 1.5, 1.75, 2 etc.) then restart your DE: > > ``` > AVALONIA_GLOBAL_SCALE_FACTOR=X > ``` > > If you have two displays with different fractional scales you could instead use the `AVALONIA_SCREEN_SCALE_FACTORS` variable as described here: https://github.com/AvaloniaUI/Avalonia/wiki/Configuring-X11-per-monitor-DPI The NexusMods app (https://github.com/Nexus-Mods/NexusMods.App) scales the UI fine on my 4K TV. If I set the env var `AVALONIA_GLOBAL_SCALE_FACTOR=2`, Ryujinx scales fine, but the NexusMod app will be scaled *2. `AVALONIA_GLOBAL_SCALE_FACTOR=1 nexusmods-app` => correct scale, `AVALONIA_GLOBAL_SCALE_FACTOR=1 ryujinx` too small. This seems to have nothing to do with Wayland or X11, Ryujinx scales at "0.5" for me on i3 by default on my 4K TV.
bangfire commented 2025-02-17 17:00:32 +00:00 (Migrated from github.com)

The NexusMods app (https://github.com/Nexus-Mods/NexusMods.App) scales the UI fine on my 4K TV. If I set the env var AVALONIA_GLOBAL_SCALE_FACTOR=2, Ryujinx scales fine, but the NexusMod app will be scaled *2. AVALONIA_GLOBAL_SCALE_FACTOR=1 nexusmods-app => correct scale, AVALONIA_GLOBAL_SCALE_FACTOR=1 ryujinx too small. This seems to have nothing to do with Wayland or X11, Ryujinx scales at "0.5" for me on i3 by default on my 4K TV.

Seeing as the NexusMods app also closed a similar issue as not planned due the exact problem with the framework I described (https://github.com/Nexus-Mods/NexusMods.App/issues/1277), I think there is something happening on your end via the DE/some other factor that you may be missing. They have no special mechanism that Ryujinx doesn't.

> The NexusMods app (https://github.com/Nexus-Mods/NexusMods.App) scales the UI fine on my 4K TV. If I set the env var `AVALONIA_GLOBAL_SCALE_FACTOR=2`, Ryujinx scales fine, but the NexusMod app will be scaled *2. `AVALONIA_GLOBAL_SCALE_FACTOR=1 nexusmods-app` => correct scale, `AVALONIA_GLOBAL_SCALE_FACTOR=1 ryujinx` too small. This seems to have nothing to do with Wayland or X11, Ryujinx scales at "0.5" for me on i3 by default on my 4K TV. Seeing as the NexusMods app also closed a similar issue as not planned due the exact problem with the framework I described (https://github.com/Nexus-Mods/NexusMods.App/issues/1277), I think there is something happening on your end via the DE/some other factor that you may be missing. They have no special mechanism that Ryujinx doesn't.
awsms commented 2025-02-17 17:48:40 +00:00 (Migrated from github.com)

The NexusMods app (https://github.com/Nexus-Mods/NexusMods.App) scales the UI fine on my 4K TV. If I set the env var AVALONIA_GLOBAL_SCALE_FACTOR=2, Ryujinx scales fine, but the NexusMod app will be scaled *2. AVALONIA_GLOBAL_SCALE_FACTOR=1 nexusmods-app => correct scale, AVALONIA_GLOBAL_SCALE_FACTOR=1 ryujinx too small. This seems to have nothing to do with Wayland or X11, Ryujinx scales at "0.5" for me on i3 by default on my 4K TV.

Seeing as the NexusMods app also closed a similar issue as not planned due the exact problem with the framework I described (Nexus-Mods/NexusMods.App#1277), I think there is something happening on your end via the DE/some other factor that you may be missing. They have no special mechanism that Ryujinx doesn't.

Indeed I saw this issue when digging it, what's interesting is both ryujinx & nexusmodsapp are installed the same way on my system:
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ryujinx-git
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=nexusmods-app-git
And I don't see what could influence the scale on any of those. Even if I run env -i nexusmods-app it's scaled properly 🤔

> > The NexusMods app (https://github.com/Nexus-Mods/NexusMods.App) scales the UI fine on my 4K TV. If I set the env var `AVALONIA_GLOBAL_SCALE_FACTOR=2`, Ryujinx scales fine, but the NexusMod app will be scaled *2. `AVALONIA_GLOBAL_SCALE_FACTOR=1 nexusmods-app` => correct scale, `AVALONIA_GLOBAL_SCALE_FACTOR=1 ryujinx` too small. This seems to have nothing to do with Wayland or X11, Ryujinx scales at "0.5" for me on i3 by default on my 4K TV. > > Seeing as the NexusMods app also closed a similar issue as not planned due the exact problem with the framework I described ([Nexus-Mods/NexusMods.App#1277](https://github.com/Nexus-Mods/NexusMods.App/issues/1277)), I think there is something happening on your end via the DE/some other factor that you may be missing. They have no special mechanism that Ryujinx doesn't. Indeed I saw this issue when digging it, what's interesting is both ryujinx & nexusmodsapp are installed the same way on my system: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ryujinx-git https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=nexusmods-app-git And I don't see what could influence the scale on any of those. Even if I run `env -i nexusmods-app` it's scaled properly 🤔
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MeloNX/Ryujinx-ryubing#643
No description provided.