I've thought I had this fixed a few times but no.
Sometimes immediately after I boot the computer and log in mouse clicks don't work. Sometimes it will work fine for hours before it breaks. But it always breaks.
There's nothing crazy about the environment. Fresh install of Ubuntu 16.04 on a two monitor computer with a GTX1070.
Believe me I have googled this and have been trying the things suggested but none of the solutions I've tried have fixed it.
Mouse clicks seem to work fine so long as I stay inside a window, assuming the inside of the window receives focus in the first place. But clicking the window's title bar and clicking into other windows is a gamble every time. Will this be the time it breaks? Maybe not if I spin around in a circle three times.
I'm confused how this is not a bigger issue. Fresh install of Ubuntu. GTX1070. Latest drivers. The mouse stops functioning constantly. It just seems like this bug is so obvious that there should be more people complaining about it.
unity --replace
kicks it enough that sometimes I can temporarily regain control.
Ubuntu with a GTX1070???????????? Is that insane?
Update - new theory seems to be panning out. I'm dual booting windows 10. I think it's got something to do with if I boot into windows 10 and then restart instead of shut down. I haven't had any issues in a couple days. - That seemed to work great. No issue for like five days and then it started happening again. Shut down or restart do not fix it.
Update 2 - It's been three days a couple weeks and no problems. I've been using a Corsair Void gaming headset since I installed Ubuntu. I've had zero problems since unplugging it. Here's a similar thread. Answer - it's the corsair void headphones.