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.

Henry
  • 654
  • 5
  • 9
  • 16
  • 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 '17 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 '17 at 18:04
  • See the answer. – Pilot6 Feb 15 '17 at 18:22
  • And what is the video card? – Pilot6 Feb 15 '17 at 18:23
  • @Pilot6 nvidia gtx 1070 – Henry Feb 15 '17 at 18:25
  • Oops. then you have no choice but use unofficial drivers. Please unaccept the answer, so I can delete it. – Pilot6 Feb 15 '17 at 18:28
  • @Pilot6 367.57 drivers seem to work with my card and from Nvidia website, they support the gtx 1070 ? – Henry Feb 15 '17 at 18:49
  • According to Nvidia site the 10xx are supported by 375+ drivers. – Pilot6 Feb 15 '17 at 18:53
  • http://www.nvidia.com/Download/driverResults.aspx/108586/en-us – Henry Feb 15 '17 at 18:56
  • Hm, I searched for drivers on their site and it gave 375 and 378. If ny answer works, then I am undeleting it back, so you can accept it again ;-) It is good to know that. – Pilot6 Feb 15 '17 at 18:58
  • Yes, please write it back, so I can remove the ppa and revert back to the official PPA – Henry Feb 15 '17 at 19:00
  • Why is this question marked as duplicate of more recent questions? This question is 1 month old. It is marked as duplicate of questions 17 to 18th days after it. Should not the more recent quest be marked as duplicates of an older question? I recommend a correction is needed. – Sun Bear Apr 06 '17 at 12:42

4 Answers4

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).

Sun Bear
  • 2,302
  • Filed a bug report to the link you gave. – Henry Mar 25 '17 at 18:00
  • Just disabling the "Fading Windows" Effect in CompizConfig fixed it for me. Thanks. – RayfenWindspear Mar 26 '17 at 01: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. – RayfenWindspear Mar 26 '17 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 '17 at 18:21
  • @Henry Thanks. Hope NVidia/Development Team becomes motivated to fix the issue soon. – Sun Bear Mar 26 '17 at 18:36
  • Nvidia doesn't give a crap about the Unix community. When it comes, the fix certainly won't come from them. It's probably an issue with Unity anyway, so I very much doubt that Nvidia could do anything about this even if they wanted to. – RayfenWindspear Mar 26 '17 at 19:20
  • @RayfenWindspear From https://devtalk.nvidia.com/default/topic/990898/linux/suspend-corrupts-window-manager-after-upgrade-to-378-09/2 it seems that Nvidia is working on it. They do not give any timeframe though. – Henry Apr 03 '17 at 21:00
  • @SunBear Would you know when the official Ubuntu repository will be updated ? – Henry Apr 08 '17 at 19:09
  • @Henry Sorry, I don't know. But Michael at Graphics Driver Team ppa has uploaded it. You can easily access it. See Update3. I have installed it in my system and it works. – Sun Bear Apr 09 '17 at 13:11
  • I just upgraded and I still have the issue: http://imgur.com/GyJM3uU – MalcolmOcean Apr 23 '17 at 13:33
  • @MalcolmOcean Have you tried rebooting your system and re-checking if the problem persist? If the problem still persist, the alternatives i know is to use workarounds while you check with Nvidia your issue. BTW, which Ubuntu version and kernel are you using? – Sun Bear Apr 24 '17 at 06:23
  • 4.4.0-71-generic #92-Ubuntu SMP Fri Mar 24 12:59:01 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux – MalcolmOcean Apr 25 '17 at 13:44
  • I currently have an alias which restarts compiz, so I'm getting by. It's alias fixglitch='nohup compiz --replace &' if anyone's curious. – MalcolmOcean Apr 25 '17 at 13:46
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.

Gavsum
  • 51
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.

Pilot6
  • 90,100
  • 91
  • 213
  • 324
  • 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 '17 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 '17 at 05: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. – RayfenWindspear Mar 26 '17 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 '17 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
Zanna
  • 70,465
Victor A.
  • 126
  • 3
  • 1
    This is the tmp solution that i had posted comment 13 . Glad it works for you. – Sun Bear Mar 26 '17 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 '17 at 10:08
  • Nvidia driver 381.09 is out. Use it as it fixes the bug. :) – Sun Bear Apr 09 '17 at 14:11