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?

  • What graphics driver are you using and what graphics card model do you have? I recently had the same problem with my 940M card and the some versions of nvidia's proprietary driver after suspending and waking up the laptop again. Please edit the question and add the output of lspci -k | grep -iEA3 '3d|vga' which contains all the requested info. Thanks.
    – Byte Commander
    Mar 24, 2017 at 19:10
  • 1
    Oh, actually I am also having this issue again, because the nvidia-367 driver I used became a transitional package that automatically upgrades to nvidia-375, which was one of the versions causing this bug. Time to nag nvidia and write bug reports.
    – Byte Commander
    Mar 24, 2017 at 19:14
  • 2
    that is indeed a dub but try to google something like 'weird things around the corners'... Anyway those questions have poor answers while the solution below works like a charm.
    – Ivan
    Mar 25, 2017 at 9:19
  • 1
    @taylorswift - Looks like at least 41 others have this problem too: bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-375/… I guess we'll just have to wait for Nvidia to fix it. Mar 26, 2017 at 22:10
  • Also affects GeForce GTX 950M.
    – conualfy
    Apr 4, 2017 at 21:18

10 Answers 10


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.

  • Another solution would be to downgrade to the previous driver version: askubuntu.com/a/896544/657603 Mar 26, 2017 at 10:55
  • Thx for workaround. I am not sure, but since I have this issue and I also have another issue: my laptop is not always suspended correctly after one hour as it set. Mar 28, 2017 at 12:03
  • When coming back from sleep it is automatically logged in, before it would prompt the password, anyway to fix that? Mar 28, 2017 at 20:44
  • 2
    compiz --replace doesn't behave nicely with workspaces. It puts all windows of all workspaces into the first workspace :( Apr 2, 2017 at 7:15
  • 1
    You have to keep the terminal opened with this command. If you close the terminal, it will restart compiz again. This will work until next suspend, it is not a real solution, I cannot really be functional with running this command a few times a day. Went to the above solution, changing the driver.
    – conualfy
    Apr 4, 2017 at 21:13


Nvidia now also updated their nvidia-375 drivers to version 375.66, which is available from the standard Ubuntu repositories of all currently supported releases.

That means from now on, you should not have to take any special actions any more, except for doing the normal system updates as always. You don't need the driver package from the graphics-drivers PPA if you don't want them.

Here's the changelog excerpt for the package from the main repos on 16.04 regarding this bug:

$ apt changelog nvidia-375=375.66-0ubuntu0.16.04.1

    - Fixed a regression that caused corruption in certain
      applications, such as window border shadows in Unity, after
      resuming from suspend.


Nvidia has finally fixed this issue and released a new working driver version: nvidia-381

The solution described in this answer has been updated as well and now suggests to upgrade to this fixed version instead of downgrading to the latest version before the bug. It remains the same procedure though, you just switch out the package names.

Problem cause:

Some of the proprietary Nvidia graphics driver packages for Ubuntu (namely nvidia-375 and nvidia-378) are buggy and produce the white artefacts around window borders that are shown in your screenshots in the question. This happens reproducibly every time you suspend and wake up from that again.

Until around a few days ago, the nvidia-367 package in Xenial's repository was working fine and reliably, but now they updated it and converted it to a transitional package which automatically installs the buggy nvidia-375 version instead.

Solution (updated after bugfix release from Nvidia):

Make sure that you really have a Nvidia graphics card, which is causing the problem, and not one from a different brand that coincidentally misbehaves in a similar way. Installing Nvidia drivers for non-Nvidia graphics cards will do no good.

You can verify this by checking the output of the command below:

lspci -k | grep -iEA3 '3d|vga'

My solution for now is to downgrade from nvidia-375 or nvidia-378 to nvidia-370, which seems to work fine so far.
As Nvidia released a new upgraded driver version nvidia-381 with this bug fixed, we can (and should) install that one instead of downgrading.

This package is not available from the standard repositories, but you can easily get it from a PPA and replace your current driver with it by running the commands below:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt purge nvidia*

sudo apt install nvidia-370

sudo apt install nvidia-381

After you finished that procedure, reboot your computer and test whether you still have any issues. For me they were gone. Good luck.

  • 1
    For general users, I would prefer the quick non-driver-changing workaround here rather than downgrading the drivers. Given that a fix will be released (and presumably not too far from now), it's really just temporary discomfort. If you downgrade the drivers, though, you'll have to remember to revert apt back to a state where further upgrades are received automatically again. You'll also have to keep actively checking for the new properly fixed version to be released instead of just waiting to get it automatically -- Issue prone and inconvenient.
    – Jason C
    Apr 4, 2017 at 16:53
  • 1
    @JasonC No. The nvidia-370 will very likely also turn into a transitional package just like nvidia-367 already is, and therefore that update would automatically install the driver version nvidia/the graphics-drivers team deems as suitable successor. The 370 is the latest (and maybe only) currently supported driver that is not affected by this bug, so why not use it? Compared to the 367 that was in use before the upgrade introducing this bug, it is still an upgrade. Furthermore, we are not holding back any packages or overriding any apt configuration, as you seem to think.
    – Byte Commander
    Apr 4, 2017 at 20:03
  • 1
    @ByteCommander I will delete my comment under two conditions. 1) As long as you are 100% confident that it will turn into a transitional package, I will believe you (I am not 100% confident in my statement); or if you aren't 100% confident, then add a mention of the risk to the answer, and 2) If you add a mention of how this won't affect future updates if it becomes a transitional package, and what to do once the fix is released, to the answer.
    – Jason C
    Apr 4, 2017 at 21:33
  • 1
    @JasonC No need to delete your comment. I can for obvious reasons not guarantee what the maintainers of the graphics-drivers PPA will do with their packages in the future, I can just make assumptions based on what they did in the past. And as long as 370 is supported, there is no need to act, even when they fix the 375 and 378. My strong guess is that once nvidia deprecates the 370 (like they recently did with the 367), the PPA maintainers will turn it into a transitional package, meaning that the updated version will contain no more code but add a dependency to the newer driver.
    – Byte Commander
    Apr 4, 2017 at 21:50
  • 2
    @Matsmath I don't know. Only time will tell. Maybe it will never get added to the repositories of "older" Ubuntu versions that were released before that driver package at all. I don't think it is possible to give an accurate answer to that before it has actually happened.
    – Byte Commander
    May 28, 2017 at 21:50

This is was a bug in the Nvidia drivers.

Nvidia has been able to reproduce the issue, and they are working on a fix, which will be included in their next driver release. (The fix has now been released, see the below section).

See this thread on the Nvidia developer forums for more information. This bug has also been reported on Launchpad.

Thanks to @Stefan for his great sluthing skills in uncovering this information!

Nvidia has finally released an official fix!

  • The fix comes courtesy of beta driver 381.09 Relevant screenshot from the changelog: enter image description here

  • This driver is not currently in any repositories

  • Until the above changes, you will need to install the new driver manually Update: the 381.09 driver is now in an unofficial repository. You can either install the patched driver from the unofficial PPA, or you can install it manually.


    Kudos to @ubfan1 for reporting this! See the below section for details

1. Installing the patched [release] driver from the official repo (recommended):

Nvidia pushed an update to their release driver on 05/04/2017, containing, among other things, the bug fix you're looking for. The updated release driver has been given the version 375.66

Since this 375.66 is in the official repository, loading the patched driver is quite simple.

  • If you are currently on the buggy 375.39 version, then all that should be required is a simple:

    sudo apt-get update
    sudo apt-get upgrade

  • If you are on the legacy driver, then you should perform a:

    sudo apt-get update

    Followed by switching to the new driver version in Additional Drivers:

    enter image description here

  • If you are currently using a manually installed driver, you should uninstall it, reboot, and then perform the steps outlined above.

