Join GitHub today
Fix solaar start issues #382
Solaar initialization on Fedora has become problematic over time. With Fedora 25, sometimes, I had to start it a few times, until it gets everything right. On Fedora 26, things got a lot worse: most of the time, it just doesn't even report the Unified Receiver. When it reports, it takes a lot of time, as it waits for a timeout from g-io-error-quark.
This patch series contain the fixes needed to make it work. After that, Solaar is smoothly detecting both my mouse and Keyboard every time it starts.
On this series we have:
patch 1 - that's actually a minor fix for solaar CLI and Anywhere Mouse MX 2, in order to prevent an error when calling via command line;
patch 2 is actually a hack: efectively it disables the python Notify extension, with doesn't seem to be working here with Fedora 26. I've no idea about how to properly fix it, but Solaar works just fine without it.
patch 3 solves a race condition at the listener logic that registers a new device. It took me a lot of time to discover the root case, as, at least on my i7core machine, turning debug on is usually enough to solve the race issue.
patch 4 solves another race condition: if Solaar are receiving lots of notifications at the time it starts (for example, if the mouse is moving), it loses the registration events, as the queue size is only 16, and it takes several seconds to register the Anywhere Mouse MX 2 mouse.