Skip to content

QT scaling - #596

Closed
ghost wants to merge 3 commits into
masterfrom
unknown repository
Closed

ghost wants to merge 3 commits into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Aug 9, 2025

Copy link
Copy Markdown

Add an example to force 2x scaling on QT apps.
Works on KeepassXC and the Nextcloud client for example.

@dhh

dhh commented Aug 10, 2025

Copy link
Copy Markdown
Contributor

Problem is that this causes issues with other apps. We've hardcoded these launch options in a few places: https://github.com/basecamp/omarchy/blob/master/applications/xtras/Zoom.desktop

@ghost

ghost commented Aug 10, 2025

Copy link
Copy Markdown
Author

Any idea what apps caused issues?

You only had QT_SCALE_FACTOR without setting QT_AUTO_SCREEN_SCALE_FACTOR to 0.
I think this could cause double scaling.

@dhh

dhh commented Aug 10, 2025

Copy link
Copy Markdown
Contributor

Ah, maybe that is indeed what happens! I'll need to do some more testing, but good find. Could well be it.

@ghost

ghost commented Aug 10, 2025 •

Copy link
Copy Markdown
Author

Don't add this yet. After a reboot Calibre is huge and KeepassXC is very small again.

@ghost

ghost commented Aug 10, 2025 •

Copy link
Copy Markdown
Author

I'm gonna close this issue because the solution is not good enough.

This works on QT6 apps like Calibre:

export QT_AUTO_SCREEN_SCALE_FACTOR=1
unset QT_SCALE_FACTOR

This on QT5 apps like KeepassXC and the Nextcloud client:

export QT_AUTO_SCREEN_SCALE_FACTOR=0
export QT_SCALE_FACTOR=2

KeepassXC was small because I changed a setting to start it automatically and keep it running in the background.
But now it started before these variables where set.

I think the best solution is to set these variables per app like it is done for Zoom.

@ghost ghost closed this Aug 10, 2025
@ghost

ghost commented Aug 11, 2025

Copy link
Copy Markdown
Author

Summary:
QT6 scales automatically and works without additional settings.
For QT5 you need to set QT_SCALE_FACTOR, but this causes QT6 to misbehave.

QT_DEVICE_PIXEL_RATIO=2 seems to work because it only affects QT5, but it causes a warning:

Warning: QT_DEVICE_PIXEL_RATIO is deprecated. Instead use:
   QT_AUTO_SCREEN_SCALE_FACTOR to enable platform plugin controlled per-screen factors.
   QT_SCREEN_SCALE_FACTORS to set per-screen DPI.
   QT_SCALE_FACTOR to set the application global scale factor.
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""

@dhh , what do you think. Adjust this PR to try with QT_DEVICE_PIXEL_RATIO (like GDK_SCALE) or just set the variable per application like Zoom?

Maybe there should be a question during installing about the scale that should be used. (with a good default)?

@ghost ghost reopened this Aug 11, 2025
@jkc-2

jkc-2 commented Aug 11, 2025

Copy link
Copy Markdown

Hi,
I had a similar issue with SQLite browser and solved it by installing qt5-wayland package

@ghost

ghost commented Aug 11, 2025

Copy link
Copy Markdown
Author

Damn, that solved my problems. No env settings needed anymore. Thanks @jkc-2 !

@jkc-2

jkc-2 commented Aug 11, 2025

Copy link
Copy Markdown

Glad to hear !
Based on Arch doc, it might be that apps were running on Xwayland or were not provided with the actual Wayland conf without this package (or I am completely misunderstanding). doc (see 5.2) :

Qt
To enable Wayland support in Qt 5 or 6, install the qt5-wayland or qt6-wayland package, respectively. Qt applications will then run under Wayland on a Wayland session.

@ghost

ghost commented Aug 11, 2025

Copy link
Copy Markdown
Author

That sounds correct.

It looks like the nvidia script does install qt5-wayland and qt6-wayland.

Since Zoom also uses QT5, I would always install qt5-wayland. (Even with a bare installation?)
And then remove the env variable in the desktop file.

Roeland Moors added 2 commits August 11, 2025 12:32
@ghost ghost changed the title QT scaling example QT scaling Aug 11, 2025
@dhh

dhh commented Aug 11, 2025

Copy link
Copy Markdown
Contributor

I just installed qt5-wayland, but when I launch Zoom without the env variable, I'm still getting 1x resolution which is way too small on the 6K display. So I still think we need something.

@ghost

ghost commented Aug 11, 2025

Copy link
Copy Markdown
Author

Yes, I just tried that. But when you change xwayland=true to xwayland=false in ~/.conffig/zoomus.conf, than it works.

@dhh

dhh commented Aug 11, 2025

Copy link
Copy Markdown
Contributor

Hmm, yeah, but that's unfortunately very glitchy. Try to go to Start Meeting, then select audio option, it'll try to show that as its own window?

@ghost

ghost commented Aug 11, 2025

Copy link
Copy Markdown
Author

@ghost

ghost commented Aug 11, 2025

Copy link
Copy Markdown
Author

I don't think I can solve this. I tried adding window rules, but the popups have the same class and title.

Popups should use xdg_popup on wayland.

There is also a new protocol for dialogs that Hyprland supports, but the applications also need to support that:
https://wayland.app/protocols/xdg-dialog-v1

Here a discussion on Jetbrains about this:
https://youtrack.jetbrains.com/issue/JBR-7521/Wayland-Hyprland-Problem-with-auto-focus-and-popups-spawned-as-windows

I suggest keeping Zoom on XWayland. But we can still install qt5-wayland and leave Zoom like it is now. Or should I just close this PR?

@jkc-2

jkc-2 commented Aug 11, 2025 •

Copy link
Copy Markdown

Keeping the qt5-wayland package would be (in my opinion) a good idea. At least more apps will work out of the box and this will make amd and nvidia install similar.

@ghost

ghost commented Aug 11, 2025

Copy link
Copy Markdown
Author

Yes, KeepassXC works great now. I would also include it.
I think Zoom is a web application wrapped in a qt5 webengine.
Even on XWayland I can't click on the popup under 'more'.
I didn't try it, but can't we just use a web app for Zoom?
I always have to use Teams, but I just use that in Chrome. Works fine.

@dhh

dhh commented Aug 23, 2025

Copy link
Copy Markdown
Contributor

What about qt6-wayland? We're currently installing that as well for nvidia.

@ghost

ghost commented Aug 23, 2025 •

Copy link
Copy Markdown
Author

I don’t have scaling issues on QT6. That’s why I didn’t added it to this PR.

dhh added a commit that referenced this pull request Aug 31, 2025
Closes #596
Co-authored-by: @roelandmoors
@dhh dhh closed this Aug 31, 2025
hamidriaz1998 pushed a commit to hamidriaz1998/omarchy that referenced this pull request Sep 8, 2025
Closes omacom#596
Co-authored-by: @roelandmoors
DanteCpp pushed a commit to DanteCpp/omarchy that referenced this pull request Oct 16, 2026
Offer Wi-Fi on first run when only a link-local link is up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants