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

New Fix for Wayland HiDPi Scaling Issue #3779

Open
N0madical opened this issue Nov 10, 2024 · 7 comments
Open

New Fix for Wayland HiDPi Scaling Issue #3779

N0madical opened this issue Nov 10, 2024 · 7 comments
Labels
Unconfirmed Bug The bug is not confirmed by anyone else. Wayland Wayland specific issues

Comments

@N0madical
Copy link

N0madical commented Nov 10, 2024

Flameshot Version

flameshot 12.1.0_1

Installation Type

User repository (AUR)

Operating System type and version

Manjaro Linux / Arch

Description

I've seen many posts about issues with HiDPi scaling of flameshot, with displays being shifted, weirdly scaled, or just glitched in general.

For me the normal 'reccomended' fix, QT_AUTO_SCREEN_SCALE_FACTOR=1.5 DID NOT work :(

I spent a while messing around with Flameshot, and I think I found a good solution that should work for most users running Wayland:

🌟 SOLUTION: 🌟

XDG_SESSION_TYPE=x11 flamesot gui

This works by setting the display compositor for specefically flameshot to be x11, and x11 scaling seems to work. Tested on both Manjaro/Arch and Void linux.

Steps to reproduce

Be on KDE Plasma Wayland with a HiDPi scaled screen, and run flameshot gui. Then run XDG_SESSION_TYPE=x11 flamesot gui to fix.

Screenshots or screen recordings

No response

System Information

Manjaro Linux w/ KDE Plasma & Wayland compositor, Flameshot installed from the Arch User Repository (AUR)

Void Linux w/ KDE Plasma & Wayland + Weston compositor, Flameshot installed from the xbps package library

@N0madical N0madical added the Unconfirmed Bug The bug is not confirmed by anyone else. label Nov 10, 2024
@FelixJochems FelixJochems added the Wayland Wayland specific issues label Nov 10, 2024
@SoarinFerret
Copy link

Similar issue on Nixos / Sway, above fix worked for me.

@WickyPlays
Copy link

WickyPlays commented Nov 17, 2024

This is how I fixed it, based on your answer (KDE Wayland):

In the shortcut, use Command instead of directly linking application. Use XDG_SESSION_TYPE=x11 flameshot gui
image

From the Start menu, search for "Flameshot", right click on "Edit application". After the new window pop up, go to Application tab and you will see this picture. Change environment variable to this then you're done.
This helps running this app on x11 mode on startup as well. Pretty convenient though.
image

@Openuser87
Copy link

Works here (Fedora 41, KDE Wayland). Thank you very much!

@DaviMedrade
Copy link

I tried XDG_SESSION_TYPE=x11 on Wayland, but then the Text tool doesn't work. I can draw on the captured image, but I can't type text on it. When I start Flameshot from the terminal, anything I tried to type using the text tool shows up in the terminal.

@Openuser87
Copy link

but then the Text tool doesn't work. I can draw on the captured image, but I can't type text on it.

Just tested - would confirm and expand on this. Not only the typing in text tool does not work for me, but also the shortcuts (like S for rectangle) don't have effect. But: with two keyboard layouts, when I switch it - I can type in text tool, and same key shortcuts work (even with non-latin layout by the way).

When I start Flameshot from the terminal, anything I tried to type using the text tool shows up in the terminal.

Same. Also the inputs in switched layout (text input in text tool, but also shortcut keys which then work) are reflected in the console.

@workflow
Copy link

Similar issue on Nixos / Sway, above fix worked for me.

This doesn't work for me on NixOS / Sway (flameshot compiled with WLRoots support), but weirdly, if I set QT_SCALE_FACTOR to the reciprocal of the actual scaling factor, it works.

I.e.: Scale Factor 2.0 needs:

QT_SCALE_FACTOR=0.5 flameshot gui

🤪

workflow added a commit to workflow/dotfiles that referenced this issue Mar 14, 2025
@parametalol
Copy link

Having 200% fractional scaling in Gnome:

  • QT_SCALE_FACTOR=1 is scaled, but blurry;
  • QT_SCALE_FACTOR=0.5 breaks the UI;
  • QT_SCALE_FACTOR=2 makes the UI twice bigger than it should be (400% effective scale).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Unconfirmed Bug The bug is not confirmed by anyone else. Wayland Wayland specific issues
Projects
None yet
Development

No branches or pull requests

8 participants