After rebooting, you should find that your Nvidia driver has been updated to 375.66.

2. If you don't need the newer driver for compatibility with your GPU:*

*Note that this section has been superseded by section #1

If your graphics card is old enough that it is supported by v340 of the driver, there is no need to install a newer version from an unofficial PPA. For people with newer cards like the GTX 9-series or 10-series however, you will need a newer driver.

For convenience, here's a complete list of the cards supported by version 340 of the driver:

GeForce 800M Series (Notebooks):
GeForce GTX 880M, GeForce GTX 870M, GeForce GTX 860M, GeForce GTX 850M, GeForce 845M, GeForce 840M, GeForce 830M, GeForce 825M, GeForce 820M, GeForce 810M

GeForce 700 Series:
GeForce GTX TITAN Z, GeForce GTX TITAN Black, GeForce GTX TITAN, GeForce GTX 780 Ti, GeForce GTX 780, GeForce GTX 770, GeForce GTX 760, GeForce GTX 760 Ti (OEM), GeForce GTX 750 Ti, GeForce GTX 750, GeForce GTX 745, GeForce GT 740, GeForce GT 730, GeForce GT 720, GeForce GT 710, GeForce GT 705

GeForce 700M Series (Notebooks):
GeForce GTX 780M, GeForce GTX 770M, GeForce GTX 765M, GeForce GTX 760M, GeForce GT 755M, GeForce GT 750M, GeForce GT 745M, GeForce GT 740M, GeForce GT 735M, GeForce GT 730M, GeForce GT 720M, GeForce GT 710M, GeForce 720M, GeForce 710M, GeForce 705M

GeForce 600 Series:
GeForce GTX 690, GeForce GTX 680, GeForce GTX 670, GeForce GTX 660 Ti, GeForce GTX 660, GeForce GTX 650 Ti BOOST, GeForce GTX 650 Ti, GeForce GTX 650, GeForce GTX 645, GeForce GT 645, GeForce GT 640, GeForce GT 635, GeForce GT 630, GeForce GT 620, GeForce GT 610, GeForce 605

GeForce 600M Series (Notebooks):
GeForce GTX 680MX, GeForce GTX 680M, GeForce GTX 675MX, GeForce GTX 675M, GeForce GTX 670MX, GeForce GTX 670M, GeForce GTX 660M, GeForce GT 650M, GeForce GT 645M, GeForce GT 640M, GeForce GT 640M LE, GeForce GT 635M, GeForce GT 630M, GeForce GT 625M, GeForce GT 620M, GeForce 610M

GeForce 500 Series:
GeForce GTX 590, GeForce GTX 580, GeForce GTX 570, GeForce GTX 560 Ti, GeForce GTX 560 SE, GeForce GTX 560, GeForce GTX 555, GeForce GTX 550 Ti, GeForce GT 545, GeForce GT 530, GeForce GT 520, GeForce 510

GeForce 500M Series (Notebooks):
GeForce GTX 580M, GeForce GTX 570M, GeForce GTX 560M, GeForce GT 555M, GeForce GT 550M, GeForce GT 540M, GeForce GT 525M, GeForce GT 520M, GeForce GT 520MX

GeForce 400 Series:
GeForce GTX 480, GeForce GTX 470, GeForce GTX 465, GeForce GTX 460 SE v2, GeForce GTX 460 SE, GeForce GTX 460, GeForce GTS 450, GeForce GT 440, GeForce GT 430, GeForce GT 420, GeForce 405

GeForce 400M Series (Notebooks):
GeForce GTX 485M, GeForce GTX 480M, GeForce GTX 470M, GeForce GTX 460M, GeForce GT 445M, GeForce GT 435M, GeForce GT 425M, GeForce GT 420M, GeForce GT 415M, GeForce 410M, GeForce 405M

GeForce 300 Series:
GeForce GT 340, GeForce GT 330, GeForce GT 320, GeForce 315, GeForce 310

