I'm having a weird problem since the last week or so on my Ubuntu 16.04 laptop.

Out of the blue, gnome-screenshot starts taking shots of the screen - continually. I used to think it only happens when I'm working on Chrome(which is like 95% of the time the system is on), but today it happened almost instantly after the system booted and I entered my password.

It happens randomly sometimes, or sometimes when I press a key. It's very annoying.

I have uninstalled the package, which was at version 3.18.0.

Also simultaneously, a weird problem has started in Google Sheets. After a sheet is loaded, the currently selected cell is cleared and the cursor starts blinking, as if someone double-clicked the cell. When I select a new cell, it waits a second and clears and edits that cell as well. Last time it happened when I uninstalled gnome-screenshot because of the above random-screenshots problem. Then I reinstalled gnome-screenshot and the Sheets problem disappeared as well as the screenshots problem. Now, both problems are back simultaneously and for the time being I've uninstalled gnome-screenshot, but the Sheets problem remains.

I don't know why this is happening, but I think it's some kind of system call which is misinterpreted or some bug in some package.

I think this has started happening since I last ran the package updater.

Any solutions? I'm pretty sick of the situation as it is now.

P.S. Just noticed its effects in Nautilus as well. When I go into a folder and want to go back to the home directory(or any other in the parents), I can't; instead the mouse pointer just starts blinking very rapidly(several times a second on/off).

I also can't open any menus in the taskbar or anything. If I try to open a menu(e.g. to shut the computer down) it stays for a split second and then closes again. This happens again if I try to reopen.

  • What about other programs such as gedit that accept keyboard/mouse actions? If it's generalized, it could be a hardware issue. – DK Bose Jul 8 '18 at 12:18
  • @DKBose Maybe, but I haven't noticed anything on gedit yet. As I said, it happens out of the blue, so I just have to see as I go. One thing is for sure - even if I take a screenshot using print screen, gnome-screenshot keeps taking more shots. – cst1992 Jul 8 '18 at 12:22
  • xkcd.com/1316 – Nonny Moose Jul 12 '18 at 14:26
  • Have you tried a different keyboard? – starbeamrainbowlabs Jul 12 '18 at 19:39

Your Prt Sc key (or whatever it is labelled on your keyboard) is most likely faulty. When gnome-screenshot is installed, that key initiates a screenshot and is not propagated to applications. When it is uninstalled, the key press is ultimately propagated to Google Sheets which results in clearing and editing the selected cell. When pressed continously, it will also prevent you from navigating in nautilus' location bar and immediately close taskbar menus.

To confirm this, install evtest, run sudo evtest in a terminal and select your keyboard. Leave it running. As soon as the problem occurs, don't press any key and switch to the terminal. There will be lines containing KEY_SYSRQ.

The obvious solution is of course replacing the keyboard. However, if it is a builtin laptop keyboard, that may not be an option.

As a workaround, you can remap the key's scancode to a key that usually has no effect, like unknown. I have written instructions for this here. Keep in mind, though, that you won't have a SysRq key then, unless you remap another key (maybe one you never use) to SysRq. This won't prevent the faulty key from sending X key events and it will still interfere with nautilus (but not the taskbar).

Another workaround would be disabling the whole keyboard using xinput --disable [id] where [id] is the device's id you can obtain with xinput list. You'll then have to use an external keyboard, but the faulty key's events are not propagated beyond the X server and won't interfere with applications.

  • It's my personal laptop. I am currently at work, and I tried installing evtest on my work PC and trying out printscreen on it. It indeed prints out KEY_SYSRQ. But I also tried uninstalling gnome-screenshot and doing printscreen on Google Sheets, but the cell stayed put. I have a suspicion that there is some other event firing in addition to printscreen. I will update with the behavior on the problem laptop. Edit I have now updated my question with the detail that it's a laptop. – cst1992 Jul 14 '18 at 6:07
  • I just checked with evtest on my personal laptop, and sure enough, the attached keyboard logs KEY_SYSRQ several times a second. But that's just a symptom, isn't it? It stops happening if say, I open a Chrome window and then change to Nautilus. Why would it do that? – cst1992 Jul 15 '18 at 11:59
  • I just had a new finding - the Prt Sc key is triggered even if I just rest my finger on the key without actually pressing it, similar to as if I have kept it pressed; it has become over sensitive. I'll have to remove its cap and see why this is. – cst1992 Jul 15 '18 at 12:04

Does the problem happen when you unplug your keyboard? Perhaps it's a mechanical problem? I've had similar weirdness when I had a book leaning on my second keyboard, for example, and hadn't noticed. Sorry if this is a too-obvious suggestion, but I think it's worth asking.

  • It may be a faulty keypress, it may not be. But unplugging is not an option - it's a laptop keyboard. I'll update the question. – cst1992 Jul 14 '18 at 6:10

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.