flameshot-org / flameshot

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

Attempting to capture main screen appears completely black every time #3122

Closed Funtimes909 closed 1 year ago

Funtimes909 commented 1 year ago

Flameshot Version

Flameshot v12.1.0 (Debian 12.1.0-2)

Installation Type

Flatpak from Flathub

Operating System type and version

Debian 12

Description

When trying to capture a screenshot on my main screen (1440P 144 refresh rate) the entire screenshot will appear black, capturing them on my second screen (1440P 75 refresh rate) works perfectly fine

Steps to reproduce

May not be reproducible

Screenshots or screen recordings

image Screenshot from the second screen

image attempted screenshot from main screen

System Information

OS: Debian 12 CPU: i7-12700k GPU: Intel UHD 770 RAM: 32GB (2X16) dual channel corsair vengeance 3600MHz kit Display Server: Xorg (Also occurs on wayland) Mesa Driver Version: 23.0.0-1 X Server Version: 1:7.7+23 Desktop Environment: KDE Plasma 5.27

Main monitor (one with black screen issue) https://www.harveynorman.co.nz/computers/monitors/konic-32-qhd-2k-curved-gaming-monitor.html Don't know where I got second monitor from

mmahmoudian commented 1 year ago

How are you trying to take screenshot? For example are you using flameshot screen -n 1 or are you using flameshot gui?

Funtimes909 commented 1 year ago

I use a custom script I found in /bin to save the screenshots to sub directories based on the current date here is that script

!/bin/bash

year=$(date +"%Y") month=$(date +"%m") day=$(date +"%d")

filepath=(~/Pictures/Screenshots/funtimes909-$year-$month/$day)

mkdir -p $filepath

if [ "$1" == "full" ] then flameshot full -c -p $filepath elif [ "$1" == "gui" ] then flameshot gui -c -p $filepath elif [ "$1" == "screen" ] then flameshot screen -c -p $filepath fi

I use KDES global custom shortcuts setup to run this script to take screenshots

mmahmoudian commented 1 year ago

@Funtimes909 I personally don't like this script as there are many things that can be improved, but that is besides the point and it in principal works. But you still didn't specify which one of them you are running (i.e "gui", "full", or "screen")

Funtimes909 commented 1 year ago

It only happens when I am running screen

Funtimes909 commented 1 year ago

Any update? I still have this issue Forgot to mention, since then I've switched to arch linux and I still have the same issue, pc specs are all the same except for a new GPU (AMD 6600)

mmahmoudian commented 1 year ago

Sorry, I've missed your reply.

To me it seems the issue stems from the flatpak permissions. I suggest you try installing flatseal (can be installed also from Flathub), and see if you have permissions issues for Flameshot Flatpak.

As an alternative approach, you can test if AppImage (can be downloaded from our release page) and see if the issue persists.

I also worth pointing out that you are running flameshot and not via flatpak run org.flameshot.Flameshot. Therefore if you yourself have not set to somehow bind flameshot to run the flatpak, there is a chance that you are using Debian's Flameshot and not the Flatpak.

Also for quick testing you can do this instead of writing to file every time and check it:

flameshot screen --raw | imv -
#or
flameshot screen --raw | display
Funtimes909 commented 1 year ago

Hi, sorry for really late reply, been a bit busy at the moment moving house 😅

