I'm using Ubuntu 16.04 and every time i focus on a window i have small lag. Also On Minimize and Unminimize Effect It has small lag.
I played a video for a test and disabled Ubuntu Unity Plugin in Compiz. then Ubuntu panel and window titles gone. focused video window and then compiz window and the lag was gone.
How can i fix this problem?
Installed: Nvidia 361.42 Driver and Processor microcode firmware.
Ram: 6GB
CPU: i7 920
VGA: GeForce GTX 660 TI
Edit: For example, on Video player window focus, the movie lag around 800ms.
I've observed the same issue, but it's only noticeable when playing a graphically intensive game or watching a youtube video in my browser. In these cases, the game/video freezes in place for about half a second upon changing focus, and then resumes as normal. With sloppy focus, if I move the mouse rapidly between 2 windows, I can keep the video frozen on the same frame almost indefinitely.
Disabling the Ubuntu Unity Plugin does completely remove the lag, but of course that's not a real fix as it leaves you with a half-functional GUI.
So far the only solution I am aware of is switching to a non-Unity desktop environment. I'm partial to openbox, though there are plenty of choices here.
Probably the same issue as CPU spikes and performance problems changing window focus in Unity/Ubuntu 16.04.2.
I'm also seeing this on 16.04 with i5-4460 and a GTX 960 on a 32bit system (don't ask!) I don't see it with nouveau drivers but I do with the NVidia proprietary ones (all I've tested up to 381.13.)
Although not a proper solution, restarting unity by using
unity --replace
seems to work around the issue for that session. (You might need to try it again if it doesn't work first time.)This could be related to bugs.launchpad.net/ubuntu/+source/unity/+bug/1300892. If you think that bug affects you then please do click "This bug affects me" at the top so that the maintainers get a good reflection of how many people this bug impacts as this is currently triaged as a low priority bug.
EDIT: It seems that adding the command
/usr/bin/unity --replace
command to "Startup Applications" does work okay as a kludgy but less temporary workaround. :)