-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] High CPU usage in certain circumstances #106
Comments
Hi! Thanks for reporting these issues!
Fixed in Clightd 4.0-2 (https://aur.archlinux.org/packages/clightd/). Thanks!
SMplayer uses mpv as backend. Unfortunately org.freedesktop.ScreenSaver support is broken in mpv at the moment. I have the same issue. I just right click on clight desktop file and select "Pause backlight calibration"; or you can use eg: vlc!
This is weird! Can you report here output of:
This is weird; i cannot reproduce it here. Your log seems fine. |
Aha! I thought there was a Cmake flag missing. 😄️ Thanks!
I re-enabled keyboard backlight calibration and I'll see if I can catch something abnormal in the log. |
Note how kbd backlight is set to (1.0 - backlight_level) * max_kbd_backlight (in your case 2): https://github.com/FedeDP/Clight/blob/master/src/modules/backlight.c#L268. Let me know about the other issue too! Thanks! |
I’ve also experienced the issue with the clight process using a lot of cpu a couple times. I haven’t been able to pinpoint when this occurs or what causes it, I usually only notice once I feel my laptop warming up abnormally. Killing and starting the clight process fixes this. I’ll leave on the verbose setting and attempt to share the log the next time this occurs. |
Great, thanks for joining! I have been using clight devel for months and it didn't occur here, or I didn't notice... EDIT: care to share your configs @yochananmarqos @NICHOLAS85 ? |
Here’s a link to my current config file: |
Here's my |
I noticed a webcam error in my journal after rebooting:
Only one error in the
|
You both have dimmer dpms and gamma disabled. I will try with this config if i can reproduce the issue!
That should not be an issue.
This is interesting. It seems that XGetImage() fails here: https://github.com/FedeDP/Clightd/blob/master/src/modules/screen.c#L95. |
I can't reproduce the issue with the keyboard backlight now. Maybe it was a fluke or kernel 5.4 fixed it. It fixed not being able to resume from suspend, so you never know. ¯\_(ツ)_/¯ |
Let's focus on high cpu bug then! |
clight.log |
Mmmh I can't see anything wrong there. Is clightd.service enabled? |
Yes, heres an output
|
It seems disabled though: Btw stil unable to reproduce it here unfortunately, even with your configs :( |
Here's a log where the keyboard backlight did not come on in a dark room and and it did not adjust the backlight at all. |
It seems like Clightd is not working well here: SCREEN module is failing to retrieve screen brightness and webcam captures return 0.00000 ambient brightness. I always though 0.0000 was an impossible number for ambient brightness...is your room this dark? I think Clightd is misbehaving here... |
Yes, it was very dark. I was watching videos at night. I just updated to kernel 5.4.1, I'll see if there's any change tonight. |
The log was the same tonight, but I caught it chewing on the CPU again. When it happens, it stops logging. The |
Still i think that 0.00000 is an unreachable value...the issue itself can be quickly fixed (i should just set shutter_threshold default value to < 0 when conf option is commented), i'd like to understand if it is a normal value (if you can reproduce the "0.00000" ambient brightness it would be great!).
Interesting! I was not able to reproduce it yet.
It is because Clightd is now always resetting webcam default values before capturing to avoid captures with different parameters! |
@FedeDP, sorry for the late response. It is true clightd was somehow disabled at some point but still functioning. I've re-enabled it for now and will continue to try to narrow down the environment causing clight to get stuck using high cpu. I can also confirm that the process is clight and not clightd which has this CPU problem. I believe I've noticed it happening most after wakes from hibernation, but not 100% of the time. |
Thank you very much!
Great information, thanks.
That is unfortunate...my laptop does not support hibernation very well thus i would not be able to test it... |
Any news on this topic? |
The high CPU issue hasn't resurfaced at all for me. |
That is great! But it still leaves us with some unresolved questions... |
High CPU resurfaced once again, it had been quite a while since it last occured. I rebooted after updating many packages including my kernel and such. Noticed the high cpu shortly after the reboot. Log attached: clightlog.txt |
Once more i can only see an unusual error about get_screen_brightness call. |
I've set no_screen to true and I'll let you know if it occurs again. Merry Christmas! |
Yup it is not an issue; ie: it means that Clight is restarted before your webcam/screen is properly restarted, thus it may fail to eg: change gamma temperature/get screen brightness/use webcam.
That is very unfortunate :( |
The log looks like this. |
Unfortunately once more nothing is shown in there :( I am currently unable to fix it anytime soon, as i was hit by that like 2 times in 6 months; i will probably release clight 4.1 soon, even if this bug persists, as it is too rare to block a release with so many improvements and bugfixes. After that, i will hopefully find the time to carry on libmodule 6.0.0 (https://github.com/FedeDP/libmodule/tree/devel) and consequently clight + clightd porting to new API. |
Hi everyone! |
libmodule 5.0.1-1, clight 4.2-2, clightd 5.1-1. Still there unfortunately. |
Just got hit with it again after months unfortunately with the latest commits as of today. |
Sigh 😔 that was worth a try. |
Hi all, the only error I see on logs is : I never had issue with clight on other installs. |
Clight and clightd master branch 12/2/2021 Each time I start clight, after a delay it consumes 100 % of one core. I must terminate clight. I can't use clight. No problem with package clight 4.2 and clightd 5.1. |
It this 100% reproducible? Does it happen every time? |
It's a random phenomenon. No problem for 20 mn. |
Again this morning. |
I don't think that's the root cause; anyway thank you very much! You are getting hitted by lots of weird bugs, i am sorry. |
I updated yesterday. Is there a new master branch version today ? |
Just pushed! |
To everyone: i recently added some more debug logs that should greatly help finding the root cause; i am optimist that we can fix this!
Then wait some seconds and finally kill clight. |
User @NICHOLAS85 got it by this with new clight master. I can now tell that the issue comes from "Inhibit" dbus monitor that seems to get crazy and continuously report monitor fd as readable. |
3 mn => 560 MB log ! i give you an extract : the beginning and the end. The problem occurs at the same time there were many disk accesses. |
@promeneur yay!! Thank you very much! I will fix this bug finally O.O |
…oping on our dup fd; instead, close our own monitor bus connection and open a new one.
New git master should have a proper fix! It seems like the "inhibit" dbus monitor connection is closed by peer (ie: dbus server most probably; not clight) for some reasons; and i was not actually checking the condition. |
This bug is (finally) fixed in latest Clight master! |
Clight version the issue has been seen with:
Used distribution:
Describe the bug
A few things:
Is there a missing Cmake flag in the PKGBUILD?
When I start my laptop (Dell Inspiron 5575) on battery power, the
clight
process uses a lot of CPU and no log is generated. If I killclight
, restart theclightd.service
and startclight
again, everything is fine.When keyboard backlight calibration is on, the backlight does not come on at all in the dark. It kind of defeats the purpose of having a keyboard backlight.
When dpms is enabled, the screen turns of while watching a full-screen video. I use SMPlayer.
Expected behavior
Self-explanatory.
To Reproduce
Normal use.
clight.log
The text was updated successfully, but these errors were encountered: