Skip to content
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

Gnome40/Wayland unable to capture screen with latest build (e4e7c90) #2041

Closed
XMoon opened this issue Nov 4, 2021 · 31 comments
Closed

Gnome40/Wayland unable to capture screen with latest build (e4e7c90) #2041

XMoon opened this issue Nov 4, 2021 · 31 comments
Labels
Unconfirmed Bug The bug is not confirmed by anyone else. Wayland Wayland specific issues

Comments

@XMoon
Copy link

XMoon commented Nov 4, 2021

Flameshot version

Flameshot v0.10.1 (e4e7c90)
Compiled with Qt 5.15.2

Describe the bug

unable to capture screen when using build e4e7c90 in Gnome40 / Wayland.

Not found any error log in console, only a notify in gnome view show flameshot info : unable to capture screen

but build 5021457 is ok.

To Reproduce

using build e4e7c90 in Gnome 40 /wayland & run flameshot gui.

System Information

System:
  Host: LLAP-Lyoko Kernel: 5.14.16-arch1-1 x86_64 bits: 64 Desktop: GNOME 40.5
  Distro: Arch Linux
Graphics:
  Device-1: AMD Renoir driver: amdgpu v: kernel
  Device-2: IMC Networks Integrated Camera type: USB driver: uvcvideo
  Display: wayland server: X.Org 1.21.1.2 driver: loaded: amdgpu
  unloaded: modesetting resolution: 1: 1920x1080~60Hz 2: 1920x1080~60Hz
  3: 2560x1600~60Hz
  OpenGL: renderer: AMD RENOIR (DRM 3.42.0 5.14.16-arch1-1 LLVM 12.0.1)
  v: 4.6 Mesa 21.2.4
@mmahmoudian mmahmoudian added Unconfirmed Bug The bug is not confirmed by anyone else. Wayland Wayland specific issues labels Nov 4, 2021
@staticf0x
Copy link
Contributor

Can reproduce on Fedora 34, Gnome 40.5 (gnome-shell-40.5-2.fc34). Compiled with Qt 5.15.2

git bisect yields commit 584bcd7 as the first bad one.

@borgmanJeremy
Copy link
Contributor

Hmmmm something is different in our setup then. I built the main branch from source on both Fedora 34 and Fedora 35 and its working fine.

@staticf0x
Copy link
Contributor

I guess yeah. In the commit I linked there's something to do with the clipboard, I didn't have much time to dig deeper in that, but I'm using the GPaste extensions, which also controls clipboard (images incl.). That is for F34, on another machine with F35 I don't have GPaste. But I also didn't try bisecting on F35, only F34.

@borgmanJeremy
Copy link
Contributor

I installed gpaste in Fedora 34 via dnf and its still working.

@veracioux
Copy link
Contributor

It seems that @XMoon and @meesha7 are talking about different issues, because 5021457 (which works for @XMoon) comes after 584bcd7 (the first bad commit per @meesha7).

Looking at 584bcd7, the most likely cause is the change in the D-Bus method graphicCapture. Please make sure that flameshot is killed (no daemon running) and then run both flameshot and flameshot gui. If you were using keyboard shortcuts to launch flameshot, they can get messed up by the changed D-Bus method. Any new findings?

I can't comment on e4e7c90 (the first bad commit per @XMoon) because I have no idea what it does :)

@XMoon
Copy link
Author

XMoon commented Nov 5, 2021

2021-11-05 10-13-27屏幕截图

in this reproduction.

I found something that if I clicked the 分享 (share) blue button from the window which look like gnome built-in thing show after I run flameshot gui, it will bring me to the normal flameshot gui screenshot action.

The words in center in English is : Would you share this screenshot with the requesting application?

@olfuerniss
Copy link

I have exactly the same problem. Was working fine on Fedora 34. Updated yesterday to Fedora 35 and now I get the error notification "Flameshot Info: Kann den Bereich nicht aufnehmen" wenn I try to capture a screenshot by using the Flameshot App icon menu entry "Bildschirmaufnahme anfertigen".
P.S. I also get the same error notification when I start it with "flameshot gui"

@sergiovier
Copy link

Same here. Updated to fedora 35, reboot, started flameshot and get "unable to capture screen"

@staticf0x
Copy link
Contributor

@olfuerniss @sergiovier the newest version (with this issue fixed) is not yet in the Fedora repos: https://koji.fedoraproject.org/koji/packageinfo?packageID=26139

@sergiovier
Copy link

@meesha7 sorry, reading at issues, found #1910, that workaround at least allows me to use flameshot "now-as-it-is"

Gnome devs did this change without any comunication and viable alternative?

@borgmanJeremy
Copy link
Contributor

borgmanJeremy commented Nov 5, 2021

In their opinion the old API was only meant for "private" use. The viable alternative is the new method where users get a popup every time. Here is the thread: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1970

However the flatpak portal developers are open to created a one time prompt rather than everytime: flatpak/xdg-desktop-portal#649

@luis-alves
Copy link

