-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"qt.qpa.wayland: Wayland does not support QWindow::requestActivate()" on Sway. #3012
Comments
this might be because I don't have DBus working on sway but I'm not sure if that has any relevance |
I'm a little tired of this weird dbus method of capturing screenshots, and I might implement a generic wayland adapter based on grim if possible |
That would be great. Grim is already required for this stuff so... |
I can't imagine how long this bad screenshot method has lasted at flameshot. Almost every time flameshot is installed at wayland, it takes a lot of time to configure the desktop portal, and it's hard for me to imagine who actually uses this method to solve the wayland screenshot problem |
I'll try to get DBus working but until then I'm kinda stuck without a screenshot tool. |
On my gentoo+hyprland, there have been errors since installation, installing the desktop agent took me a lot of time to get it to work, software shouldn't be a hassle for users, more than one user in the community complained about flameshot having problems with wayland, At the end of the day, it uses a weird logic -- in xcb using qt screenshots, in wayland using dbus protocol screenshots. Oh no, that's a bad idea. |
I'm an avid user of flameshot, and because it's the best screenshot tool out there, I spend a lot of time getting it to work |
ShareX is tons nicer than Flameshot but It doesn't support linux, nor is it good on wine. |
If you can't use flameshot for now, try the fork that has the wayland grim adapter, here's a PR about that work |
What's the fork's name? Can I get a link to it? The AUR doesnt seem to have it.. |
You can get it through the PR I sent It should be noted that the opening method suggested in the PR description and the prerequisite for enabling the Grim universal wayland screen capture adapter: you must have at least Grim on your system |
AUR should not have it as it is what I just finished in |
I don't really know If I wanna compile manually for that... I'll wait for the merge I guess.. plus I'm not very familiar with cmake generally.. |
Ok, I'm just offering you a solution: If you really need to run flameshot right away, manually compiling my fork would be a start, and USE_WAYLAND_GRIM is off by default, it may take time to wait for the distro to add configuration parameters to it |
Actually... I commented that while I was outside and reading the page now, compiling wasn't that hard. Will let you know if your fork works for me, thanks for the great work |
Update: It has compiled but I can't type in
to take a screenshot, am I supposed to be in a certain directory to execute the command? |
Please provide a screenshot, it is fully tested in my environment, by the way, if grim cannot be executed, it will tell you, please make sure your computer has grim installed |
The USE_WAYLAND_GRIM flag must be turned on. My compilation and installation commands are as follows:
|
I don't know why but the issue fixed itself. I can't launch the flameshot daemon though so I'll be opening a new issue for that. |
I also find it weird, and not sure if it's from the mainline or my modification, I just added the wayland adapter, judging from the code patch, it shouldn't break other functions of flameshot |
the thing is I don't think I compiled your fork properly, and never got around to recompiling it with the extra flag you put in your comment. |
Now the image itself is back to rendering only part of the image. Great. This code is greatly inconsistent... About your fork, I'd greatly appreciate an AUR package or something of the sort, It would be great for lots of users. Heck, I'd even be down to help with the packaging, though I don't know much about it myself. |
Update again: I think this is a Wayland clipboard issue. It pastes just fine on discord web, doesn't work on regular discord, halfway renders on WALC (a whatsapp client). This is once again a very inconsistent way of taking screenshots, DBus is very unreliable and outdated for this. I can't offer an alternative but if there are any devs on this page, I'd love for jack's code get merged with mainline flameshot :^) |
I'm leaning toward merging with the official library, since it's just such a small feature, I don't even think I need to submit an RFC proposal Regarding the clipboard, you can use the -raw parameter in conjunction with wl-copy |
Thanks for going back and forth with this. But few comments:
Flameshot was written for X11 and we are adopting wayland gradually. Wayland itself is in a horrific situation and still is not stable. Many things are getting implemented by day and still has lots of caveats and issues. So we support X11 fully, and we are trying to support Wayland as we go forward. Also, DBus has lots of merit, it is not used to take screenshot, but rather to pass messages to different components. This is very common practice. @ardishco-the-great if DBus is missing, you perhaps have to report to the maintainer of Flameshot package of your repo to make it a dependency. @jack9603301 thanks for your PR (#3018). It is under review |
I have tested #3018, and it appears to work as designed (no need for ❯ flameshot gui
flameshot: warning: grim's screenshot component is implemented based on wlroots, it may not be used in GNOME or similar desktop environments
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()
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. Between the grim component warning and the rest, as with any previous commits down to the latest stable release, there is a few seconds (2-3) delay between any UI is shown. Wonder if it has any relation to these issues, somehow proportional to render area. On X11 the delay was too short to be a bother. |
@lbatalha Under what circumstances did he appear? Are you using the GRIM Universal Screenshot Adapter? |
@lbatalha my output:
|
@jack9603301 When I moved to Wayland in November Just noticed also, before the UI appears, one CPU core is maxed out. This also happens with
~/.cache/aurutils/sync/grim-git master*
❯ flameshot screen
zsh: segmentation fault (core dumped) flameshot screen
~/.cache/aurutils/sync/grim-git master*
❯ flameshot launcher
flameshot: warning: grim's screenshot component is implemented based on wlroots, it may not be used in GNOME or similar desktop environments
flameshot: warning: grim's screenshot component is implemented based on wlroots, it may not be used in GNOME or similar desktop environments
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
~/.cache/aurutils/sync/grim-git master* 1m 20s
❯ flameshot full
flameshot: warning: grim's screenshot component is implemented based on wlroots, it may not be used in GNOME or similar desktop environments
flameshot: info: Capture saved as /home/lbatalha/screenshots/2023-01-12_10-56.png I have Xwayland active, but flameshot appears to be running in wayland mode, wonder if there might be some stray X11 code running, because Wayland/Sway has no concept of a primary display at all. |
@lbatalha It looks like you have a screenshot adapter with USE_WAYLAND_GRIM enabled, which works with all wayland window managers based on wlroot (note that some Wayland window managers that depend on older versions of wlroot may not support the protocol required by grim for the time being) If you are running a wayland window compositor/manager that depends on wlroot, you can activate two options USE_WAYLAND_GRIM and USE_WAYLAND_CLIPBOARD Regarding the delay problem, I also have this problem here, I don't know why this problem occurs, it may be related to the processing of other parts of flameshot
Doesn't cause crashes in my environment Note, if you run sway, please make sure that the wlroot version supports the screenshot protocol, for the too old wlroot window compositor. The protocol required by grim may not be supported at the moment |
@jack9603301 yes, I am currently using your patch with the Grim adapter (compiled with The issues above are probably best discussed in #3039 , I posted here to make sure that Besides the issues in #3039 caused by the geometry display and the magnifier, and scaling issues with multiple monitors in #2364 (which I can fix by setting QT scale factor to 1), flameshot is functional with the grim adapter or with Note: starting the daemon has no effect on the startup delay as far as I can tell. |
For anyone missing the ability to copy to clipboard and freeze the screen when taking a screenshot, I created a Deno script that you can compile and use. https://gist.github.com/J053Fabi0/84245bf1932ce8e7a8690f21b534681c |
Testing with Sway inside a VM, the way to have a screenshot that works and is copied fully into the clipboard is using This probably uses |
Flameshot Version
flameshot 12.1.0-1 from the community repo
Installation Type
Linux, MacOS, or Windows Package manager (apt, pacman, eopkg, choco, brew, ...)
Operating System type and version
Arch Linux 6.0.11.arch1-1
Description
whenever I copy or save my image, I get nothing. If I try to copy it to discord I get an unfinished render of the image which in turn doesnt load and ends up as a failed upload.
example: https://cdn.discordapp.com/attachments/922926392511979551/1051159400397676624/image.png
Steps to reproduce
Screenshots or screen recordings
https://cdn.discordapp.com/attachments/922926392511979551/1051159400397676624/image.png
System Information
OS specifications: Arch Linux 6.0.11.arch1-1
Display configuration:
output DP-2 {
background ~/Pictures/9aa94c65-3724-4595-b31e-e5bf132c1a5c.png fill
mode 2560x1440@143.856003Hz
}
output HDMI-A-1 {
background ~/Pictures/6021c2ef-750f-4d56-b521-2b19741122e4.png fill
resolution 1920x1080
}
WM: Sway
Display Server: Wayland
The text was updated successfully, but these errors were encountered: