flameshot icon indicating copy to clipboard operation
flameshot copied to clipboard

Screen capture widget overlay is incorrectly scaled and smaller than it should be in v13.1.0

Open k4yt3x opened this issue 4 months ago • 35 comments

If you're here looking for a temporary solution jump to: https://github.com/flameshot-org/flameshot/issues/4171#issuecomment-3207409066

Flameshot Version

13.1.0-1

Installation Type

pacman

Operating System type and version

Arch Linux x86_64 6.16.1-arch1-1

Description

After updating from Flameshot v13.0.1 to v13.1.0, the screen capture widget overlay (that allows you to preview and edit the screenshot) incorrectly scaled and smaller than it should be. This makes it harder to edit the image and the resulting image has aliasing artifacts.

Resetting the config does not help, but downgrading to v13.0.1 fixes this issue. It's presumably caused by the recent Linux multi-monitor fixes. This issue is NOT observed on Windows.

Steps to reproduce

  1. Install Flameshot v13.1.0 on Linux (tested on i3wm with X11)
  2. Take a screenshot in GUI mode
  3. Observe that the screenshot preview/edit widget has the wrong scale
  4. After copying/saving the screenshot, it's in the wrong size and aliased

Screenshots or screen recordings

Here's a screenshot taken by v13.0.1, which functions correctly:

Image

Here's a screenshot by v13.1.0:

Image

You can observe that the screenshot edit/preview is at the wrong scale (smaller than it should be) so it's not overlaying the entire display and also causing aliasing artifacts over the text.

FYI I captured the screenshots above over Moonlight/Sunshine.

System Information

  • OS: Arch Linux x86_64
  • Kernel: Linux 6.16.1-arch1-1
  • WM: i3 4.24 (X11)
  • Display: 3440x1440 @ 160 Hz in 34" [External]

k4yt3x avatar Aug 17 '25 21:08 k4yt3x

I can confirm this. 13.0.1 is okay, but 13.1.0 has this behavior

OS: Arch Linux x86_64 Kernel: 6.16.0-arch2-1 WM: i3 4.24 (X11) Display (DELL U4025QW): 5120x2160 @ 120 Hz in 40" [External]

rostislaved avatar Aug 17 '25 21:08 rostislaved

Thanks for reporting. This means the fractional scaling adjustments removed in #4127 need to be added back. Unfortunately they seem to break other window managers

borgmanJeremy avatar Aug 17 '25 22:08 borgmanJeremy

Could you please test the builds from this pr and report back?

https://github.com/flameshot-org/flameshot/pull/4169

borgmanJeremy avatar Aug 18 '25 00:08 borgmanJeremy

Sorry AUR is a little dead right now

Image Image

Can't clone the PKGBUILD. I'll try again tomorrow.

k4yt3x avatar Aug 18 '25 03:08 k4yt3x

FWIW, I encounter a similar issue with my multi-monitor setup. It seems to be only taking a screenshot of the main monitor and moves it to the upper left corner of the virtual display.

Don't mind the proportions being off, but see monitor layout below.

            ┌───────────┐  
┌───────┐   │           │  
│       │   │           │  
│       ├───┴───────────┴──┐
│       │                  │
│       │      MAIN        │
│       │                  │
└───────┴──────────────────┘ 

UPDATE: Problem solved with v13.1.0. Realized I was still on v13.0.1 as the Manjaro repo had not yet updated to v13.1.0 which is the version of the Arch repo. Second time this happens, and I should really just bite the bullet and move to Arch. It's time lol

System Information

OS: Manjaro Kernel: 6.12.41-1-MANJARO WM: i3 4.24 (X11) Display: 3440x1440 @ 144 Hz in 34" 2560x1440 @ 60 Hz in 27" 1440x2560 @ 60 Hz in 27"

vargn avatar Aug 18 '25 06:08 vargn

FWIW, I encounter a similar issue with my multi-monitor setup. It seems to be only taking a screenshot of the main monitor and moves it to the upper left corner of the virtual display.

Don't mind the proportions being off, but see monitor layout below.

            ┌───────────┐  
┌───────┐   │           │  
│       │   │           │  
│       ├───┴───────────┴──┐
│       │                  │
│       │      MAIN        │
│       │                  │
└───────┴──────────────────┘ 

UPDATE: Problem solved with v13.1.0. Realized I was still on v13.0.1 as the Manjaro repo had not yet updated to v13.1.0 which is the version of the Arch repo. Second time this happens, and I should really just bite the bullet and move to Arch. It's time lol

System Information

OS: Manjaro Kernel: 6.12.41-1-MANJARO WM: i3 4.24 (X11) Display: 3440x1440 @ 144 Hz in 34" 2560x1440 @ 60 Hz in 27" 1440x2560 @ 60 Hz in 27"

@vargn I am encountering this exact issue with flatpak version 13.1.0. Here's the about:

Flameshot v13.1.0 (79395fd)
Compiled with Qt 6.9.0
linux: 6.12.10-76061203-generic
org.kde.Platform: 6.9

