Ubuntu 16.04 - Unity - Laggy window resize when using NVIDIA GPUs
After some time trying to ignore the resize window lag I hit my limit, every time I have chrome, chromium or any electron enabled app running the window resizing becomes excruciatingly slow in Unity.
After some searching around and looking in Chrome/Chromiums bug databases it seems that whenever you run the browser with GPU acceleration enabled this issue occurs. If it's NVIDIAS fault or if it's the devs behind Chrome/Chromium I can't say... But I did manage to find a fix for it.
Do note that this doesn't apply if you're using the Nouveau driver.
So, how to fix it?
In Chrome/Chromium you can just go in under Settings and expand the Advanced options, you will find a checkbox there named "Use hardware acceleration when available", uncheck and restart and that one is fixed.
If you use electron based apps such as Skype for Linux Alpha; Sublime; Atom; or Slack you will need to modify each applications launcher file and add
to it's startup args.
I'll provide an example of how I fixed Sublime Text, rinse and repeat for any other electron app you have installed and if needed.
$ locate sublime_text.desktop /usr/share/applications/sublime_text.desktop vi /usr/share/applications/sublime_text.desktop
When you have opened up the file, find the Exec= part and insert --disable-gpu like this
Version=1.0 Type=Application Name=Sublime Text GenericName=Text Editor Comment=Sophisticated text editor for code, markup and prose Exec=/opt/sublime_text/sublime_text --disable-gpu %F Terminal=false MimeType=text/plain; Icon=sublime-text Categories=TextEditor;Development; StartupNotify=true Actions=Window;Document;
That's it, hopefully this will get you smooth responsive window resizing restored while we wait for a fix from the NVIDIA and/or Chrome/Chromium teams.