Ever since I wrote pommed, a really painful bug existed: after suspend, some event devices (anything USB-related) disappear and pommed must reopen them, and sometimes it failed to do so.
The problem is that the event devices can take an unspecified amount of time to reappear, and sometimes it exceeds the timeout set in pommed. To add insult to injury, depending on the machine and the setup, it can work every time, fail every time, or anything inbetween.
I’m very happy to tell pommed users that this problem is finally fixed. It’s in the SVN trunk for anybody who wants to test it, and I’m interested in feedback on that fix.
Now the gory details: I’ve rewritten all the event handling to use epoll() instead of poll() and added an inotify watch on /dev/input to catch newly created files. epoll() wasn’t necessary for that, but it’s more convenient to use compared to poll() when the list of fds to watch is dynamic.
Also, I’ve been asked to add support for the external Apple USB keyboards. Thanks to Carmine Paolino for this request which gave me the idea for the inotify watch, which is the real fix for the aforementioned bug.
If you have such a keyboard and its USB product ID is not 0x020c nor 0×0221, please mail me with the ID and the model name.
0 Responses to “Pommed: long lasting bug fixed, at last”