It may also be related to this issue: https://github.com/flameshot-org/flameshot/issues/4172

But your description is exactly what I'm experiencing on the latest version

TCROC avatar Aug 18 '25 12:08 TCROC

Downgrading from 13.1.0 to 13.0.1 fixed the issue for me on x11

inverse avatar Aug 19 '25 19:08 inverse

I started seeing something like this today after upgrading to v13.1 on Arch, when using i3 4.21-1 and X11.

On a single monitor, flameshot gui would should a preview that took up approximately 4/5ths of the screen horizontally, and 2/3rds of the screen vertically.

When using two monitors, it was clear that flameshot wasn't filling the screen on the top monitor.

I've attached images that demonstrate the issue.

Reverting back to v12.1 is a temporary workaround for the issue - I've yet to test v13.0.

(Apologies for the poor photo quality - it seemed easier to do this than try to grab a screenshot of flameshot across two monitors).

Image Image

Spoffy avatar Aug 19 '25 20:08 Spoffy

I have the same problem as Spoffy. I'm on a single-monitor setup.

What happened? I had to downgrade flameshot.

GenesisOfTime avatar Aug 20 '25 11:08 GenesisOfTime

hi, I had the same issue on my laptop (AMD iGPU, running X11 + Openbox). Flameshot GUI was broken with white borders / screen shrinking, and it looked exactly like yours

What fixed it for me was disabling Qt’s automatic HiDPI scaling:

QT_ENABLE_HIGHDPI_SCALING=0 flameshot gui

After adding this environment variable, Flameshot works normally again. hope it helps

Image Image

webcheating avatar Aug 20 '25 17:08 webcheating

That didn't fix it for me. But I did run from the command line and get some additional logs:

tcroc@pop-os:~/dev/BlockyBallOT$ flatpak run org.flameshot.Flameshot gui
Unable to get current screen, starting to use primary screen. It may be a cause of logical error and working with a wrong screen.
QLayout: Attempting to add QLayout "" to SidePanelWidget "", which already has a layout
Unable to get current screen, starting to use primary screen. It may be a cause of logical error and working with a wrong screen.
Unable to get current screen, starting to use primary screen. It may be a cause of logical error and working with a wrong screen.
Unable to get current screen, starting to use primary screen. It may be a cause of logical error and working with a wrong screen.
flameshot: info: Screenshot aborted.
QThreadStorage: entry 2 destroyed before end of thread 0x63460ab816a0
QThreadStorage: entry 1 destroyed before end of thread 0x63460ab816a0

NOTE:

I'm using wayland on pop os

TCROC avatar Aug 20 '25 17:08 TCROC

@borgmanJeremy Sorry I'm a bit hammered at work. Doesn't look like I'll have time to help test the patches here. Would be great if someone else here could help out.

k4yt3x avatar Aug 20 '25 17:08 k4yt3x

Could you please test the builds from this pr and report back?

#4169

Tested the build on arch linux. kernel: 6.16.1-arch1-1 wm: openbox (X11)

The screen capture widget overlay no longer shrinks and the white bars are gone. However, the screenshot quality appears significantly lower than before.

Here is an example of screenshot from #4169:

Image

And here is a screenshot from the old working version of Flameshot, or with the environment variable QT_ENABLE_HIGHDPI_SCALING=0 (at least it works for me):

Image

Sorry in advance, I might have done something wrong, but for me it doesn’t seem to work correctly

webcheating avatar Aug 20 '25 19:08 webcheating

https://github.com/flameshot-org/flameshot/issues/4171#issuecomment-3207454419

^ I see my comment got marked as off topic. Is my issue separate? Should I open up a different issue? This description sounded extremely similar to what I was experiencing

TCROC avatar Aug 20 '25 19:08 TCROC

@TCROC apologies i likely meant to hide it as a duplicate. I'm trying keep the "me too" posts hidden so in my limited time to work on this I can quickly scan the issue to remember what's going on. That's really hard to do when there's 90+ duplicate comments on some issues and I'm probably leaning to far in the "just hide" direction

borgmanJeremy avatar Aug 20 '25 19:08 borgmanJeremy

@TCROC apologies i likely meant to hide it as a duplicate. I'm trying keep the "me too" posts hidden so in my limited time to work on this I can quickly scan the issue to remember what's going on. That's really hard to do when there's 90+ duplicate comments on some issues and I'm probably leaning to far in the "just hide" direction

Absolutely know worries. Feel free to hide this exchange as well to declutter the noise. Was just posting those flatpak logs in the hope they help, but if its already posted, absolutely feel free to hide :). Just wanted to make sure I was posting in the correct place.

ALSO

Absolutely LOVE flameshot! I know as a maintainer, you normally hear about issues and don't get enough love. This tool is a core component of my daily workflow! :)

TCROC avatar Aug 20 '25 19:08 TCROC

@mmahmoudian This is the issue I meant to post under. Anyways, I found that the AppImage distributed on the releases page works just fine while the flatpak version does not. AppImage about:

App Image

Flameshot v13.1.0 (79395fd)
Compiled with Qt 6.2.4
linux: 6.12.10-76061203-generic
pop: 22.04

Flatpak

Flameshot v13.1.0 (79395fd)
Compiled with Qt 6.9.0
linux: 6.12.10-76061203-generic
org.kde.Platform: 6.9

So the differences appear to be:

  1. QT Version
  2. Runtime? (pop vs org.kde.platform). Idk what category that really is.

Note: I'm running on XWayland (Wayland with X11 support)

TCROC avatar Aug 25 '25 13:08 TCROC

I tried a workaround with QT_ENABLE_HIGHDPI_SCALING=0 flameshot gui, but it didn't resolve the issue.

The screens shift to the left by half a monitor in my case:

Image Image
❯ flameshot -v
Flameshot v13.0.1 ()
Compiled with Qt 6.9.1

❯ qtdiag 
Qt 5.15.17 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 15.1.1 20250425) on "xcb" 
OS: Manjaro Linux [linux version 6.16.0-5-MANJARO]

2-monitor setup, no scaling applied (100%):

Image

immanuelfodor avatar Aug 26 '25 14:08 immanuelfodor

In my case (Xorg 21.1.18, flameshot v13.1.0) the culprit was having QT_SCALE_FACTOR > 1. Setting it to 1 worked around the issue.

axolx avatar Aug 27 '25 15:08 axolx

My issue above (https://github.com/flameshot-org/flameshot/issues/4171#issuecomment-3224373685) has been fixed by flameshot-13.1.0-1 on Manjaro 🎉

immanuelfodor avatar Aug 29 '25 15:08 immanuelfodor

Fix Flameshot on Arch Linux with i3 (September 1st, 2025)

Create a script that disables high DPI scaling:

Run this:

sudo bash -c 'cat > /usr/local/bin/flameshot-fixed << "EOF"
#!/bin/bash
QT_ENABLE_HIGHDPI_SCALING=0 flameshot gui
EOF
chmod +x /usr/local/bin/flameshot-fixed'

Run flameshot like this

flameshot-fixed

prezdev88 avatar Sep 01 '25 15:09 prezdev88

I can reproduce with a single monitor, under X, no desktop environment, bare Qtile + Picom on Arch

$ flameshot -v
Flameshot v13.1.0 ()
Compiled with Qt 6.9.1

And QT_ENABLE_HIGHDPI_SCALING=0 flameshot gui isn't convenient but makes it run fine

angrybacon avatar Sep 03 '25 23:09 angrybacon

I can reproduce with a single monitor, under X, no desktop environment, bare Qtile + Picom on Arch

$ flameshot -v Flameshot v13.1.0 () Compiled with Qt 6.9.1

And QT_ENABLE_HIGHDPI_SCALING=0 flameshot gui isn't convenient but makes it run fine

Just got around to testing. Unfortunately, this does not fix it for the flatpak build :/

TCROC avatar Sep 08 '25 18:09 TCROC

I did get some new logs when reinstalling it tho:

tcroc@pop-os:~/dev/BlockyBallOT$ flatpak run org.flameshot.Flameshot
Unable to get current screen, starting to use primary screen. It may be a cause of logical error and working with a wrong screen.
QLayout: Attempting to add QLayout "" to SidePanelWidget "", which already has a layout
Unable to get current screen, starting to use primary screen. It may be a cause of logical error and working with a wrong screen.
Unable to get current screen, starting to use primary screen. It may be a cause of logical error and working with a wrong screen.
Unable to get current screen, starting to use primary screen. It may be a cause of logical error and working with a wrong screen.
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setCompositionMode: Painter not active
QPainter::translate: Painter not active
QPainter::setPen: Painter not active
QPainter::setBrush: Painter not active
QPainter::drawEllipse: Painter not active
QPainter::setBrush: Painter not active
QPainter::drawEllipse: Painter not active

TCROC avatar Sep 08 '25 19:09 TCROC

I'm using Win 11 and needed to go back to v12.1.0 to make It work well again.

almirb avatar Sep 09 '25 18:09 almirb

On Windows 11 I can confirm it too. Go back to 12.1.0

sinusx1986 avatar Sep 14 '25 14:09 sinusx1986

#4172 and #4171 and #4169 seem to be all duplicates, no?

erik55 avatar Oct 10 '25 13:10 erik55

Can folks who were experiencing this issue test the last commit in HEAD and let us know if it has solved the issue for them, since #4169 was merged which was attempting to fix this

@erik55 thanks for pointing this out.

mmahmoudian avatar Oct 10 '25 17:10 mmahmoudian

On Windows 10 I can confirm it too.

kaviev avatar Oct 12 '25 22:10 kaviev

Only reverting to version 12 in openSuse TW solved the problem:

sudo zypper in --oldpackage flameshot=12.1.0-3.5

vokamut avatar Oct 17 '25 16:10 vokamut