Ubuntu – Strange artifacts along window borders after waking computer from sleep mode


NB: Nvidia has released an official fix; please see ByteCommander's answer, my own answer and/or Kaz Wolfe's answer.

Upon waking up Ubuntu 16.04 from Suspend, the following graphical glitches appear around all windows, context menus, and similar:

enter image description here

This is currently known to affect the following NVIDIA cards running
the proprietary drivers:

  • NVIDIA GeForce 610M, driver version 375.39, 340.102
  • NVIDIA GT 630M, driver version 375.39
  • NVIDIA GTX 650, driver version 375.39
  • NVIDIA GT 740M, driver version 378.13
  • NVIDIA GTX 745, unknown driver version
  • NVIDIA GTX 850M, driver version 375.39, 378.13
  • NVIDIA GT 940M, driver version 375.39
  • NVIDIA GTX 950M, unknown driver version
  • NVIDIA GTX 960M, driver version 378.13
  • NVIDIA GTX 970, driver version 375.39
  • NVIDIA GTX 970M, driver version 375.39
  • NVIDIA GTX 980 TI, unknown driver version
  • NVIDIA GTX 1060, driver version 375.26, 375.39, 378.09
  • NVIDIA GTX 1070, driver version 378.09

The above above list has been sourced from reports from other users
here on AU, this thread, and this thread.

NB: This is be no means an exclusive list. It probably effects nearly all Nvidia cards.

Furthermore, this issue has been replicated on a clean install where the only change was a software update and the installation of the latest NVIDIA drivers.

What is going on, and how can it be resolved?

Best Answer

NB: This was a temporary workaround until Nvidia released a patched driver. Scroll down to find the other answers with the actual fix. - Android Dev

I have the same issue using GPU: Nvidia GTX 970 with nvidia 375.39 driver on Ubuntu 16.04.2 LTS

I have observed this since a recent upgrade of the nvidia driver. I thus suspect that it is a bug in the driver.

I found an answer on the nvidia board. It is a confirmed bug in the driver and nvidia is apparently already working on it. In the meantime, one can restart compiz with

compiz --replace

to get rid of the artifacts.

The bug is in the Ubuntu bug tracking system including a workaround script to automatically restart compiz after resume.

Related Question