Closed snyssen closed 2 years ago
How did you install Flameshot?
Based on the answer to the form I believe both dnf
and flatpak
version? @snyssen please confirm/correct me.
Hi,
yes I tried them both and the result was the same. I used sudo dnf install flameshot
and flatpak install flathub org.flameshot.Flameshot
to install them.
Regarding this piece of information contained in the original comment:
...as far as I can see was fixed under Sway, but is still encountered
under KDE Plasma on Wayland
...I can confirm that it was fixed on sway, but the bug returned (same error message you get in KDE: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
) a few weeks (maybe ~1 month) ago.
This is what I'm using:
sway version 1.7
Flameshot v11.0.0 (compiled with Qt 5.15.2)
I have the same problem with DWL version 0.2.2 running flameshot 11:
flameshot: error: Unable to capture screen
flameshot: error: Unable to capture 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.
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
flameshot: info: Screenshot aborted.
Operating System: Manjaro Linux
KDE Plasma Version: 5.24.2
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.2
Graphics Platform: Wayland
pacman version:
Flameshot v11.0.0 (-)
Compiled with Qt 5.15.2
flatpak version
Flameshot v11.0.0 ()
Compiled with Qt 5.15.3
for me the problem only exists with the flatpak version.
It looks like many other applications (OBS, LibreOffice, QtDockir, ...) are reporting a similar issue.
It also looks like Qt developers don't consider this to be a bug (see last paragraph of this comment):
>> qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
This means your window tried to grab focus in the compositor,
which is not allowed in wayland. Don't create a bug for it, there's
nothing we can do.
This is really annoying since because of this bug Flameshot is literally unusable at the moment on Plasma Wayland :( Of course I am not blaming anyone, but I hope a solution is possible, otherwise I will simply have to find an alternative to Flameshot (for the moment I am using Spectacle, but it is nowhere near Flameshot in term of ease of use and functionalities)
I don't use wayland on KDE so its support for it is way behind. Need some more dev's to commit to helping fix wayland specific bugs.
Update from my side: turns out, in my case (using sway) the problem was that I was not setting XDG_CURRENT_DESKTOP=sway
from gdm (I was setting it before... but something must have broken in a recent update).
Anyway... I figured out the specific problem by running flameshot under gdb, setting a breakpoint in ScreenGrabber::grabEntireDesktop()
and continuing step by step from that point until the error message was triggered (which was a consecuence of DesktopInfo::windowManager()
not being able to read XDG_CURRENT_DESKTOP
as it was not set).
Maybe others with KDE (instead os sway) can try a similar approach to figure out where exactly the error is coming from.
I echoed $XDG_CURRENT_DESKTOP
and it returned KDE
, so I don't think it's problem for me. I could indeed try to debug the application myself, but since I have literally no experience in C++ I will have to learn its tools first... Will update if I ever get to it, but more realistically I will stick to the alternative for now.
It's been raining all day here... so I decided to install KDE and try to debug this issue :)
The result is pull request #2495, which (at least in my computer) seems to fix the problem. It might break backwards compatibility... so let's discuss that on the PR thread.
In the meantime, @snyssen, can you please apply that patch + rebuild + confirm it works also for you? Thanks!
I built your commit locally and it worked flawlessly, thank you ! Now let's just hope your PR will be merged soon :)
I'll take a look at the pr this week. Thanks!
Interesting. I'm on Fedora 35 as well, with KDE Wayland. I compiled using with the fixes in that pull request and I've still got this issue.
❱❱❱ flameshot gui
qt.svg: Invalid path data; path truncated.
qt.svg: Invalid path data; path truncated.
qt.svg: Invalid path data; path truncated.
qt.svg: Invalid path data; path truncated.
qt.svg: Invalid path data; path truncated.
qt.svg: Invalid path data; path truncated.
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.svg: Invalid path data; path truncated.
qt.svg: Invalid path data; path truncated.
qt.svg: Invalid path data; path truncated.
qt.svg: Invalid path data; path truncated.
[14:25:13] [cost 3.007s] flameshot gui
No clue what it's talking about in terms of qt.svg. Flameshot works fine in Xorg though.
I've removed all other versions of Flameshot, and this version was installed using make install
.
Glad to see I'm not alone though, and that there's attempts at fixing it that have worked for others. I can provide other logs if needed.
Hi,
Sorry to dig out this issue, but do we have an expected date for a new release? I am still unable to use Flameshot since this fix hasn't been deployed yet.
Have a nice day, Simon Nyssen.
@snyssen We don't have a set date for the next release. There are few things that we would like to merge and handle before that and all devs are busy with their daily lives. I suggest for the time being you either build from source (and perhaps create a symlink), or you install using our nightly builds.
Building from source is very straightforward: https://flameshot.org/docs/installation/source-code/
Thank you, I will take a look at this :smile:
Has this been solved? I still have this issue on KDE Wayland (NixOS, built from nixpkgs-unstable)
@SohamG
Has this been solved?
Yes, via #2495
I still have this issue on KDE Wayland
i have this error too :
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
Maybe can help : with kde wayland ( Plasma 5.24.6 ) i must install this dependencies for flameshot v12.1.0 worked. ( i am on arch but maybe it's the same in others linux )
@leiha Thanks for the comment. We always try to keep the AUR updated and therefore the dependencies for Arch-based distros can be adopted from there. Check out the line 62-64: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=flameshot-git
Still happening: Flameshot v12.1.0 (-) Compiled with Qt 5.15.10 6.9.7-arch1-1 Arch Linux with KDE Plasma 6 on Wayland
Does not save screenshot to clipboard on ctrl+c:
qt.qpa.wayland: Wayland does not support QWindow::requestActivate() # happens right after command
qt.qpa.wayland: Wayland does not support QWindow::requestActivate() # happens on Ctrl+c
Flameshot Version
Flameshot v11.0.0 (-) Compiled with Qt 5.15.2 linux: 5.16.8-200.fc35.x86_64 fedora: 35
Installation Type
Linux, MacOS, or Windows Package manager (apt, pacman, eopkg, choco, brew, ...), Flatpak from Flathub
Operating System type and version
Fedora 35 with KDE Plasma 5.23.5 on Wayland
Description
The application starts without an itch, but it fails to take any screenshot afterward. Problem is similar to issue #619, and as far as I can see was fixed under Sway, but is still encountered under KDE Plasma on Wayland.
Steps to reproduce
flameshot
I also tried running
flameshot full
, it seems to take the screenshot but fails when saving the file with the following message:(the mentioned file is the first that appear inside the folder when ordered alphabetically, and it has nothing to do with the actual screenshot) I doubt the bugs are correlated, but I wanted to include it in case it could be.
Screenshots or screen recordings
No response
System Information
Output from Neofetch:
OS: Fedora Linux 35 (KDE Plasma) x86_64 Host: XPS 15 7590 Kernel: 5.16.8-200.fc35.x86_64 Uptime: 1 hour, 6 mins Packages: 2187 (rpm), 28 (flatpak) Shell: zsh 5.8.1 Resolution: 3840x2160 DE: Plasma 5.23.5 WM: kwin Theme: Layan [Plasma], Adwaita [GTK2], Breeze [GTK3] Icons: [Plasma], Tela [GTK2/3] Terminal: konsole CPU: Intel i7-9750H (12) @ 4.500GHz GPU: NVIDIA GeForce GTX 1650 Mobile / Max-Q GPU: Intel CoffeeLake-H GT2 [UHD Graphics 630] Memory: 17899MiB / 31721MiB