flameshot-org / flameshot

Powerful yet simple to use screenshot software :desktop_computer: :camera_flash:
https://flameshot.org
GNU General Public License v3.0
25.14k stars 1.61k forks source link

Can't take screenshot on Ubuntu when on multiple screens with different resolutions with fractional scaling #2156

Open WRonX opened 2 years ago

WRonX commented 2 years ago

Flameshot Version

v0.10.1

Installation Type

Snap from Snapcraft

Operating System type and version

5.11.0-41-generic #45~20.04.1-Ubuntu SMP Wed Nov 10 10:20:10 UTC 2021 x86_64 x86_64 x86_64 GNU

Description

Previously working on 3 displays in horizontal config, each 1920x1080, Flameshot was doing fine. Problem started after changing one of displays to 4K (3840x2160) and set fractional scaling to 150% on the new one.
Trying to take screenshot results with a loop of turning off and on all 3 displays, changing scaling (or resolution, can't be sure, it's going too fast) back and forth on all displays every turn.

Steps to reproduce

  1. Set up 3 monitors, 1920x1080 on the left, 3840x2160 in the center (set as main display), 1920x1080 on the right.
  2. Set fractional scaling to 150% on center screen.
  3. Ty to take screenshot

Screenshots or screen recordings

Technically impossible to take screenshot or recording. If absolutely necessary, I will record the process with my phone.

System Information

System: 5.11.0-41-generic #45~20.04.1-Ubuntu SMP Wed Nov 10 10:20:10 UTC 2021 x86_64 x86_64 x86_64 GNU Monitor config: given above. Hardware: Philips 273PLPH (DFP-0), Samsung U32J59x (DFP-1), Philips 273PLPH (DFP-3) Graphic drivers: nvidia-driver-470

mmahmoudian commented 2 years ago

I don't understand what issue is. Is it so that when you want to take screenshot the monitors flashes? Or there is something else?

WRonX commented 2 years ago

Yes, that's exactly what happens. All monitors turn off and on with ~1s interval, each turn on all monitors everything is scaled up and down, can't see anything. Pressing Esc stops it, but sometimes Chrome stays in wrong scale and stops responding.

pavangayakwad commented 2 years ago

Same exact problem here on my pop_os too! Have 4K monitor as primary and laptop monitor is disabled.

haosdent commented 2 years ago

Same to me, anything I could help to speed up the address for this issue? @mmahmoudian

haosdent commented 2 years ago

Didn't see any abnormal log from flameshot's stdout/stderr

QSettings::value: Empty key passed
QSettings::value: Empty key passed
QSettings::setValue: Empty key passed
QSettings::value: Empty key passed
QSettings::setValue: Empty key passed
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::setBrush: Painter not active
mmahmoudian commented 2 years ago

@haosdent @WRonX would you please test with the new pre-release (version 11) and see if it behaves correctly?

Considering the abstraction layers of Snap, Flatpak and AppImage (they are shipped with most necessary libraries), I suggest compiling it first:

https://flameshot.org/docs/installation/source-code/

And then if it doesn't work, try the AppImage and see if that works. With way we can narrow it down on what might cause the issue.

ca-scribner commented 2 years ago

Maybe I got my settings wrong as this is a new computer/install, but I have the same scaling problem when running flameshot gui. I tried building from source as described, and after that flameshot gui takes a fullscreen snapshot anyway (although does not have the scaling issue). If I hit options->area grab I can grab an area and don't have the obvious scaling problem, but also don't get the behaviour I expect (I don't see the interface to markup the image)

mmahmoudian commented 2 years ago

@ca-scribner

If I hit options->area grab I can grab an area and don't have the obvious scaling problem, but also don't get the behaviour I expect

I don't understand what you mean by "option" and "area grab". We don't have such buttons or command line arguments.

If you want to take a screenshot and annotate it, you should use flameshot gui if you want to take a screenshot from all monitors, use flameshot full. For more information about the command line checkout this page:

https://flameshot.org/docs/advanced/commandline-options/

If none of the above helped, please provide your OS information and also provide the Flameshot information (flameshot --version)

pavangayakwad commented 2 years ago

@mmahmoudian It would be nice if I get deb package to install, test and confirm. 👍️ compiling from source has its own bit of challenges always..

image

mfzha commented 2 years ago

Not to detract from the main issue, but @pavangayakwad it doesn't look like you need qt5-default: https://askubuntu.com/questions/1335184/qt5-default-not-in-ubuntu-21-04

mmahmoudian commented 2 years ago

@pavangayakwad Sorry for the late reply. You can always get the pre-compiled binaries from every commit (ping me on Matrix or elsewhere to guide you if you can't figure out the process), or alternatively you can download a compiled version from the https://flameshot.org/docs/installation/development-build/ which is based on the latest commit in the master branch.

mmahmoudian commented 2 years ago

@pavangayakwad

@mmahmoudian It would be nice if I get deb package to install, test and confirm. +1 compiling from source has its own bit of challenges always..

image

I'm not a debian user, but in #2649 we have fixed the instructions to address this issue.

mmahmoudian commented 2 years ago

@haosdent @WRonX @pavangayakwad there have been some improvements. We are getting prepared to release v12 very soon. I would be thankful if you can test if the issue is resolved in the latest versions. As always you can compile from source or alternatively, you can download nightly-build binaries directly and test. Instruction for each of them is available in these links:

pavangayakwad commented 2 years ago

@mmahmoudian Thanks for the update, I used the new build with my KDE Neon with plasma 5.25, on my 4K monitor. It worked perfect!! Thank you for all your efforts!!

Kin-Zhang commented 1 year ago

Unfortunately, it still has the same problem in v12 on Ubuntu 20.04, but when I only use one screen, it works.

julienmary commented 1 year ago

I have the same problem. Everything is OK with a single external monitor. That external monitor can be 1920x1080 or 4K. But as soon as I plug both, then the exact same mess happens. I'm on Ubuntu 22.04. The behavior is the same as described in that bug report with the packaged version, (v11.0.0) or the version I have compiled (v12.1.0). So I guess the developers might be able to reproduce it.

Foritus commented 2 months ago

I have this exact same problem on Debian 12 and I don't even use flameshot, so I suspect it's a bug with X or something. Sad trombone :(