Closed zakkak closed 11 years ago
-b
has nothing to do with --shadow-exclude
. This sounds like a timing-related issue. Another possibility is the parameters are not passed to compton correctly. I could not reproduce the problem, with conky or docky. And in general, dealing with a problem that I could not reproduce is going to be a lengthy and painful process.master
or richardgv-dev
branch.-b
, or just sometimes? "Sometimes happen" is a sign of a timing-related issue.--shadow-exclude
(but this behavior is to change). Depending on how you start compton, you may or may not be able to see the warning message it prints out. And using -b
will also hide most warning messages from you. Please check if the parameters are passed correctly to compton, if, for example, compton is not started from a shell or a shell script.-b
manually (in a terminal) works?compton --config /dev/null -cC --shadow-exclude 'n:ai:docky'
.-C
should be enough to disable shadow for Docky window (docky-2.1.4 at least sets the window type correctly). So if there's a problem in compton, it might be in client window detection.compton -b
disables all output, thus hides all debug messages, it would be tricky to debug in such a case. I guess you would have to use gdb.By the way, compton and xcompmgr seemingly misbehaves when editing Docky settings. Will look into that later.
Update: The problem I met when editing Docky settings is probably caused by fvwm. Never mind.
My current setup is using cairo-dock instead of docky which seams to be working fine. Conky also works fine (but even with the & it sometimes gets shadows). This shows that this is a timing problem but i can't understand why timing should matter. If start Conky and compton from a terminal emulator it always works no matter which one i start first.
Thank you very much for your reply
Well, now let's do some painful remote debugging...
Make sure you have compton built with debugging symbols, and you have restarted compton after recompiling it.
make clean; CFLAGS='-ggdb' make
killall compton
./compton
When compton is giving shadow to a shadow-excluded window, please figure out the window ID of the frame window of the problematic window, by running xwininfo -frame
and select it. Write the window ID somewhere. For example, if the output is this, the frame window ID is 0xc000c8
:
xwininfo: Please select the window about which you
would like information by clicking the
mouse in that window.
xwininfo: Window id: 0xc000c8 (has no name)
Absolute upper-left X: 0
Absolute upper-left Y: 55
Relative upper-left X: 0
Relative upper-left Y: 55
Figure out the client window ID, too, by running xwininfo
and select the window. For windows with no frames, this is probably the same as the frame window ID. In my case, it's 0x800001
.
xwininfo: Please select the window about which you
would like information by clicking the
mouse in that window.
xwininfo: Window id: 0x800001 "Conky (home)"
Absolute upper-left X: 0
Absolute upper-left Y: 55
Relative upper-left X: 0
Relative upper-left Y: 0
Use gdb to attach to compton:
gdb path/to/compton $(pgrep compton)
At this point, you have to operate in a virtual console. Debugging compton will make the screen freeze.
Look up the window by its frame window ID:
(gdb) p find_win(ps_g, 0xc000c8)
$1 = (win *) 0xd7aa80
If found, check if its recorded name, class, and client window ID are correct:
(gdb) p find_win(ps_g, 0xc000c8)->name
$2 = 0xd7aa40 "Conky (home)"
(gdb) p find_win(ps_g, 0xc000c8)->class_instance
$3 = 0xd79d10 "Conky"
(gdb) p find_win(ps_g, 0xc000c8)->class_general
$4 = 0xd7adf0 "Conky"
(gdb) p/x find_win(ps_g, 0xc000c8)->client_win
$5 = 0x800001
I think you should print errors to some log file when running in -b :)
It's pretty rare that a problem only happens with -b
, so it doesn't really worth the trouble, I guess?
This shows that this is a timing problem but i can't understand why timing should matter. If start Conky and compton from a terminal emulator it always works no matter which one i start first.
This is a nanosecond/microsecond level timing issue. You are extremely lucky (or unlucky) to spot such a problem.
My results are NULL (0x0)
for name
, class_instance
and class_general
. Only the client_win
field is right.
This is a nanosecond/microsecond level timing issue. You are extremely lucky (or unlucky) to spot such a problem.
So you suspect a race between the two programs. I guess i am really lucky to see this behavior then :). If this is the case could we daemonize compton only after the appropriate initialization is done?
My results are
NULL (0x0)
forname
,class_instance
andclass_general
. Only theclient_win
field is right.
Ah, looks like for yet another time I've made a miserable mistake... Please pull from richardgv-dev
branch, apply the patch below, and tell us if the problem is still there:
(Yeah, this patch contains a lot of other weird stuffs...)
Update: The patch has been merged into richardgv-dev
branch, please clone from the branch and test.
So you suspect a race between the two programs. I guess i am really lucky to see this behavior then :). If this is the case could we daemonize compton only after the appropriate initialization is done?
Well, this is not related to when we daemonize, this is related to a few hundred microseconds daemonization uses. :-) A few hundred microseconds that may have triggered the issue.
If the following is the right process to build from richardgv-dev
then the patch does not work for me
git clone https://github.com/chjj/compton
cd compton/
git checkout origin/richardgv-dev
git pull origin richardgv-dev
make
If you are using the latest version from richardgv-dev
branch, when you run compton -h
you will see this:
compton (git-7188054-2013-01-09)
usage: compton [options]
...
And just a double check: you did restart X after compton got updated, right?
client_win
, when the bug appears, or is different?ps_g->o.track_wdata
true when the problem appears?Oh, wait, wait, in addition to the three points above:
xprop WM_STATE
on your problematic window when the issue appears, and show me the output.Please try executing win_get_name()
on the problematic window in gdb, and check its ->name
afterward, like:
(gdb) p win_get_name(ps_g, find_win(ps_g, 0x4000c8))
$1 = -1
(gdb) p find_win(ps_g, 0x4000c8)->name
$2 = 0x0
Please try executing xprop WM_STATE on your problematic window when the issue appears, and show me the output.
WM_STATE(WM_STATE):
window state: Normal
icon window: 0x0
Please try executing win_get_name() on the problematic window in gdb, and check its ->name afterward, like:
(gdb) p win_get_name(ps_g, find_win(ps_g, 0xa00101))
$1 = 0
(gdb) p find_win(ps_g, 0xa00101)->name
$2 = 0x21b6a60 "Conky (hostname)"
win_get_name()
returns 0 means compton does know about the name before the win_get_name()
call you made, and the name did not change. This conflicts with your previous gdb result, in which compton does not know the window name. Please make sure all your tests are done when the problem is happening, as I requested.I've added --logpath
to compton, on richardgv-dev
branch, to redirect messages to a file when -b
is used. Please pull from richardgv-dev
, make sure your version is git-57c5854-2013-01-11
, then compile compton with -DDEBUG_CLIENTWIN -DDEBUG_WINDATA
:
make clean; CFLAGS='-ggdb -DDEBUG_CLIENTWIN -DDEBUG_WINDATA' make
After that, add -b --logpath /tmp/compton-log.log
to the commandline arguments, run compton, reproduce the issue, and show me /tmp/compton-log.log
and the messages from stdout (messages printed during initialization are still sent to stdout). compton appends to the log file instead of overwriting it, so please remove the file before you start compton.
Okay, I did some extra changes in git-2165c42-2013-01-12
on richardgv-dev
branch. Let's see if I'm lucky enough to fix this annoying issue. If the new version still does not work for you, please follow my suggestions in the last reply.
Update: Now git-e60fe72-2013-01-13
is the latest version.
Seems to work great :)
Thanks a lot
The following line causes conky and docky to have shadows dispite the shadow-exclude arguments
compton -f -D3 -cC -m0.8 -z --shadow-exclude 'n:a:Conky' --shadow-exclude 'n:e:Docky' -b
replacing it withcompton -f -D3 -cC -m0.8 -z --shadow-exclude 'n:a:Conky' --shadow-exclude 'n:e:Docky' &
fixes the problem.I am not sure though if this is really a problem of the daemon implementation or something else.