GeForce 300M Series (Notebooks):
GeForce GTS 360M, GeForce GTS 350M, GeForce GT 335M, GeForce GT 330M, GeForce GT 325M, GeForce GT 320M, GeForce 320M, GeForce 315M, GeForce 310M, GeForce 305M

GeForce 200 Series:
GeForce GTX 295, GeForce GTX 285, GeForce GTX 280, GeForce GTX 275, GeForce GTX 260, GeForce GTS 250, GeForce GTS 240, GeForce GT 230, GeForce GT 240, GeForce GT 220, GeForce G210, GeForce 210, GeForce 205

GeForce 200M Series (Notebooks):
GeForce GTX 285M, GeForce GTX 280M, GeForce GTX 260M, GeForce GTS 260M, GeForce GTS 250M, GeForce GT 240M, GeForce GT 230M, GeForce GT 220M, GeForce G210M, GeForce G205M

GeForce 100 Series:
GeForce GT 140, GeForce GT 130, GeForce GT 120, GeForce G100

GeForce 100M Series (Notebooks):
GeForce GTS 160M, GeForce GTS 150M, GeForce GT 130M, GeForce GT 120M, GeForce G 110M, GeForce G 105M, GeForce G 103M, GeForce G 102M

GeForce 9 Series:
GeForce 9800 GX2, GeForce 9800 GTX/GTX+, GeForce 9800 GT, GeForce 9600 GT, GeForce 9600 GSO, GeForce 9600 GSO 512, GeForce 9600 GS, GeForce 9500 GT, GeForce 9500 GS, GeForce 9400 GT, GeForce 9400, GeForce 9300 GS, GeForce 9300 GE, GeForce 9300 SE, GeForce 9300, GeForce 9200, GeForce 9100

GeForce 9M Series (Notebooks):
GeForce 9800M GTX, GeForce 9800M GTS, GeForce 9800M GT, GeForce 9800M GS, GeForce 9700M GTS, GeForce 9700M GT, GeForce 9650M GT, GeForce 9650M GS, GeForce 9600M GT, GeForce 9600M GS, GeForce 9500M GS, GeForce 9500M G, GeForce 9400M G, GeForce 9400M, GeForce 9300M GS, GeForce 9300M G, GeForce 9200M GS, GeForce 9100M G

GeForce 8 Series:
GeForce 8800 Ultra, GeForce 8800 GTX, GeForce 8800 GTS 512, GeForce 8800 GTS, GeForce 8800 GT, GeForce 8800 GS, GeForce 8600 GTS, GeForce 8600 GT, GeForce 8600 GS, GeForce 8500 GT, GeForce 8400 GS, GeForce 8400 SE, GeForce 8400, GeForce 8300 GS, GeForce 8300, GeForce 8200, GeForce 8100 /nForce 720a

GeForce 8M Series (Notebooks):
GeForce 8800M GTX, GeForce 8800M GTS, GeForce 8700M GT, GeForce 8600M GT, GeForce 8600M GS, GeForce 8400M GT, GeForce 8400M GS, GeForce 8400M G, GeForce 8200M G, GeForce 8200M

Quadro Series:
Quadro K6000, Quadro K5200, Quadro K5000, Quadro K4000, Quadro K4200, Quadro K2200, Quadro K2000, Quadro K2000D, Quadro K620, Quadro K600, Quadro K420, Quadro 6000, Quadro 5000, Quadro 4000, Quadro 2000, Quadro 2000D, Quadro 600, Quadro 410, Quadro 400

Quadro Series (Notebooks):
Quadro K5100M, Quadro K5000M, Quadro K4100M, Quadro K4000M, Quadro K3100M, Quadro K2100M, Quadro K3000M, Quadro K2000M, Quadro K1100M, Quadro K1000M, Quadro K610M, Quadro K510M, Quadro K500M, Quadro 5010M, Quadro 5000M, Quadro 4000M, Quadro 3000M, Quadro 2000M, Quadro 1000M

