I used to have g15macro installed a while back when I noticed the CPU usage creeping up. I read on the G15Tools forums that inserting a usleep(5000) in the main thread solved the issue for one user so I did the same on mine. So far I haven't seen any usage increases, but I haven't been running it for too long. I'll check again in the morning.
Apart from that, I noticed that the M buttons didn't light up when switching and would only light up whenever I finished a recording. They would function just fine, only the lights would switch only when ending recordings. This also effected the MR button so it would never light up (by the time you end recording the light is off anyway).
I ran in debug mode and found that the record_cleanup() method always ran:
g15_send(g15screen_fd,(char *)canvas->buffer,G15_BUFFER_LEN);
before:
g15_send_cmd (g15screen_fd,G15DAEMON_MKEYLEDS,mled_state);
I added the same line to the handle_mkey_switch method and to occur on the MR keypress and it has solved the issue. Now my buttons light up as they are expected to.
Does someone want to implement this change or should I be able to commit my file? I'm attaching my g15macro.c file here for anyone to compile.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
g15macro source with light fixes
I messed up and submitted that with the wrong account...
Ok, in my testing, overnight I'm up to a steady 4% CPU usage... Which still seems way too high. So I don't think the usleep is working too well.
For now I have Compiz-Fusion set up to run two commands with hotkeys. Ctrl+Alt+m > g15macro and then Ctrl+Alt+n > killall g15macro so I can start and kill the process whenever I want to start or quit using it. Definitely not optimal, but it'll do for now.