flameshot icon indicating copy to clipboard operation
flameshot copied to clipboard

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

Open WRonX opened this issue 4 years ago • 17 comments

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

WRonX avatar Dec 10 '21 09:12 WRonX

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?

mmahmoudian avatar Dec 10 '21 09:12 mmahmoudian

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.

WRonX avatar Dec 10 '21 09:12 WRonX

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

pavangayakwad avatar Dec 13 '21 22:12 pavangayakwad

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

haosdent avatar Jan 09 '22 06:01 haosdent

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

haosdent avatar Jan 09 '22 06:01 haosdent

@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.

mmahmoudian avatar Jan 09 '22 08:01 mmahmoudian

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)

ca-scribner avatar Jan 17 '22 16:01 ca-scribner

@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)

mmahmoudian avatar Jan 18 '22 05:01 mmahmoudian

@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

pavangayakwad avatar Jan 19 '22 15:01 pavangayakwad

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

mfzha avatar Jan 23 '22 02:01 mfzha

@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 avatar Mar 17 '22 09:03 mmahmoudian

@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 avatar Jun 15 '22 12:06 mmahmoudian

@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:

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

  • https://flameshot.org/docs/installation/development-build/

mmahmoudian avatar Jun 15 '22 12:06 mmahmoudian

@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!!

pavangayakwad avatar Jun 15 '22 18:06 pavangayakwad

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

Kin-Zhang avatar Jul 03 '23 21:07 Kin-Zhang

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.

julienmary avatar Aug 29 '23 09:08 julienmary