5

Issue (Brief)

GNOME Screenshot often freezes or otherwise breaks GNOME when using the area select feature, requiring the gnome-session-b process be killed manually.

Issue (Detailed)

I have three devices running recently-installed copies of Ubuntu—two on 19.10 and one on 20.04. I am having consistent issues with GNOME Screenshot on the 20.04, although I'm reasonably certain I have experienced the same issues with the other two devices too.

When using GNOME Screenshot's area select feature (Shift+Prt Scrn), there is a good chance that the program will freeze after the area is selected (i.e., I press the hotkeys, the mouse cursor changes to a cross, I click and drag to stretch out an area selection box and then I release the click). The mouse still moves and any background audio still plays (though the usual shutter click sound does not play), but the selection box remains on screen, the cross-shaped mouse cursor remains and nothing can be interacted with. Pressing Esc does not cancel the program. So far the only way of fixing this I have found is to Ctrl+Alt+F3 into a Terminal window and run the command killall -3 gnome-session-b. No new image file is created.

There does not seem to be a repeatable pattern to cause this; sometimes it happens on the first use after boot, other times it will happily go through many screenshots before one fails. The size of the selection box doesn't seem to matter, so I don't think it's a memory thing. Whether the box crosses multiple displays or not does not seem to be a factor.

In rarer cases, the area selection box will disappear and the cursor will revert to normal but GNOME features will no longer work—the start menu and panel indicator applet icons will highlight on mouseover, but do not respond to clicking, whilst the desktop icons do neither. Panel icon shortcuts work, including file explorer which functions as normal. Again, gnome-session-b must be killed.

GNOME Screenshot is an incredibly useful tool that I use multiple times daily, and this issue is happening often enough to cause considerable inconvenience.

System Information

One desktop PC running Ubuntu 20.04, two laptops running Ubuntu 19.10. All three devices using the GNOME Flashback session. Using non-proprietary GPU drivers.

7
  • OK, lets skip the Ubuntu 20.04 issue, since that's off-topic.... Did you encounter this problem also if you opened the app with the mouse and not the shortcuts?
    – kanehekili
    Commented Apr 15, 2020 at 19:24
  • @kanehekili Running gnome-screenshot via Alt + F2 does not seem to be suffering the same issues; the same is true of using the Prt Scrn keyboard hotkey (both of which take a full screenshot of all active displays). However I don't think it's possible to access the area select functionality without using the Shift + Prt Scrn hotkey.
    – 08915bfe02
    Commented Apr 15, 2020 at 20:20
  • Well, I just wondered if there might be race condition between the x-server (which handles your keystrokes) and the display of a window. You may change the keyboard shortcuts (e.g. that Alt+F2 will map to gnome-screenshot -a) -- but that doesn't solve the problem
    – kanehekili
    Commented Apr 15, 2020 at 20:32
  • @kanehekili Ah I see; the hotkeys aren't the issue, as the program starts correctly and allows me to click and drag out an area selection box as normal, but fails (intermittently) when I release the click, which should take a screenshot of the highlighted area and close the program. I've clarified this in the question.
    – 08915bfe02
    Commented Apr 15, 2020 at 21:27
  • 1
    Anyone has an answer for 20.04? Not sure if the new issue should be created for that. Happens with 20.04 host when you use it with VMWare Workstation application, trying to capture from the host what's inside the guest (guest OS does not matter) Commented Dec 30, 2020 at 18:19

2 Answers 2

2

As a workaround, I've added a keyboard shortcut for xclip -selection clipboard /dev/null using commands from CompizConfig Settings Manager.

To avoid a gnome freeze, you must always clean the clipboard before take a new screenshot:

  1. Take your area screenshot.
  2. Clean the clipboard with the new Keyboard Shortcut you've selected to call xclip -selection clipboard /dev/null.
  3. Repeat 1 & 2 as many times you want.
1
  • 1
    I didn't think CCSM worked with GNOME-shell - can you clarify exactly how you configured your shortcut?
    – Zanna
    Commented Aug 5, 2020 at 7:14
0

Update: At some point in the last week or so, an update for something seems to have fixed this issue.

Not the answer you're looking for? Browse other questions tagged .