11

My system updated the long lived branch Nvidia drivers to 375.39 yesterday. The problem is that now, when the computer goes to sleep, then wakes up, some windows are buggy:

enter image description here

The same happens with terminal windows. I tried the short lived branch latest drivers, the 378.13, it is the same problem. What can I do ?

Update: Now the drivers 375.39 are the official Nvidia drivers available from the Ubuntu repository, yet the bug evoked above is still there.

12
  • The 375 drivers are installed from an unofficial PPA. So problems with them are off-topic. Install nvidia-367. And/op remove the PPA, since the 367 is from there as well.
    – Pilot6
    Feb 15, 2017 at 17:46
  • @Pilot6 I added the ppa via: sudo add-apt-repository ppa:graphics-drivers/ppa How do I remove it correctly so as I revert to the original Ubuntu installation ?
    – Henry
    Feb 15, 2017 at 18:04
  • See the answer.
    – Pilot6
    Feb 15, 2017 at 18:22
  • And what is the video card?
    – Pilot6
    Feb 15, 2017 at 18:23
  • @Pilot6 nvidia gtx 1070
    – Henry
    Feb 15, 2017 at 18:25

4 Answers 4

7

I have also reported the same issue to Ubuntu nvidia-graphics-drivers-375 package in launchpad. The workaround I found was to click an effect button in CompizConfig Setting Manager --> Effects.

I also described another issue for this driver and a temporary work around here.

For those affected, please help to add your voice to the launchpad bug report.

Update: I have shared a better temporary solution in that bug report that removes the bad window borders every time the computer wakes from suspend mode. See comment 13. Pending NVidia to provide a more permanent fix.

Update2: Pls also see comment 44. This workaround is suitable if you are using Ubuntu 16.04.2 LTS with kernel 4.8.0-xx instead of kernel 4.4.0.xx.

Update3 (8th Apr 2017): The new 381.09 beta driver with the bug fix is now available. Use 381.09 driver instead of 375.39 or 378.13. See comments #54 & #55.

Update4 (1st June 2017): The new 375.66 driver was released on 4th May 2017 with fixes to resolve many of the bugs related to 375.39. I have used it since it was made available by "Graphics Driver" team ppa and I have not encountered any issues, works great with 16.04.2. Use driver 375.66 as it is the latest long-lived branch release, else use driver 381.22(which takes over 381.09).

13
  • Filed a bug report to the link you gave.
    – Henry
    Mar 25, 2017 at 18:00
  • Just disabling the "Fading Windows" Effect in CompizConfig fixed it for me. Thanks. Mar 26, 2017 at 1:47
  • So it seems I have to toggle "Fading Windows" on and off each resume. Killing compiz altogether seems a little overkill... pardon the pun. Mar 26, 2017 at 17:21
  • @RayfenWindspear My initial tmp solution was toggling the various effects in compiz. Just like what you are describing. Subsequently, i moved on to deleting compiz and found this tmp solution better.
    – Sun Bear
    Mar 26, 2017 at 18:21
  • @Henry Thanks. Hope NVidia/Development Team becomes motivated to fix the issue soon.
    – Sun Bear
    Mar 26, 2017 at 18:36
5

Not really a perfect fix as it doesn't solve the issue but, to recover after the driver glitches upon waking from sleep you can open a new terminal and just relaunch unity via...

blahblah@Computer:~$unity

Some programs don't always recover nicely (eg: chrome will have to be relaunched), but its a bit faster than restarting or logging out / in.

3

The 375 and 378 drivers are installed from an unoffical repository and are not proven to be working with Ubuntu without any issues.

You can remove the drivers by

sudo apt install ppa-purge
sudo ppa-purge ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-367

This will install the officially provided Nvidia drivers.

4
  • I have done it. Now if the Nvidia drivers are updated on the official PPA of Ubuntu, will the update manager offer the new drivers ?
    – Henry
    Feb 15, 2017 at 23:46
  • Yes, when the drivers are updated in Ubuntu repositories, they will be offered for installation in the "Additional Drivers" tab.
    – Pilot6
    Feb 16, 2017 at 5:19
  • 1
    The 375 drivers are now merged into the 16.04 and 14.04 repos as per a security issues. If you are running 16.04 or 14.04 DO NOT follow this old advice. Mar 26, 2017 at 19:23
  • I agree. 375 will be installed. But I do not have any issues with them. nvidia-367 will pull the 375.
    – Pilot6
    Mar 26, 2017 at 19:25
3

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:

#!/bin/sh
## 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
3
  • 1
    This is the tmp solution that i had posted comment 13 . Glad it works for you.
    – Sun Bear
    Mar 26, 2017 at 18:28
  • Yes, Sun Bear, thank you for writing such a wonderful script. It worked like a charm. Actually I think this script might stay there even if and when NVIDIA fix their drivers. It refreshes compiz without any noticeable delay.
    – Victor A.
    Mar 27, 2017 at 10:08
  • Nvidia driver 381.09 is out. Use it as it fixes the bug. :)
    – Sun Bear
    Apr 9, 2017 at 14:11

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