Quadro FX Series:
Quadro CX, Quadro FX 370, Quadro FX 370 Low Profile, Quadro FX 380, Quadro FX 380 Low Profile, Quadro FX 570, Quadro FX 580, Quadro FX 1700, Quadro FX 1800, Quadro FX 3700, Quadro FX 3800, Quadro FX 4600, Quadro FX 4700 X2, Quadro FX 4800, Quadro FX 5600, Quadro FX 5800

Quadro FX Series (Notebooks):
Quadro FX 3800M, Quadro FX 3700M, Quadro FX 3600M, Quadro FX 2800M, Quadro FX 2700M, Quadro FX 1800M, Quadro FX 1700M, Quadro FX 1600M, Quadro FX 880M, Quadro FX 770M, Quadro FX 570M, Quadro FX 380M, Quadro FX 370M, Quadro FX 360M

Quadro NVS Series:
Quadro NVS 290, Quadro NVS 295, NVS 510, NVS 315, NVS 310, NVS 300, Quadro NVS 420, Quadro NVS 450

Quadro NVS Series (Notebooks):
NVS 5400M, NVS 5200M, NVS 5100M, NVS 4200M, NVS 3100M, NVS 2100M, Quadro NVS 320M, Quadro NVS 160M, Quadro NVS 150M, Quadro NVS 140M, Quadro NVS 135M, Quadro NVS 130M

Quadro Plex Series:
Quadro Plex Model II, Quadro Plex D Series, Quadro Plex Model IV, Quadro Plex 7000

Quadro Sync Series:
Quadro Sync, Quadro G-Sync II

Quadro SDI:
Quadro SDI

GRID Series:

NVS Series:
Quadro NVS 290, Quadro NVS 295, NVS 510, NVS 315, NVS 310, NVS 300, Quadro NVS 420, Quadro NVS 450

NVS Series (Notebooks):
NVS 5400M, NVS 5200M, NVS 5100M, NVS 4200M, NVS 3100M, NVS 2100M, Quadro NVS 320M, Quadro NVS 160M, Quadro NVS 150M, Quadro NVS 140M, Quadro NVS 135M, Quadro NVS 130M

ION (Desktops):

ION (Notebooks):

ION LE (Desktops):

ION LE (Notebooks):

So, if your GPU is supported by 340, then you can simply switch to version 340 in Additional Drivers. (Version 340 does not have this bug.)

enter image description here

Be sure to reboot after switching the driver version.

3. To install the patched [beta] driver from an unofficial PPA (recommended):

  1. Fire up a terminal with CTRL+ALT+T

  2. Run these commands:

    sudo -i
    add-apt-repository ppa:graphics-drivers/ppa
    apt-get update
    apt-get install nvidia-381
  3. Reboot your computer, and you should be good to go! After your computer reboots, open Nvidia X Server Settings. With any luck, you'll see the new driver version:

    enter image description here

4. To manually install the patched [beta] driver (NOT recommend):

Installing the Nvidia drivers from the *.run file is generally not a very good idea. It tends to break things. Thus, it is better to install them from a PPA, as described above. Nevertheless, if you're adventures and want to install them manually, this is the process that worked for me with Ubuntu 16.04 and a GTX650.

Before installing the patched driver, you MUST uninstall your current proprietary driver and switch to the Nouveau driver:

