Woke up this morning to find ubuntu not detecting left-clicks. Tested on two mice, same behavior. It was maybe registering 1 out of every 15 or so. I reinstalled all the packages that had "mouse" or "input" in the name, and the behavior seemed to improve. The side panel and desktop were both "clickable" and I could click most things in Chrome except the location bar and the tabs. After a short window of functionality, it has started to become more intermittent. Much of the time clicks work, but every once in a while they stop for 5-10 seconds. At this point I usually start clicking somewhere else, and when I go back clicks work again.
Running xinput query-state verifies that even when holding the left mouse button down, xinput sometimes registers it as up.
Searching finds a few cases of this happening, and even one with 14.04, but no solutions. Is there something else I can try reinstalling?
Update: Clicking on the desktop is never registered. After clicking on the desktop and going back to Chrome, clicks are not registered until I move the window. Once I move the window, all clicks are registered. I have replicated this at least 10 times, including after a restart.