Sadly none of that worked, I've used the AppImage, and I've used the flatpak version (with flatseal modified permissions) and nothings changed and yes I did try running flameshot flatpak using the proper command mentioned in your reply, still no luck :(

Funtimes909 commented 1 year ago

I am going to try building from source, I'll let you know if that works

mmahmoudian commented 1 year ago

The following is quick and dirty instructions on how to build from source

  1. Clone the repo
git clone --depth 1 https://github.com/flameshot-org/flameshot.git

cd flameshot
  1. Compile:
#!/bin/env bash

# remove possible existing build folder
rm -rf build

clang-format -i $(git ls-files "*.cpp" "*.h")

mkdir build
cd build
cmake ../  #<--------------------------------------- here add other build flags if needed
make -j$(nproc --ignore 1)
  1. Then you can run Flameshot:
# kill existing processes
pkill --full flameshot
sleep 1
# run the one you just compiled
./src/flameshot
Funtimes909 commented 1 year ago

Built from source, still has the exact same issue

Funtimes909 commented 1 year ago

still waiting for an update

skarndev commented 1 year ago

Having the same issue on recent Linux Mint (Cinnamon). This issue also happens with a similar tool called Shutter (screen going black on attempt to take a screenshot). So, I suspect it could be an X11 related issue or so. Just for the record, I am using two hidpi screens with fractional scaling enabled, if that is relevant.

mmahmoudian commented 1 year ago

@Funtimes909 Do you have fractional scaling on your monitor? Also does it happen on both of your monitors or only one of them?

Funtimes909 commented 1 year ago

Remind me how I can check if fractional scaling is enabled?

mmahmoudian commented 1 year ago

Since you are using KDE:

image

Funtimes909 commented 1 year ago

thank you, no that is not enabled, its set at the default 100%

Funtimes909 commented 1 year ago

image

skarndev commented 1 year ago

Since you are using KDE:

image

KDE does not yet have this feature available yet. Their scaling is shared across multiple displays. In gnome/cinnamon you can set individual scale per screen, maybe that is what causes the issue.

Funtimes909 commented 1 year ago

still have this issue

Funtimes909 commented 1 year ago

Hello?

mmahmoudian commented 1 year ago

@Funtimes909 Please avoid adding non-constructive comments (such as all those that I hid in this thread). The longer a thread gets, the less likely someone would find the stamina to go through it. Also, please note that all folks who work in this project are volunteers. No one owes anyone premium support. We are doing our best to juggle our personal lives, work lives, and FLOSS projects. If you want extra hand on the deck, please consider putting bounty on the issues to attract freelance devs to help out. It is clearly explained here.

About your issue, I cannot reproduce this in X11 nor in Wayland in Manjaro, Arch, or Ubuntu. I have tried it on KDE Plasma, Gnome, Sway, Hyprland, ...

I went through the trouble of installing Debian 11 (12 is not stable release and I rather not even bother with something that is not stable by it's devs). It is ridiculously buggy as Grub fails to properly install if Gnome is not installed (installing only KDE makes the boot to consume one core CPU indefinitely). This took me over 2 hours. On a bit of a rant, Debian has the slowest install process I have ever experienced. I'm shocked how 1990's it feels like.

Anyways, this is the result:

Peek 2023-05-14 14-28.webm

Therefore this could not be reproduced in any of the clean-installed VMs I have:

All these bring me to the conclusion that the issue is most probably due to your setup (graphics driver, software misconfiguration, and etc).

mmahmoudian commented 1 year ago

Please re-open this if you managed to get the same effect in a clean-install VM (preferably Qemu's qcow2 format)

skarndev commented 1 year ago

Were you trying to reproduce this with a multi-screen setup? For me the issue only appears if I am using multiple monitors. I am seeing this consistently across different distros, latest Nvidia official driver, hardware is not malfunctioning as I am seeing this bug on multiple systems (with AMD based GPU btw).

mmahmoudian commented 1 year ago

@skarndev I have tried it on multi-screen (3 monitors) setup on two laptops and two desktops, three Manjaro (KDE Plasma wayland and x11, AwesmeWM, and Hyprland). and one Windows 10. All these computers are either intel, AMD, or Nvidia (mesa driver).

How many monitors do you have, which Flameahot version, what was your installation method?

kazmath commented 8 months ago

I am having the same problem on a Pop_OS! installation using KDE plasma 5.24.7 and flameshot v12.1.0 (latest from ubuntu jammy) with two monitors with the same resolution, but I think I pin-pointed the issue on my part. For reference, this is my current monitor setup (yes, the right one is in the very corner): image

A flameshot full screenshot turns out like this: image

But when I do flameshot screen on either of those monitors, the image is just black. Thing is, I think I found the cause.

When I rearrange the position of my monitors like so: image A flameshot screen screenshot ends up like this (both monitors): image

image

So I think flameshot is somehow not properly adjusting the region when taking screenshots of monitors positioned in weird locations. Though I cannot test this theory, because passing --region 1920x1080+0+1080 as documented in flameshot screen --help does not work for some reason, giving me this line twice: QSettings::value: Empty key passed

More info:

Covkie commented 8 months ago

I can confirm the above mentioned behaviour. My setup consists of a 21:9 monitor stacked on top of a 16:9 monitor. The primary monitor is the 21:9 monitor.

flameshot screen on the primary display returns a screenshot of the entire monitor as expected while on the 16:9 display it is completely black. Layout: 2024-02-10_21-15 If i move the 21:9 display to the right of the 16:9 display flameshot screen on the 16:9 display comes out as normal while the 21:9 display has a majority of the screen cutoff: (layout in the screenshot) 2024-02-10_22-10

I am running Arch Linux with KDE Plasma 5.27.10 and flameshot v12.1.0. I suggest this issue be reopened as it has been replicated by multiple people. @mmahmoudian

Edit: just tried flameshot-git from the aur and the problem does not seem to exist...

aminst commented 5 months ago

Hi, Is there any update on this issue? I also see black parts in my screenshot on Mac.

ChristianF88 commented 1 month ago

Hi, same here, I am using Debian 12 with 2 external monitors (via a thunderbolt docking station). But even if I unplug from the docking station the issue stays the same.

Installations tried:

When running flameshot gui as root I get: Screenshot from 2024-09-12 13-24-29

maviv commented 3 weeks ago

resolved similar issues with a restart of my compositor (alt+shift+F12)