enter image description here


  1. Download the patched driver file from Nvidia. Here's a direct link.

  2. Save the file to your downloads folder

  3. Log out from your GUI session (You should end up on the login screen before continuing)

  4. Fire up tty1 with CTRL+ALT+F1

  5. Login with your normal credentials

  6. Run these commands:

    sudo service lightdm stop
    cd Downloads
    chmod +x NVIDIA-Linux-x86_64-381.09.run
    sudo ./NVIDIA-Linux-x86_64-381.09.run
  7. Accept the license agreement:

    enter image description here

  8. It will complain that the distribution-provided pre-installer script failed. Continue anyway:

    enter image description here

  9. Select Yes when asked if you'd like to register the kernel module with dkms:

    enter image description here

  10. Select Yes when asked if you'd like to install the 32-bit compatibility libraries:

    enter image description here

  11. It will take a while to build the kernel module, so be patient!

    enter image description here

  12. Select Yes when asked if you'd like to run nvidia-xconfig:

    enter image description here

  13. Select Ok to exit the installer

  14. Almost there! Now just run these commands:

    rm ~/.Xauthority
    rm ~/.config/dconf/unity
    sudo shutdown -r now
  15. After your computer reboots, open Nvidia X Server Settings. With any luck, you'll see the new driver version:

    enter image description here

  • 1
    NOTE: step 14 was used when answer's Unity desktop didn't show up as has been discussed in Ask Ubuntu chat room. It might not be necessary, but if your Unity desktop doesn't appear , use that step as solution. Apr 7, 2017 at 21:05
  • Sorry but I must argue with this solution. It led me to an error causing me not to be able to login and incompatibility with wine installed windows softwares. Such login issue is common if you install .run files from the nvidia site instead of using the available sources within ubuntu. A much simpler way to fix this issue would be using the version 340, available right between the choosable drivers in the Software and Updates menu. At least it worked fixing everything for me. Apr 9, 2017 at 0:16
  • @GiorgioVitanza - I know that installing the .run files isn't really the recommended way to do things. But, using the 340 driver is not an option for people with newer card like the 10-series. I tested this solution on my own computer, and it worked fine. Apr 9, 2017 at 0:31
  • @GiorgioVitanza Try my answer -- it installs drivers from the PPAs, which should be a lot more compatible than the run files.
    – Kaz Wolfe
    Apr 9, 2017 at 3:17
  • @GiorgioVitanza - Now that the driver is in a PPA, I have updated my answer to include both methods. Apr 9, 2017 at 3:19

This issue is present in 375 and 378 drivers...

Given that simply killing compiz process fixes the bad border problem, I have tested a solution that works on my Ubuntu 16.04 system every time after the system wakes.

Step 1:

I created a script called fixbadborders in the directory /lib/systemd/system-sleep. It contained the following:

## This file (or a link to it) must be in the folder /lib/systemd/system-sleep/
## Purpose: Kill compiz after system wakes up from sleep.
## This will fix bad window borders caused by Nvidia driver 375.39.
kill $(ps -C compiz -o pid=)

Step 2:

Allowed the script to have execute permission with:

sudo chmod +x fixbadborders

To remove this script:

sudo rm /lib/systemd/system-sleep/fixbadborders

