Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dafzor opened this issue Feb 9, 2025 · 8 comments · May be fixed by #656
Open

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

dafzor opened this issue Feb 9, 2025 · 8 comments · May be fixed by #656
Labels
bug Something isn't working good first issue Good first issues to work on for new contributors not planned but open to a PR I do not intend on working on this myself, but I would not be opposed to an implementation.

Comments

@dafzor
Copy link

dafzor commented Feb 9, 2025

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

@dafzor dafzor added the bug Something isn't working label Feb 9, 2025
@GreemDev GreemDev added good first issue Good first issues to work on for new contributors not planned but open to a PR I do not intend on working on this myself, but I would not be opposed to an implementation. labels Feb 9, 2025
@bangfire
Copy link
Contributor

bangfire commented Feb 10, 2025

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
Copy link

I have the same issue with Appimage on Wayland

@JoeneckSpoeneck
Copy link

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
Copy link
Author

dafzor commented Feb 11, 2025

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
Copy link

pbek commented Feb 11, 2025

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

@awsms
Copy link

awsms commented Feb 17, 2025

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
Copy link
Contributor

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.

@awsms
Copy link

awsms commented Feb 17, 2025

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 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good first issues to work on for new contributors not planned but open to a PR I do not intend on working on this myself, but I would not be opposed to an implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants