6

When I want to take a screenshot with gnome-screenshot of my browser (chromium), pdf-viewer (Document Viewer), nautilus or even texmaker it takes a screenshot of the desktop or the window behind the current active window and sometimes it works as desired. This happens with the options "Grab the whole screen", "Select area to grab" and "Grab the current window". For all three options the behavior is not the same every time! Here is a summary of the 3 behaviors:

  • screenshot of desktop through actual active window and the windows behind
  • screenshot of the window behind the actual active window
  • screenshot of actual active window (desired event!)

EDIT1: new behavior found taking a screenshot ("select area to grab") of my clock in the task-bar.

picture taken at 10:35:30: enter image description here

picture taken at 10:35:40 (10 seconds later): enter image description here

picture taken at 10:40:34 (10 minutes later): enter image description here

It appears to take on two different times a picture of a old "frozen" screen with the same time displaying on the clock (time: 10:14:43).

HELP!


EDIT2: took a screencast with simplescreenrecorder to document the my problem/bug

here the link to the video

Looking at the video i noticed a flickering between two screens but while taking the screencast never saw a flickering. It flickers between the actual screen (right time in the menu bar) and a old screen from the "past" (wrong time in the menu bar).

I have:

  • nvidia GM107GLM Quadro M1000M
  • intel graphic HD P530 chip

I'm using nvidia-367 367.35 driver.

sepplhans
  • 898
  • ASkUbuntu is not a bug tracker‼ Please use Launchpad. http://askubuntu.com/q/5121/40581 – LiveWireBT Jul 31 '16 at 01:31
  • @LiveWireBT I don't think this is a bug so much as a lack of understanding. Have you been able to duplicate the OPs problem? – Elder Geek Jul 31 '16 at 21:30
  • Thank you! @ElderGeek Yes, i can reproduce the already mentioned bugs using the UI of gnome screenshot and also using the shortcuts. – sepplhans Aug 01 '16 at 10:14
  • I cannot reproduce your error. It works flawlessly for me under 16.04. Have you tried a RAM test? I imagine a stuck bit could cause this issue. http://askubuntu.com/questions/591488/how-do-i-run-memtest86/591502 – Elder Geek Aug 01 '16 at 14:25
  • I have a UEFI system so memtest86+ is deactivated. Should i do the RAM test with on memtest86 ISO on a bootable USB? I read that only the Pro-Version gives exact test results... Today i retry to reproduce the mentioned bug for the umpteenth time and approximately one out of 5 gnome screenshot takes a screenshot of the chrome browser (actual active window) but with other tabs (closed some time ago) and a wrong time in the task-bar. when I am taking a "select area to grap" shot of my clock in the task-bar at 10:31 i get a pic with my clock showing me 10:14!!!! – sepplhans Aug 02 '16 at 08:34
  • @ElderGeek i did the ram test with memtest86 with help of a USB stick. Everything looked fine, no error occur! – sepplhans Aug 03 '16 at 07:31
  • Interesting. What are your Time and Date settings? What version of the kernel are you running? are you using the -d --delay parameter? What video card are you using? My apologies for the scatter -gun questions but I am completely unable to duplicate your results running 16.04 kernel 4.4.0-31-generic #50-Ubuntu SMP nor can I seem to find mention of anyone else experiencing your results. Is this related? http://askubuntu.com/questions/133532/how-to-take-a-screenshot-of-chromiums-search-suggestions-and-instant-search-res – Elder Geek Aug 03 '16 at 21:33
  • Time&Date ist set to automatically and showed in the menu bar. 'Linux precision 4.4.0-31-generic #50-Ubuntu SMP'. I am not using delay parameters. I have a video card (nvidia GM107GLM) and a on board video card (intel). Im using nvida drivers 367.35 from nvidia-367. The post in the link is not relevant. I am taking a lot of screenshots of my menu bar now and did not find a correlation! Sometimes the photographed time is 12 minutes bevor the time I took the photo, sometimes 15, 8 or 11 minutes... and maybe 1 out of 5 is the right time! – sepplhans Aug 04 '16 at 08:02
  • Today i want to take a screen-cast to document the strange behaviors. While i was taking the video everything looked fine (achieve to reproduce the screenshot errors mentioned) and then when i was looking at the video i saw everything different! The image of the video is constantly flickering between to different desktops, one on i was actually working in the present and the other a image of the past. So now i can understand why there is always a different behavior in taking a screenshot (due to the random flickering). What can be the problem?? https://youtu.be/EV2oorPKyN0 – sepplhans Aug 05 '16 at 08:48
  • FYI, there are better tools to take snapshots of web sites and PDFs that don't suffer from the size restrictions of your computer screen. – David Foerster Aug 07 '16 at 09:23
  • Are you sure you open the new screenshot image file? may be you opened an older screenshot file? – Anwar Aug 08 '16 at 03:55
  • @AnwarShah yes i am sure. Did you see the video? – sepplhans Aug 08 '16 at 22:55
  • any idea what it could be? – sepplhans Sep 01 '16 at 13:43
  • "dkms status" give me that:

    bbswitch, 0.8, 4.4.0-38-generic, x86_64: installed i915-4.6.3-4.4.0, 1, 4.4.0-36-generic, x86_64: installed i915-4.6.3-4.4.0, 1, 4.4.0-38-generic, x86_64: installed virtualbox, 5.0.24, 4.4.0-36-generic, x86_64: installed virtualbox, 5.0.24, 4.4.0-38-generic, x86_64: installed

    is that normal?

    – sepplhans Oct 04 '16 at 13:39
  • I have a dell xps 15 9550 and the same problem! But I didn't have it when I first installed ubuntu... so I think it's something driver related, but I had no luck in fixing this... I also tried updating the intel drivers – justmyfault Oct 07 '16 at 08:56
  • @justmyfault At fresh install where no problems. i updated also intel drivers a couple of days ago. But had this problems before intel updates. Now i have a problem in (re)installing nvidia drivers even if in the past i was able to install them. look here http://askubuntu.com/q/833328/543758 – sepplhans Oct 09 '16 at 08:30
  • 1
    @ManuelBellini I have the same exact problem with the nvidia driverse! (albeit with a slightly different laptop, in particular I have an Nvidia GTX 960M card)... I guess the screenshot problem and the driver problem are related then... – justmyfault Oct 10 '16 at 12:15
  • @justmyfault now i am thinking also that the nvidia driver installation problems correlate with the screenshot problems described by me here. Did you record also your screen and observe similar flickering (my video youtu.be/EV2oorPKyN0 ) (but only watching the video, no flickering during recording)? – sepplhans Oct 10 '16 at 13:18
  • @marsUbuntux I have the exact same problem, the video capture shows a flickering and screenshot can show an old screen of more than 2 hours (I can clearly see it with the clock and the window I had opened at that time). I did not find a pattern or a solution yet, it's a precision 5510 (similar hardware that xps 9550), ubuntu 16.04, Quadro M1000M, drivers 367.57 installed but using the intel card, kernel 4.7.10. I had the issue with the nouveau driver as well. Any progress on your side? – jebeaudet Nov 08 '16 at 19:40
  • @jebeaudet i have also a precision 5510. I have no solution. I am working on my thesis and i am afraid to try new things out... – sepplhans Nov 10 '16 at 13:17

2 Answers2

5

I used to have this problem on an XPS 15 9550 with ubuntu 16.04. I tried to update to 16.10 to see if the problem was solved, but the upgrade did not go well so I reverted to 16.04 (thanks to Timeshift).

However I solved it by following ComBin's answer here

sudo apt-get purge xserver-xorg-video-intel

(actually I also removed the file "/usr/share/X11/xorg.conf.d/20-intel.conf", which I had previously tweaked)

The solution is basically to remove the intel driver and resort to modesetting, it should be the default behavior in new ubuntu versions (maybe it already is in 16.10, I didn't check): https://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-Debian-Abandon-Intel-DDX

Note that this also solves problems with the switching of gpu via nvidia-prime (see here)

  • thank you a lot! it resolved my problem. Did you now install nvidia 370 drivers with prime and are able to switch between nvidia and intel graphic card? – sepplhans Nov 17 '16 at 10:08
  • yes I have nvidia-370 and nvidia-prime installed and the gpu switching works as intended – justmyfault Nov 17 '16 at 14:55
  • I have the Dell XPS 13 without the NVIDIA card -- have the exact same issue. Removing the Intel driver is not an option :) – badkya Nov 25 '16 at 14:50
  • 1
    Please note the solution is removing the X.org intel driver not the whole intel driver, there is no harm in doing so since the modesetting xorg driver accelerates 2D via opengl! – justmyfault Nov 28 '16 at 14:14
  • Ah thanks -- just removed it an the problem is gone. But now some of the graphical UI transitions seem to be gone. – badkya Jan 07 '17 at 04:48
  • graphics performance is unbearably slow now with the removal of the intel graphics driver! – badkya Jan 07 '17 at 17:15
1

Getting a screenshot of the actual active window (your desired event) with Ubuntu 16.04 and gnome-screenshot is as simple as holding Alt and Tapping PrtSc You will be prompted where to save the screenshot. Try it, it works.

Edit: Ctrl PrtSc will result in the entire visible desktop being copied to the clipboard and you can paste the image into whatever document you desire.

ShiftCtrlPrtSc will provide a crosshair that you can use to select a portion of the screen to capture to the clipboard which again you can paste into whatever document you desire.

Tested on fresh install of 16.04.1

Alternatives to gnome-screenshot can be found here.

Elder Geek
  • 36,023
  • 25
  • 98
  • 183