Bug 1384482

Summary: Screenshots and screencasts don't work on Wayland with multiple monitors (regression)
Product: [Fedora] Fedora Reporter: Jiri Eischmann <jeischma>
Component: mutterAssignee: Florian Müllner <fmuellner>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 25CC: awilliam, bugzilla, cosimo.cecchi, fmuellner, gmarr, kparal, mclasen, otaylor, rmatos, robatino, tiagomatos, walters
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-24 16:11:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1277927, 1277289    
Attachments:
Description Flags
broken screenshot
none
another broken screenshot none

Description Jiri Eischmann 2016-10-13 11:27:17 UTC
Created attachment 1210025 [details]
broken screenshot

gnome-screenshot can't take correct screenshots on Wayland (at least on multimonitor setups). The outcome only covers a small part of the screen and the rest is missing (see the attachment). It used to work in previous releases, so it's a regression.

Comment 1 Kamil Páral 2016-10-14 11:00:46 UTC
Proposing as a Final blocker:
"All applications that can be launched using the standard graphical mechanism of a release-blocking desktop after a default installation of that desktop must start successfully and withstand a basic functionality test. "
https://fedoraproject.org/wiki/Fedora_25_Final_Release_Criteria#Default_application_functionality

The screenshot tool does not work for multimonitor setups (it worked for me with a single monitor).

But the problem is larger. Screencasts don't work either (ctrl+alt+shift+R), again one of the screens is not present in the video. And because on Wayland only the compositor can capture the screen, and the compositor is broken, it means that *all* tools for capturing screenshots/screencasts are broken (e.g. my favorite EasyScreenCast extension).

The final effect is that there's no way create a screenshot/screencast at all, except for using shaky phone photos. That makes it impossible to provide debugging information or reproducers for many kinds of bugs, which seriously affects the whole QA process.

My monitor setup:
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 8192 x 8192
XWAYLAND2 connected 1920x1080+0+0 310mm x 170mm
   1920x1080     59.96*+
XWAYLAND3 connected 1920x1080+1920+0 510mm x 290mm
   1920x1080     59.96*+

On all screenshots/screencasts, only the left monitor is visible (secondary), but not the right one (primary).

Comment 2 Kamil Páral 2016-10-14 11:01:23 UTC
This is most likely a mutter issue.

Comment 3 Adam Williamson 2016-10-14 15:38:06 UTC
well, I think 'impossible' is overselling it. For most cases it'll be fine: just drag whatever you want to take a screenshot/cast of onto the screen that *does* appear in the screenshot/cast. The only case where it's really going to make things 'impossible' is if you're taking a screenshot/cast of something that specifically involves the dual screens.

Comment 4 Jiri Eischmann 2016-10-14 15:41:49 UTC
(In reply to Adam Williamson from comment #3)
> well, I think 'impossible' is overselling it. For most cases it'll be fine:
> just drag whatever you want to take a screenshot/cast of onto the screen
> that *does* appear in the screenshot/cast. The only case where it's really
> going to make things 'impossible' is if you're taking a screenshot/cast of
> something that specifically involves the dual screens.

Well, in my case it does *not* appear in the screenshot. See the attached picture. I only captures a small part of one screen.

Comment 5 Adam Williamson 2016-10-14 15:47:18 UTC
hum, I see...are we sure they're all the same bug, then?

Comment 6 Geoffrey Marr 2016-10-17 19:45:23 UTC
Discussed during the 2016-10-17 blocker review meeting: [1]

The decision to classify this bug as a "RejectedBlocker" was made as we don't consider this severe enough to warrant blocking on, however it can be considered for Freeze Exception status.

[1] https://meetbot.fedoraproject.org/fedora-blocker-review/2016-10-17/f25-blocker-review.2016-10-17-16.02.txt

Comment 7 Adam Williamson 2016-10-18 00:16:46 UTC
There appears to be a fix for this upstream now:

https://bugzilla.gnome.org/show_bug.cgi?id=771502

but I don't know when 3.22.2 is due. Could we perhaps backport it to F25 immediately as a downstream patch?

Comment 8 Kamil Páral 2016-10-18 12:07:08 UTC
I reproduced the issue in full extent as Jiri reported (both screens are garbled). This is affected by screens resolution and their placement. For 2 same resolution screens placed directly next to each other, the left is visible in full and the right is not visible at all. However, for a very common case of 1368x768 laptop screen and 1920x1080 external monitor (aligned to the bottom edge), the screenshots are almost empty, there's just a very narrow strip of content from the left monitor, and nothing else. See attachment.

Since we argued that "you can move the thing you want to shoot to the left monitor" when rejecting this, and that does not hold anymore, I'm moving this back to the discussion.

Comment 9 Kamil Páral 2016-10-18 12:08:04 UTC
Created attachment 1211667 [details]
another broken screenshot

This was reproduced with this setup:

$ xrandr 
Screen 0: minimum 320 x 200, current 3288 x 1080, maximum 8192 x 8192
XWAYLAND0 connected 1368x768+0+312 310mm x 170mm
   1368x768      59.71*+
XWAYLAND1 connected 1920x1080+1368+0 510mm x 290mm
   1920x1080     59.96*+

Comment 10 Rui Matos 2016-10-18 14:02:20 UTC
Can you try with this mutter build http://koji.fedoraproject.org/koji/buildinfo?buildID=810776 ?

Comment 11 Kamil Páral 2016-10-19 08:04:49 UTC
(In reply to Rui Matos from comment #10)
> Can you try with this mutter build
> http://koji.fedoraproject.org/koji/buildinfo?buildID=810776 ?

Works great, thanks.

Comment 12 Kamil Páral 2016-10-20 12:44:25 UTC
This is now in Bodhi here:
https://bodhi.fedoraproject.org/updates/FEDORA-2016-018689d0e7

Comment 13 Adam Williamson 2016-10-24 16:11:49 UTC
Update has now been pushed stable, and fix was confirmed by kparal, so closing the bug.