All credits go to Sun Bear who created this script comment 13

  • Better to flag questions as duplicate rather than posting the same solution again and again
    – Zanna
    Mar 27, 2017 at 6:01
  • 3
    Its disadvantage is my login screen never displays when come into the desctop from sleep :(
    – Hesam
    Apr 3, 2017 at 17:35

NVIDIA has released an updated driver version that has fixed this regression. Any driver past 381.09 will now no longer have this issue, until NVIDIA messes up again.

Until such time as the driver reaches the main repositories, they can be downloaded from the unofficial NVIDIA driver PPA. Doing this ensures that you won't need to mess with the installer (which is widely considered a bad idea) or Nouveau. Similarly, it will allow the drivers to be installed/uninstalled through apt instead of the dangerous half-configuration the NVIDIA installer leaves drivers in. Furthermore, this will not cause any login loops or errors unless you have a weird system. To install, run:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-381

The old drivers will automatically be uninstalled and the new ones will be loaded in. Follow up by rebooting your computer (as NVIDIA drivers need to be baked into the kernel), and everything should work just fine. You can check that the drivers were installed correctly by running the below command:

nvidia-settings --version

Be sure to revert any patches described in this post before you update to the latest drivers. For example, if you installed the patched version of Unity as described below, run this command to revert back to the normal version:

sudo ppa-purge ppa:kaihengfeng/lp1292830 

Do note that you will need ppa-purge installed, which can be done like so:

sudo apt install ppa-purge

If updating is not an option (too old of a card, company policy, etc):

Kai-Heng Feng of Launchpad has been kind enough to upload a version of Unity to his own PPA (ppa:kaihengfeng/lp1292830) that should patch this issue. In order to resolve this problem, just add his PPA by running these commands:

sudo add-apt-repository ppa:kaihengfeng/lp1292830 
sudo apt update
sudo apt full-upgrade

After you're done, reboot your system or restart X11 by logging out and then back in.

Alternatively, you can also do any of the following:

  • Switch to the Intel card
    If you're running NVIDIA Prime, you can swap over to the Intel card, which will resolve this issue. Note, however, that it will prevent the system from using full graphics power.
  • Downgrade Drivers
    According to some comments on the bug-report, downgrading to NVIDIA driver 367.57 should resolve the issue completely. As this is no longer present in the PPAs, you'll need to download it directly from NVIDIA (64-bit) (32-bit) (32-bit ARM).
  • 367 does no longer seem to exist, both in the official Ubuntu repos as well as in the graphics-drivers/ppa PPA, that package is a "transitional package for nvidia-375, so installing it will automatically get you the buggy 375 version. If you know a source where to get the old 367 driver from, you should include it into your answer.
    – Byte Commander
    Apr 1, 2017 at 13:16
  • @ByteCommander done
    – Kaz Wolfe
    Apr 1, 2017 at 17:37
  • FYI in case you missed it, the patched driver is now in the official repo. Jul 29, 2017 at 12:27

The solution proposed by Victor A. works just fine. However, you should note that the scripts placed in /lib/systemd/system-sleep/ are executed both when the computer goes to sleep and when it wakes up. Given that we only want the later, using the proposed script slows down the going-to-sleep process unnecessarly. I recommend the following one:

if [ "$2" = "suspend" ] || [ "$2" = "hybrid-sleep" ]; then
    case "$1" in
        post) kill $(ps -C compiz -o pid=) ;;

A warning, though. This script (as well as the one proposed by Victor A.) will disable the password prompt screen on wake-up, thereby constituting a security risk.


This problem has also been fixed in the Nvidia 375.66 driver, which is in the normal repositories, and should be installed by the normal updates.

  • Nice sleuthing! I have updated my answer to reflect this new development, and credited you for discovering that there is now a patched version in the official repo :) Jul 1, 2017 at 21:15

This isn't a full solution but it may be better than using compiz --replace or otherwise restarting compiz and messing up your workspaces.

When I resume from suspend, I do this:

  • System -> Preferences -> Appearance
  • Change Theme to different Theme
  • Change back to original Theme

This will reload what appears to be corrupted textures in the GPU. If there is a way to automatically force the theme textures to be reloaded on resume, that might be a permanent solution.


There is an another way to solve this problem. (I don't recommend it if you have lots of processes running.)

Just kill Xorg after waking up the computer.

Find the PID of Xorg by:


When you find the pid of the Xorg, push Ctrl + C to stop the "top" process.

Go to root and kill the process by:

sudo su
kill [pid]

After that, login to your account.

Warning: this will close all of your applications. Firefox doesn't make a problem about this, it will just restore all of your tabs, but I can't guarantee other apps, so save them before doing this process.

  • 2
    By the way, to close top the standard way, rather than just cancelling the task (Ctrl+C) you can just hit 'q'.
    – anonymous2
    Mar 30, 2017 at 11:35

I tried changing the driver to the updated bug-fix one, but it was screwing up my ability to do deep learning with tensorflow, so I went back to the original buggy software.

This happens every time I wake up Ubuntu from sleeping. I just open up a terminal CTRL+ALT+T and type

killall compiz

The display resets and the glitch is gone. It only takes a few seconds. You could even alias it in your ~/.bashrc like alias kc='killall compiz' so you only have to type kc when you want to execute the command.

You must log in to answer this question.

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