No tray icons
Hello,
I cannot see tray icons, I have this error: error: tray: Failed to put tray above 0x0e00002 in the stack (XCB_MATCH (8))
The polybar config file: https://pastebin.com/4Fc0vy2k The polybar logs: https://pastebin.com/V62tnB0x
My version of polybar is the 3.2.0.
Thanks for your help
What WM are you using? The icons aren't appearing because as the error states, the tray window is stuck behind the bar.
Seems to be the opposite problem as #425. For some reason, on some WMs under certain circumstances, we can't reposition the tray, I wasn't able to figure out why that is though.
I use i3
I have the exact same problem since months (made me think about leaving polybar :/) And I also am using i3
@Doshirae Do you remember approximately when this started to happen? Perhaps i3 changed some of their window handling and caused this issue.
I don't remember sorry, I didn't thought of writing it down
But yesterday, the icons suddenly reappeared, and I don't know why...
Sent from my Android device with K-9 Mail. Please excuse my brevity.
I've installed polybar today for the first time and I am having this same issue. I'm running i3 4.15-1 and polybar 3.2.1-1.
Let me know if there are more info I can gather/provide.
Edit. The tray and icons appear in the bar and other elements appear to shift properly. Nevertheless the error is still shown in the log.
I think something is clashing between i3 and polybar. I'm on the same versions as @avernan, and I'm also getting the same error.
I also get the dropping unmatched character warning when I put the animations in my config. I'm using FontAwesome and I've replaced the already existing icons in the module file with the ones from the Font Awesome cheat sheet (Even though I thought they were the same).
And lastly I can't get the battery percentage and timer working...
I am also seeing this same behavior and error, on Solus Linux with i3-gaps. Sometimes it works, sometimes not all my icons show up, and sometimes when they do I am not able to click on them (it being behind the bar makes sense). Relaunching polybar a few times usually fixes it.
polybar v3.2.1 i3 v4.15.0.1
I am new to both so figured I had a configuration issue...
same thing as @oakbrad, only that icons always appear but sometimes i can't click on them.
polybar 3.2.1 i3-gaps 4.15.0.1-323-gccb19472 (2018-09-28, branch "gaps-next") Debian GNU/Linux unstable (sid)
polybar 3.2.0-50-gabdd5f9 i3 4.15-1 on debian testing
polybar reports "error: tray: Failed to put tray above 0x1600002 in the stack (XCB_MATCH (8))", no tray is visible.
i3blocks displays the tray fine. Is there any chance if this getting fixed soon?
Is there any chance if this getting fixed soon?
There is a new tray implementation in the works but no ETA yet. The easiest solution for you would be to disable the tray in polybar and use a dedicated program like stalonetray or tint2 and have a text module in polybar that reserves space or set a padding so that the tray doesn't overlap anything.
Hi,
These 2 lines seems to be fixing this particular error:
tray-position = right
; other tray settings
wm-restack = i3
override-redirect = true
Hope this comes in handy :)
The true problem is probably the restack, using
wm-restack = i3
is enough. and
override-redirect = true
will make windows apear under the bar, and accept offset settings such as
offset-x = 30%But it still fixed it for me, but i had to create an invisible bar over the main bar for windows to align porperly
Thanks !
Having the same issue but it does not get fixed by setting wm-restack and override-redirect. If I add those two options it will start without error but the tray icons will be rendered around 50 pixel above the polybar.
Versions are i3 4.15, polybar 3.3.0 (from Ubuntu 18.10 repository)
@sheijk Can you use tray-offset-x and tray-offset-y to reposition the tray?
Yes, I can re-position it that way. Thanks!
Also a correction: with wm-restack = i3 and override-redirect = true the tray will be rendered inside the bar (although the bar is just above where the i3 bar usually sits and windows get rendered over it but I think that is the way it should be?). But without those two options the tray gets rendered at the wrong place. It looks like it's just the same position the tray icons/bar would be placed if the two options are on
@sheijk When using override-redirect = false in i3, i3 will position the bar itself and the offset-x and offset-y options don't have any effect so it's better not to use them and the tray should then be positioned correctly.
The reason the tray appears at this weird position is because it's a separate window that always uses override-redirect and thus i3 doesn't reposition the tray and the tray is rendered at the position where it would be when i3 didn't move the bar around
I'm also seeing this error (with current master polybar and version 4.16 of i3). Any combination of wm-restack=i3 and override-redirect=true as suggested above don't solve the issue for me, however, but it seems that is cause by something different (more below).
The exact error message I get is:
error: tray: Failed to put tray above 0x2e00002 in the stack (XCB_MATCH (8))
Note that error code 8 here seems to be a XCB_MATCH error. According to the man page occurs when
You specified a Sibling without also specifying StackMode or the window is not actually a Sibling.
This seem to be a hint toward the cause of this bug. Looking at the window list as produced by xwininfo -tree -root, the tray window and the main polybar aren't actually siblings (but rather uncle/nephew) when override_redirect = false:
Root window id: 0x1a0 (the root window) "i3"
Parent window id: 0x0 (none)
222 children:
0x4400009 "Polybar tray window": ("tray" "Polybar") 1x32+2554+1408 +2554+1408
0xc003b1 "[i3 con] container around 0x559de7a32690": ("i3-frame" "i3-frame") 2560x32+0+1408 +0+1408
1 child:
0x4400002 "polybar-main_eDP-1": ("polybar" "Polybar") 2560x32+0+0 +0+1408
When override_redirect = true otoh, they are actual siblings and the error does not occur:
Root window id: 0x1a0 (the root window) "i3"
Parent window id: 0x0 (none)
222 children:
0x4400009 "Polybar tray window": ("tray" "Polybar") 1x32+2554+1408 +2554+1408
0x4400002 "polybar-main_eDP-1": ("polybar" "Polybar") 2560x32+0+1408 +0+1408
Also note here that the tray window exists, but is only 1 pixel wide. That is probably a different issue though (possibly #1609 or #1603)
@baszoetekouw Thanks for digging into that. Interesting, so with override_redirect = false i3 not only repositions the window, it also sets another parent for it thus making the tray and polybar no longer siblings. I managed to reparent the tray, will see what kind of problems this all will solve and will open a PR.
In general the tray has a width of 1px if there are no tray icons, otherwise it's larger, so you probably have buggy tray icons.
Was able to fix it (see #1615). The fix should appear in either the 3.3.1 or 3.4.0 release.
Hi,
These 2 lines seems to be fixing this particular error:
tray-position = right ; other tray settings wm-restack = i3 override-redirect = trueHope this comes in handy :)
Bruh, you rock!!!!!!!!!!!!!!!!!!!!!!!!! That's working like a dream!!!!!!! Thank you so much for sharing this knowledge. :)
The same thing happens sporadically when you combine xmonad with polybar, sometimes tray icons appear sometimes they don't, every boot either works or doesn't.
These 2 lines seems to be fixing this particular error:
tray-position = right ; other tray settings wm-restack = i3 override-redirect = true
This did not change anything for me (except for override-redirect causing the bar to end up hidden below other windows as soon as I start any software, which would make it useless anyway). I'm on polybar 3.5.7 and i3 4.20.1.
Just upgraded to ubuntu 22.04 with i3 and this is happening
I'm experiencing the same issue on Ubuntu 22.04.2 LTS with i3 v4.19.1-7-ge61a2311 and polybar v3.5.7 and override-redirect = false.
If I set override-redirect = true the tray icons work as expected (irrespective of wm-restack) but as @mattiasflodin mentioned, this doesn't help because now the bar either covers the windows or the windows cover the bar.
This is fixed by #2609 if you are using the new tray module.
@patrick96 Fantastic work, thank you! Is there anything that needs to be done on the user side (i.e. in the config) to enable this, beyond updating Polybar? (Speaking of which, will there be a new Polybar release in the near future?)
@codethief You will need to switch over to using the tray module instead of using the tray settings in the bar section. There is a small example in #2689.
There are still a few things I want to get into the next release (see https://github.com/polybar/polybar/milestone/13) before it is ready