My polybar is often completely invisible, as seen here. I'm not exactly sure what causes it to be completely invisible at times, but to temporarily fix it, I have to restart polybar. My compton config. I'm using the latest version of polybar and compton on Arch and this problem has existed for nearly a month now (I haven't touched the posted compton config for ~1 month). tray-transparent = true is commented out in my polybar config.
Can confirm this. I am also using the latest release (3.0.4) on archlinux with bspwm, but without compton. The problem has been here for quite some time.
I believe that the xwindow module is the source of the problem, it some how crashes the display of the bar when some characters are displayed in a window's title. For example, this link from wikipedia make my bar disappear immediately, although I have noto-fonts installed and firefox displays every character in this page correctly, and I have set polybar to also use the noto fonts. Meanwhile more common characters like in the CJK doesn't causes this problem. @rieje any chance you are also using the xwindow module? Can you test this?
Since I use startx to run bspwm, when the bar disappears I exit to the console and I can always see several lines of error messages like this: (the U+06xx part varies)
warn: Dropping unmatched character [[a square block representing some unicode character]] (U+0622)
warn: Dropping unmatched character [[a square block representing some unicode character]] (U+0645)
warn: Dropping unmatched character [[a square block representing some unicode character]] (U+0631)
@Iyu do the process crash?
@jaagr nope
Possible dupe of #393? Can you see if you can reproduce this with the most recent git version?
@skystrife Okay the latest git version does not have this problem, using either thelabel-maxlen option or the :0:30:... way. The characters in the title bar of the wikipedia page still does not show up and the error messages are still being printed to the console, but I guess I can live with that.
Might need to directly specify the font that has that glyph from the Noto Sans collection. In this case I think it's "Noto Sans Devanagari". polybar doesn't do automatic font fallback, so if no font in your font list is found that contains a certain glyph, it just skips it.
From these comments, I just did some quick tests and when I have a Youtube video with a different language like Chinese as the title, the polybar became invisible. Otherwise, it's not invisible. I installed polybar-git from the AUR and it seems to fix it for me as far as transparency goes, but xwindow's title removes all the Chinese characters from the title.
Same happens to me. And the problem must be in xwindow module.
To reproduce the problem I just need to open some music files in mpv, and select the next songs very fast to make the title change fast too.
For users that still experience this issue, could you post the output of polybar -v
Indeed!
Here is mine:
λ ~ polybar -v
polybar 3.0.4
Features: +alsa +curl +i3 +mpd +network
@Plasticoo thank you, could you post your polybar configuration?
edit: A step-by-step guide on how to reproduce the issue would help alot as well
@jaagr Yes indeed!
Here: https://gist.github.com/Plasticoo/ee9c37b4e001be1459dce71031cf43a1
The way i can reproduce the issue is:
1 - Use mpv to listen to music
2 - Music included has a lot of japanese characters
3 - Cycle through the playlist in mpv very fast
4 - Expect the polybar to disappear while doing point 3.
Of course, this is caused by the title module in my config (xwindow).
edit: I decided to include some example titles that appear and may cause this issue:
I think you get the point.
@Plasticoo I'm not able to reproduce the issue. Is the process still running for you when it disappears?
@jaagr Yes it is. The process still runs.
@Plasticoo OK, I'll keep trying to reproduce it then.
@jaagr Maybe you can tell me exactly how you're doing it. I find odd the fact that you cannot reproduce the issue with the directives I gave you.
@jaagr Sorry for being late.
I went on my Linux machine and I can give you new information.
I tried 3 different scenarios.
Pressing next/prev keys repeatedly in a directory with music whose tags have normal characters. Polybar functioned normally.
Pressing next/prev keys repeatedly in a directory with music whose tags have normal characters, plus a song in there with special characters (japanese). Polybar functioned normally.
Pressing next/prev keys repeatedly in a directory full of music whose tags have all special characters. Polybar disappeared.
So maybe you should try with multiple mp3 files like that. I can actually give you the bandcamp link for the download of an album like that:
@Plasticoo thanks, I'll try that out as soon as I get some time.
@Plasticoo this screencast shows your config on the external monitor (the upper area) while I keep changing songs from the album you linked... still can't get the bar to disappear.
Didn't bother to crop the recording so just ignore the other bloat.
@jaagr Well, is there some way I can do a screencast like yours, so I can show you how exactly it happens?
@Plasticoo the script I'm using can be found here and you can upload the .webm file here
Well, I must start by apologizing. I tried that album that I sent the link to you. But did not work. Tried another one, and the problem persists, it is most likely a very strange character(?). The one i tried is:
https://cvltvre.bandcamp.com/album/upscale-loft
Also, here is my screencast. (Sorry for the screen, I dunno why it recorded this way).
@Plasticoo I just checked the git log and the issue should actually be fixed, but I just realized that I haven't created a new release tag since it was committed. Let me bump the version so that you can update polybar.
@Plasticoo try updating the package (just created a new tag 4e2e2a7a5e0fe81669031ade0f60e1d379b6516d), sorry for the inconvenience
@jaagr I updated, and I tried all the scenarios mentioned here in this issue and it seems fixed! At least for me, maybe the OP, @rieje, could say something about it too!
Thanks for your availability!
@Plasticoo that's great! Props to @skystrife for fixing it. Please close the issue if it's resolved on your end @rieje.
@jaagr unfortunately, I still have this issue. See screenshot. To be clear, I'm not having the invisible bar anymore, but the xwindow title does not show the correct title (seems to just remove all the Chinese characters).
I don't know if it has to do with the font, xwindow, or polybar.
@rieje Maybe that is a font issue. When I didn't have the font for the japanese characters, it would skip them all. After installing it, it works fine.
I installed a Chinese font when I installed Arch because I had blocks with numbers shown instead on Firefox and that fixed it, so I don't think that's an issue. On terminal and other applications there isn't an issue with Chinese characters.
@rieje in my experience you need to explicitly specify that font in the config or it will not work.
@TonCherAmi In the polybar config? I installed the package wqy-microhei on Arch for the font. Then fc-list | grep -i "wqy" returned:
/usr/share/fonts/wenquanyi/wqy-microhei/wqy-microhei.ttc: WenQuanYi Micro Hei,文泉驛微米黑,文泉驿微米黑:style=Regular
/usr/share/fonts/wenquanyi/wqy-microhei/wqy-microhei.ttc: WenQuanYi Micro Hei Mono,文泉驛等寬微米黑,文泉驿等宽微米黑:style=Regular
so I think I think I'm supposed to use the setting for the polybar config:
font-0 = WenQuanYi Micro Hei Mono Regular:pixelsize=9;3
But it didn't seem to change anything.
@rieje, try font-0 = WenQuanYi Micro Hei Mono:pixelsize=9;3. I believe Regular is not a part of the font's name.
@TonCherAmi That works! I thought Regular in style=Regular needed to be specified. Thanks a lot.
Hello, I’m bringing this thread back to life as I have about the same issue with Japanese characters, but it’s way more specific: I can reproduce the bug only if I launch music containing Japanese characters in mpd/ncmpcpp in uxterm, going to another window and then coming back. Sometimes the bug appears immediately. I tried doing the same with gnome-terminal, and polybar works fine as well as any other software, so I guess the issue is from uxterm’s output to the xwindow module specificaly. The output indicates it drops the unmatched U+0003 and U+0005 characters, though last time I tried to reproduce the error it only dropped the unmatched character U+0003.
Here is the output of polybar -vv :
polybar 3.0.5-git
Features: +alsa +curl +i3 -mpd +network
X extensions: +randr (+monitors) -render -damage -sync -composite +xkb +xrm
Build type: RelWithDebInfo
Compiler: /usr/bin/clang++
Compiler flags: -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wall -Wextra -Werror -O2 -pedantic -pedantic-errors
Linker flags: -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
My config file (you have also access to my other dotfiles through this link if you need to)
EDIT: I also forgot to mention that once this bug happens, if I try to reload i3 (i3-gaps 4.14.1-1), i3 crashes.
Hi @Phundrak, please don't post on a thread that has been closed for over half a year. Open a new issue instead, there we'll be able to help you better.
When opening the new issue, please also provide the full polybar log when run with -l info
Most helpful comment
@Plasticoo thanks, I'll try that out as soon as I get some time.