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

Flatpak UI not scaled correctly on KDE+Wayland #35

Closed
zany130 opened this issue Dec 29, 2023 · 11 comments
Closed

Flatpak UI not scaled correctly on KDE+Wayland #35

zany130 opened this issue Dec 29, 2023 · 11 comments
Labels
bug Something isn't working

Comments

@zany130
Copy link

zany130 commented Dec 29, 2023

image

it seems like the GUI in the flatpak doesn't like KDE display scaling settings

installed the flatpak from flatpak install --user https://dl.flathub.org/build-repo/72997/com.quexten.Goldwarden.flatpakref

Screens
=======
Active screen follows mouse:  yes
Number of Screens: 3

Screen 0:
---------
Name: DP-1
Enabled: 1
Geometry: 2932,677,2048x864
Scale: 1.25
Refresh Rate: 74991
Adaptive Sync: automatic
Screen 1:
---------
Name: DP-2
Enabled: 1
Geometry: 0,0,1396x785
Scale: 2.75
Refresh Rate: 120000
Adaptive Sync: always
Screen 2:
---------
Name: HDMI-A-2
Enabled: 1
Geometry: 1396,355,1536x864
Scale: 1.25
Refresh Rate: 74973
Adaptive Sync: automatic

Operating System: Garuda Linux
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.113.0
Qt Version: 5.15.11
Kernel Version: 6.6.8-1-cachyos (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 6700 XT

@quexten
Copy link
Owner

quexten commented Dec 29, 2023

Thanks for the report, will attempt to reproduce in a VM in a bit. From your display information, am I reading correctly that you are using fractional scaling?

@zany130
Copy link
Author

zany130 commented Dec 29, 2023

Yup one of the reasons why I using Wayland. and I have diffrent scalling for some monitors

but I am running the app on DP-1 so 1.25 scale

@quexten
Copy link
Owner

quexten commented Dec 29, 2023

Seems like this is an issue with XWayland+KDE. On XOrg the app works fine at any scale. On Wayland (non-Flatpak), it also works at any scale. On Flatpak, it seems to fall back to XWayland, and thus the scale is completely messed up. I'm not entirely sure yet what's missing for it to be able to use Wayland directly, but it's most likely just some permissions.

@quexten quexten changed the title Flatpak UI not scaled correctly Flatpak UI not scaled correctly on KDE+Wayland Dec 29, 2023
@quexten
Copy link
Owner

quexten commented Dec 30, 2023

@zany130 ok, seems I tracked it down - at least on Kubuntu. The reason is a bug in the kde xdg desktop portal. To fix, set: /usr/share/xdg-desktop-portal/kde-portals.conf
to:

[preferred]
default=kde
org.freedesktop.impl.portal.Settings=kde;gtk;

Can you check if this works on your system too?

flatpak/xdg-desktop-portal#1112 (comment)

@quexten quexten added the bug Something isn't working label Dec 30, 2023
@zany130
Copy link
Author

zany130 commented Dec 30, 2023

nope, no luck. I already had that set (i think I had an issue with Flatpak apps not using my cursor, so I set it then)

I tried forcing the app to run with xwayland ( it was running under Wayland) by removing the Wayland flatpack permission and that actually fixed the scaling for me

image

last sync date is a little funky though ...

@quexten
Copy link
Owner

quexten commented Dec 30, 2023

I tried forcing the app to run with xwayland ( it was running under Wayland) by removing the Wayland flatpack permission and that actually fixed the scaling for me

Yeah, XWayland also avoids the issue. On my fixing attempt, I also rebooted inbetween, but from a clean Kubuntu system, that's all that was required for me. Either way, not a bug directly in Goldwarden. Eitherway, seems more like a bug with an upstream dependency (whether the kde portal, or gtk itself).

I tried forcing the app to run with xwayland ( it was running under Wayland) by removing the Wayland flatpack permission and that actually fixed the scaling for me

Do you have some instructions on this I could note on the wiki? Did you just build without the Wayland permission, or is there some command line parameter to block permissions (I didn't find anything like this in my brief search on the flatpak wiki).

@quexten
Copy link
Owner

quexten commented Dec 30, 2023

For the last sync date, that's actually quite funny. It should say "never" but due to the timezone, the date does not start with 1970, so the detection of "no date" (being 0 in unix time, i.e 1970-01-01) fails. I'll fix that soon.

@zany130
Copy link
Author

zany130 commented Dec 30, 2023

Do you have some instructions on this I could note on the wiki? Did you just build without the Wayland permission, or is there some command line parameter to block permissions (I didn't find anything like this in my brief search on the flatpak wiki).

I just used kde built-in flatpak permission settings tool. Flatseal should also do the same thing

image

prob a way to also do it from the terminal. IDK if you can ship the flatpak with that forcibly disabled, but personal I think it may be better to add a note in the readme or something and let the user deal with that?

@zany130
Copy link
Author

zany130 commented Dec 30, 2023

Guess this can be closed btw since its more of a upstream problem

@zany130 zany130 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 30, 2023
@quexten
Copy link
Owner

quexten commented Dec 30, 2023

I linked your comment in the Wiki now https://github.com/quexten/goldwarden/wiki/Flatpak-Configuration , thanks again!

@zany130
Copy link
Author

zany130 commented Jan 20, 2024

fixed by installing the gtk portal https://wiki.archlinux.org/title/XDG_Desktop_Portal#Poor_font_rendering_in_GTK_apps_on_KDE_Plasma

maybe add a note on the wiki for this? @quexten

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants