-
Notifications
You must be signed in to change notification settings - Fork 500
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
compton not working at all (all windows become invisible) at this date: 2012-09-26 #47
Comments
I hope you do understand what is a correct value for compton -Cc -fF -I.015 -O.03 -D10 -t-1 -l-3 -r4.2 -o.5 Oh, of course, I'm talking about the situation after I change the fading mechanism, so we expect that you use the latest version from the master branch. Why a negative value was working beforehand I truly have no idea, it shouldn't have worked. |
Thanks for your answer, richardgv.
So, if I use the updated command you've mentionned above (compton -Cc -fF -I.015 -O.03 -D10 -t-1 -l-3 -r4.2 -o.5) all windows completely disappear (I mean permanently). If I use the example mentionned in the README (compton -cC -fF -I 0.065 -O 0.065 -D 6 -m 0.8 -i 0.6 -e 0.6), all windows disappear. If I use this: compton -cC -fF -I 0.9 -O 0.9, all windows disappear. Unless I don't understand it at all (which might be an option, and if so I would be happy you explain me why) there is something wrong, isn't it? (using very last github version) Thanks |
On top of my above comment, I have another problem with these compton options:compton -Cc -fF -t-1 -l-3 -r4.2 -D1 -O.03 |
...and finally, the CPU consumption of the current version is much above the one of the "previous" version. With the "previous" version, the cpu consumption is not noticeable (using htop). Just let me know if you want me to provide more info, create separate bug reports, ... Cheers |
Ok, here are more info. After multiple tries, I reach that step: 'HEAD is now at 0d67243 Feature: Issue #29: Alternative shadow blacklist implementation' ---> I still have problems. Then I do another 'git reset --hard HEAD~1' Then I reach that step: 'HEAD is now at 8724101 Bug fix: Detect and mark WM windows as active' . So, it seems it's the commit 'HEAD is now at 0d67243 Feature: Issue #29: Alternative shadow blacklist implementation' that is the problem. Cheers |
Thank you for your efforts to diagnose the issue. All the problems you reported sound really scary... And I really have no luck reproducing even a single one of them. Tried fvwm and Openbox, simply no luck. And chjj, seemingly, didn't notice the problem, either. The only problem I noticed in your commandline switches is I suspect this is a timing-related issue, which are, super-annoying. I would recommend you to find out the minimal commandline switches that could trigger this issue.
Nope. Although -I1 looks abnormal, it's handled in the identical way other -I values are. Well, slightly there's a difference in timing. And does this happen if you don't use
Permanently? Hmm, you just mean compton does not render the windows, right?
Which is strange, as the default
I compared the CPU usage of old/new compton with pidstat. I'm using more options, and during the tests I minimize, restore, close, open, and move windows with roughly the same speed. I noticed no significant different in the CPU usage of compton process. (The CPU usage of X process caused by compton's requests couldn't be accurately measured.) My CPU is Intel Core i7 3770K, so it's not surprising if my CPU usage values look lower than yours.
It's so weird because 0d67243 isn't a commit about fading at all. I don't actually see a line of code about fading changed in this commit. |
-r option indeed changes nothing. I've set it as integer now. with minimal command: compton -f -I0.03 => problem already occurs with that. I mean no window is rendered (not even bmpanel2) compton -f -I0.028 doesn't work either Let's forget the cpu usage thing now. I've tried to kill the processes that might (maybe, who knows) interfere with compton (unclutter, bmpanel2, cbatticon, volumeicon) but not change. Any idea of the next steps ? |
This sounds absurd. Absurd indeed... valr, is it possible for you to come to #compton on FreeNode right now? I couldn't reproduce this issue on my side, and I would probably need somebody to add temporary debugging code and execute them. It could be much more efficient if there's a way to contact instantly. Update: |
As discussed, it's a locale problem. Indeed, numeric values under my locale (fr_BE.UTF-8) e.g. 0.03 should be written 0,03 to work. Thanks a million, richardgv! |
A locale using comma instead of dot in floating point values causes unexpected behavior when parsing floating point commandline arguments. This commits enforces LC_NUMERIC="C" during commandline argument parsing.
A big big problem caused by a small small thing indeed. :-D 0d67243 sets libc locale to system locale in order to get the non-ASCII characters in window titles right, thus triggering the issue. Thanks for all your help in the investigation, valr! :-) The performance problem still needs attention, therefore, not closing yet. |
Here are some stats with: pidstat -u -C "compton" 1 20 before version (20120918) Moyenne : PID %usr %system %guest %CPU CPU Command current version Moyenne : PID %usr %system %guest %CPU CPU Command Now, I have to do profiling to see where is the problem, if any. My machine: dell inspiron L501X, core I7, nvidia GeForce GT 435M. |
I did another test, and this is embarrassing: Looks like the old compton is using 50% more CPU: https://gist.github.com/3797583
I tried your switches My system: Intel Core i7 3770K, nVidia Geforce GTX 670, pf-sources-3.5.4, x11-drivers/nvidia-drivers-304.51. I don't think graphic card has anything to do with the CPU usage of the compton process -- it should only affect X process. If you wish to do profiling, I personally use OProfile-0.9.8. Thanks. :-) |
It's amazing how different systems react differently :-) My above figures were reported without taking any action. I mean I had 3 xterm opened and was just doing nothing (no window move, ...) and without any activity the cpu consumption is much above. Of course it might not be a fully valid test case but I find those figures interesting. I'll look at it i.e. use your options and your action sequences and see the result. Note that it might take me few days before I can post any result (plenty of stuffs for work & at home). But the most critical thing (windows disappearing) has already been fixed. Thanks for all. |
It's absurd that doing nothing could let compton use so much CPU resources. 200 seconds, during which I do nothing but typing in Firefox window, and the average CPU usage of compton is 0.16%. I suspect there's some windows on your system causing the excessive CPU usage. Please try closing all the windows one by one. Enabling event debugging (add |
Ok, here are some more info: this is the commit that causes problem on my system: 778a8b1 Improvement: Change fading mechanism, and if I'm mistaken, you know it very well! Just kidding :) I've put some 'printf' in the code and activated some debug info and what's causing me a problem is that compton is flooded by damage events. The result is that the function 'paint_preprocess' is called veeeeeeery often. I've not checked much deeper but it seems to be the problematic part. So, why am I flooded by damage events, I've no clue. I've tried to switch from openbox to twm (was already installed on my machine as I was testing in the train back home) no change. I've tried to change from xterm to urxvt, no change. Note that I've deactivated all the other background X processes I have (volumeicon, cbatticon, ...). So, do you have any idea why I'm flooded by damage events when doing nothing ? Do you think the 'paint_preprocess' function should only be called under certain conditions ? Edit 1: even without damage events, when this test is true...
...in the main loop, it triggers dozens of successive calls to the 'paint_preprocess' function. Edit 2: after some profiling (with sysprof, I can't get oprofile working), it indeed shows and important % of cpu used for paint_preprocess (sorry for the layout): [./compton] 0,00% |
You will get compton by default doesn't print out Compton will only initiate By the way, I've working on a way that decreases CPU usage of compton when a window is fading with shadows. 20 seconds of constantly fading in and out a window, and the average CPU usage dropped from 0.70% to 0.35%. Yet, it breaks colored shadow support...
Are you sure it's really generating dozens of calls, without receiving events (not even
When compton is perfectly idling -- no events or whatever -- its CPU usage should low enough (somewhere around 0.20% here, could be further minimized) that it should not be concerned. If it's higher than that number, it is probably receiving extra events. Just close all your windows and watch compton in a virtual console, make sure compton is receiving no events, and let's see if the total CPU usage of the compton process is still a problem. It is the expected behavior that |
Thanks for the explanation of DamageNotify. Indeed the flood of damage events comes from the fact that I ran compton inside the xterm. So, I've run it and checked from a virtual console (thanks for the trick!). Regarding your question: "Are you sure it's really generating dozens of calls, without receiving events (not even DamageNotify) or getting to the next fading turn?" Well, I see not only dozens, but hundreds of calls without events (when idling), which seems to be normal if I understand well the thing about the fading turn of 10 milliseconds). But I'm still at 4% when idling. Just a question (because I don't know where to look at now, I must admit): in the previous code, the function fade_timeout was doing this test: if (!fades) return -1; Now, it doesn't do it anymore, as it seems 'fades' variable doesn't exist anymore (change in the logic). |
Yes, that is the normal behavior right now. Although I don't think the CPU usage when idling is significant, I will try to improve it, but tomorrow or later. It's getting later today and I should sleep earlier today. I have sore throat and had a slight fever this afternoon...
Look, it's simply 0.20% here... If you are really sure there's no events, probably then we still need profiling data to figure out what the hell is happening on your side. sysstat is a system-wide profiler, isn't it? You could check if other profiling tools (perf, gprof, callgrind (comes with valgrind), etc.) could provide some hints.
Originally there's a fading queue |
Oh, well, for another day I'm staying up late... I pushed two performance related commits to Modern CPUs are less powerful than what I thought initially. I didn't realize that 0.20% of a Core i7 3770K could purely be used by calling By the way, here's a part of an oprofile profiling report of the compton process under my normal workload:
|
Man, sleep and take all time you need for you!!!
And I thank you for that, really.
Sleeeeeeeeep!!! And forget about this. :)
Grabbed and tested...and results are excellents!
I'll try to use oprofile, I promise. Edit 1: ok, I'm able to run oprofile, but...well, I'm not sure I'm using it the right way. I've just done this:
...and even with that I'm not sure how to interpret the result. Here is before (i.e. with issue on cpu usage):
And after (with your new version i.e. no cpu issue anymore):
|
Thanks. I'm getting better today. :-)
Mostly it's chjj's work, oh, and the xcompmgr authors. Thanks should go to them. :)
I'm still not quite ready to accept that that executing
Well, I guess I must have lead you on the wrong way, sorry. When I indicated oprofile initially I said Oprofile-0.9.8 as that version introduces easy per-application profiling. This is what I did: # My compton executable is in current directory
$ ./compton -b
$ operf -p $(pgrep compton)
operf: Profiler started
operf: Press Ctl-c or 'kill -SIGINT 2931' to stop profiling
# Kill it with Ctrl-C
^C
Profiling done.
$ opreport -l ./compton -c | less I might need more knowledge to understand the profiling data, hmm... But definitely, thanks for all your help! :-) |
Here are info without your performance commits:
and with the performance commits:
Do you want me to do something specific now ? |
Thanks again for your awesome work. Oh, well, I've never worked much on projects previously and I'm not too sure how to deal with the profiling data. :-) Are you noticing any big performance issues? Is the CPU usage of compton a concern for you right now? I'm actually doubting if we still need optimizations on performance side. I don't currently see any points that could be optimized significantly and cheaply (without loss of modularity or massive code to write). The shadow calculation part may have space for optimizations yet they are not actually called very frequently, hmm... Callgrind provided me much interesting data about the time usage inside Update: KCacheGrind shows 20% of cost of |
Well, I have a small concern when an "idle" process uses 4% of cpu (as it's the problem I have on my machine).
I definitely don't want an important rework for this case. What I will do now is to profile compton with the same tools you've used (callgrind & KCacheGrind) and see the results I get from there (maybe I'll get something different on my machine).
Uuuuh, absolutely no idea. I guess this might impact the visual effect, right? |
Oh, ah, I wasn't considering this, sorry. I've almost never used a laptop.
I wasn't liking it initially, but eventually I found I had overestimated the power of modern CPU and the modification saved more CPU resources than what I expected (and the implementation is easier than my expectation, too). So, it is worthwhile, and I should definitely thank you for showing me this. :-)
Ah, cool, if you have the time. We may just get something different depending on what we usually do when compton is running.
Yeah, the difference is, the opacity of a window could deviate from its correct value for up to 1.5%. (We could save more CPU time by increasing the inaccuracy, but not so significantly.) 1.5% shouldn't be very noticeable, do you think? |
Hi,
First of all, thanks a lot for the excellent work you've done on compton.
The current bersion of compton doesn't work (anymore) at this date: 2012-09-26.
It was working on 2012-09-24.
When I run it with these parameters...
compton -Cc -fF -I-.015 -O-.03 -D1 -t-1 -l-3 -r4.2 -o.5 &
...all windows become invisible.
I run openbox under archlinux.
Any idea?
Do you need more info?
Cheers
valr
The text was updated successfully, but these errors were encountered: