ccMSC / ckb

RGB Driver for Linux and OS X
http://forum.corsair.com/v3/showthread.php?t=133929
GNU General Public License v2.0
1.34k stars 170 forks source link

CKB-DAEMON consumes 25% power of the CPU after start from hibernate/sleep mode #563

Open mrstanlez opened 7 years ago

mrstanlez commented 7 years ago

This is a problem related to my keyboard K70 RGB. OS is Linux 64 bit Manjaro XFCE 4.8(icon in systray dissapears always after start up from hibernate/sleeping mode).

CPU is used 25% of power with difference with normal start only 1% maximum. The process is ckb-daemon the consumes so more cpu power.

Please can You fix this issue ?

algtmatt commented 7 years ago

I've had the same high cpu usage issue with that keyboard, https://github.com/mattanger/ckb-next fork seems to be a bit better.

ghost commented 7 years ago

I'm afraid there's no easy solution for Linux. MacOS has this line which can be commented out.

mrstanlez commented 7 years ago

I dont think so. Because after normal start all is under 1% power usage. So only we must think, how to restart ckb-daemon like it was from normal start. Correct ?

2017-01-19 19:41 GMT+01:00 Oleksii Vilchanskyi notifications@github.com:

I'm afraid there's no easy solution for Linux. MacOS has this https://github.com/ccMSC/ckb/blob/master/src/ckb/main.cpp#L15 line which can be commented out.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ccMSC/ckb/issues/563#issuecomment-273860921, or mute the thread https://github.com/notifications/unsubscribe-auth/AX_e-z2uM1-NEg4ELX91B4kLgaI3Q_5zks5rT65fgaJpZM4Lk07e .

ghost commented 7 years ago

I'm not yet aware of ckb codebase, this string was just what I found so far. And I didn't find any similar one for Linux. By "no easy solution" I mean without extensive refactoring of the codebase because I suppose there isn't any easy fix either.

tatokis commented 7 years ago

To me it sounds like after waking up, something goes wrong with the daemon, a pthread goes loose and starts taking up 100% of one core. @mrstanlez is your CPU a quad core?

mattanger commented 7 years ago

That is strange. So, for sure, does this happen when resuming from sleep and hibernation? Or more often with one or the other?

On Jan 19, 2017 6:40 PM, "Tasos Sahanidis" notifications@github.com wrote:

To me it sounds like after waking up, something goes wrong with the daemon, a pthread goes loose and starts taking up 100% of one core. @mrstanlez https://github.com/mrstanlez is your CPU a quad core?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ccMSC/ckb/issues/563#issuecomment-273933839, or mute the thread https://github.com/notifications/unsubscribe-auth/AFM7GrgSR7yOt0rX1Q2Ttzk1i4Z4cn7fks5rT_RtgaJpZM4Lk07e .

mrstanlez commented 7 years ago

Hi to All, yes if the system resumes from sleep or hibernation. I resume with vlc and thunar, but only ckb-daemon will comsume a lot of power cpu. Ckb application is good, but this problem still exists. Only one solution is kill ckb-daemon and restart ckb with keyboard re-plug from USB port 3.0.

Dňa 20. 1. 2017 2:05 dopoludnia používateľ "Matt Anger" < notifications@github.com> napísal:

That is strange. So, for sure, does this happen when resuming from sleep and hibernation? Or more often with one or the other?

On Jan 19, 2017 6:40 PM, "Tasos Sahanidis" notifications@github.com wrote:

To me it sounds like after waking up, something goes wrong with the daemon, a pthread goes loose and starts taking up 100% of one core. @mrstanlez https://github.com/mrstanlez is your CPU a quad core?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ccMSC/ckb/issues/563#issuecomment-273933839, or mute the thread https://github.com/notifications/unsubscribe-auth/ AFM7GrgSR7yOt0rX1Q2Ttzk1i4Z4cn7fks5rT_RtgaJpZM4Lk07e .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ccMSC/ckb/issues/563#issuecomment-273947805, or mute the thread https://github.com/notifications/unsubscribe-auth/AX_e-7e9J7CdsZY7kvv8p8xk_EJbsSKfks5rUAhagaJpZM4Lk07e .

frickler24 commented 7 years ago

@mrstanlez: To get an idea what the daemon is running, please give us some more infos:

  1. running top or similar cmd, find out the PID of the cpu consuming process.
  2. then run "sudo strace -p PID-YOU-HAVE-FOUND 2> /tmp/foo"
  3. after 1-2 seconds abort it by pressing CTRL-C
  4. Have a look at the file /tmp/foo I think you will read endless loops of the same steps (open a file or select or something similar)
  5. Copy some of that loops into this issue here or attach the whole file (may be huge, depending on your CPU speed :-)).