How can I sniff X11 events when bughunting

30 views
Skip to first unread message

Deter Campaign

unread,
Feb 22, 2023, 6:17:24 PM2/22/23
to qtile-dev
Hi all!

I've been using qtile for some time with a somewhat obscure setup with a custom layout. I don't doubt that the below issues are due to my setup.

I'm hoping qtile can advise on the best way of approaching the issues, which I assume would be to passively log / listen for X11 calls to a point where I can reproduce the problems directly to better resolve the issues. I have minimal X11/C experience.

Recently I'm running into oddities where Firefox browser tabs appear to end up in a broken state after click/dragging such that the browser 'freezes' until the window loses focus and regains it. On focus regain, some amount of events seem to execute, but the browser remains in a 'freeze' state. Mashing Ctrl + W to close tabs eventually fixes the issue. I'm yet to reliably reproduce the issue, which began occurring around August of last year, I rebased my layout to the latest qtile and the issue persists.

I have a similar problem with another GUI application where even though the window loses focus according to qtile / border colour, the focus remains on the window. I suspect this is caused by the app requesting focus which is incorrectly released. I would anticipate that the app is the problem here, as it's built poorly.

Is there a way of listening for relevant X11 events so that I can identify the cause of both of these behaviors? I'm not sure if it's even possible, but if it is I would anticipate a significant amount of noise within BAU traffic. If anyone could advise on a better approach that would be nice :)

Thanks!

Tycho Andersen

unread,
Apr 19, 2023, 9:59:41 PM4/19/23
to qtil...@googlegroups.com
I realize I'm a bit late to the party here, but two utilities come to
mind. xev will show you the events it receives, which can be useful
for debugging what events qtile is sending to windows, and xtrace will
debug what requests a particular program sends, which can be useful
for seeing what kinds of strange things programs send to the X server.

Tycho
Reply all
Reply to author
Forward
0 new messages