I'm having this issue too, after upgrading from Fedora 34 to 35 with Gnome Wayland.

@Kruchinin-v
Copy link

Kruchinin-v commented Nov 11, 2021

Arch. After upgrading GNOME Shell from 40.5 to 41.1 also get this error.
GNOME Shell 41.1 Wayland

@AshtakaOOf
Copy link

I also have that problem where it can't screenshot on wayland

@borgmanJeremy
Copy link
Contributor

Sorry if this sounds a bit abrupt, but its not helping to keep bumping the issue it just clutters it. Let me summarize where this is at:

If you are only having this issue on gnome 41 or greater, the problem has been resolved on our master branch. I do not know when we will have an official release.

Please only comment on this issue if you test on gnome40 or 41 with a build of Flameshot after #2035

@posuch
Copy link

posuch commented Nov 12, 2021

I did compile the latest code on archlinux/gnome41/wayland using this - basically just adjusted the PKGBUILD with

printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
r1566.167de09
Flameshot v0.10.1 (167de09b)
Compiled with Qt 5.15.2
linux: 5.14.16-zen1-1-zen
arch: unknown

Flameshot is not working - anybody can confirm that master branch works on wayland and gnome 41.1 ( preferably archlinux ? )

Thanks

@pmoralesp
Copy link

Not working for me neither. Can open config window but I can't capture. Was working flawless until gnome 40 with wayland.

Version: r1566.167de09b
Desktop: Gnome 41.1
Display: Wayland
OS: Archlinux

@borgmanJeremy
Copy link
Contributor

Have you killed any existing flameshot processes and uninstalled the old version before running the test?

@pmoralesp
Copy link

Sure. Also had to remove these lines from config file

setSaveAsFileExtension=Portable Network Graphic file (PNG) (*.png)
saveAfterCopyPath=XXXX

@luis-alves
Copy link

luis-alves commented Nov 12, 2021

Please only comment on this issue if you test on gnome40 or 41 with a build of Flameshot after #2035

Tested it now with the build from master, in Gnome 41 of Fedora 35/wayland and it's working to some extent. I can't change the configuration.

@johnkarpn
Copy link

johnkarpn commented Nov 13, 2021

It still doesn't work. The tray icon appears, but does not take screenshot
Before installing, I deleted everything along with the config

Flameshot v0.10.1 (167de09)
Compiled with Qt 5.15.2
linux: 5.15.2-arch1-1
Desktop: Gnome 41.1
Display: Wayland
OS: Archlinux

(after #2035)

@trahelman
Copy link

Same with Arch

@nsxz1234
Copy link

Same with manjaro
Desktop: Gnome 41.1

@mmahmoudian
Copy link
Member

@johnkarpn @trahelman @nsxz1234 try the version v0.10.2 which was released due to Gnome's issues.

For others, please do not bump the issue before trying v0.10.2

@posuch
Copy link

posuch commented Nov 15, 2021

tried to compile 0.10.2 didnt work , same with snap package - gnome 41.1, archlinux, wayland - arch guys, does it work for you ?

@mmahmoudian
Copy link
Member

@posuch

tried to compile 0.10.2 didnt work

What do you mean? The compiling failed or it didn't improve the situation? If the compiling failed, use the AUR.

There are also Linux binaries available for v0.10.2 in the release page

@posuch
Copy link

posuch commented Nov 15, 2021

@mmahmoudian

sorry :) the compilation did work, flameshot did install - just the result was the same eg. I couldnt take a screenshot. To exclude my environment setup id be great if some other guys with archlinux could try it out and confirm.

@olfuerniss
Copy link

Thanks! 0.10.2 works for me on Fedora 35 (Wayland; Gnome 41.1).

wget https://github.com/flameshot-org/flameshot/releases/download/v0.10.2/flameshot-0.10.2-1.fc35.x86_64.rpm sudo dnf localinstall flameshot-0.10.2-1.fc35.x86_64.rpm

@rohandayal
Copy link

Thanks! 0.10.2 works for me on Fedora 35 (Wayland; Gnome 41.1).

wget https://github.com/flameshot-org/flameshot/releases/download/v0.10.2/flameshot-0.10.2-1.fc35.x86_64.rpm sudo dnf localinstall flameshot-0.10.2-1.fc35.x86_64.rpm

Was able to install flameshot-0.10.2-1.fc35.x86_64.rpm and it works, but Gnome's screenshot tool captures the entire screen and requires the screen to be 'shared' to flameshot. After I click share, the normal flameshot gui loads. So it works, but it requires an extra step. Tried with the keyboard shortcut and the tray icon with same results.

Any ideas on how the gnome screenshot tool can be bypassed?

@staticf0x
Copy link
Contributor

@rohandayal that was discussed here and here

@rohandayal
Copy link

@rohandayal that was discussed here and here

Thanks for replying! Glad that we at least have Flameshot working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Unconfirmed Bug The bug is not confirmed by anyone else. Wayland Wayland specific issues
Projects
None yet
Development

No branches or pull requests