Skip to content

Known Issues

Patrick Ziegler edited this page Jun 5, 2019 · 28 revisions

This page lists some of the issues one can encounter when using polybar. Either quirks in polybar's behaviour or actual bugs we haven't been able to fix yet.


Failed to get root pixmap, default to black (is there a wallpaper?)

Polybar prints this warning when there is no wallpaper set and pseudo-transparency = true is set. Polybar will still run but assume the wallpaper is all black.

Fix: We suggest setting a wallpaper with feh or nitrogen.

Cannot find root pixmap, try a different tool to set the desktop background

When you use a tool like ImageMagick (display -window root) to set the wallpaper and have pseudo-transparency = true set, polybar fails to find the wallpaper to use for making the bar transparent. It will assume the background is black when rendering transparent colors.

Fix: As above, we suggest to set the wallpaper with a tool like feh or nitrogen

Building with Anaconda installed

Problem: On systems using Anaconda compiling polybar will likely fail with one of these error messages:

  • Missing required python module: xcbgen
  • ERROR: could not calc required_start_align of Struct "xcb.Setup"
  • Cairo was not compiled with support for the xcb backend

The general issue is that the libraries and programs provided by Anaconda cannot be used to build polybar in many cases.

Fix: The easiest fix is to uninstall Anaconda if you don't need it.

If you can't/don't want to uninstall Anaconda, we need to force polybar to not use any resources provided by Anaconda. This can be done by temporarily removing any paths that point to anaconda from both the $PATH and $PKG_CONFIG_PATH environment variables in the terminal before building polybar.

People have reported that conda deactivate does that for you for the currently open terminal. If that doesn't work, try doing it manually:

For example if your PATH variable contains:


Remove /home/<user>/anaconda2/bin and reexport the variable:

export PATH=/home/<user>/bin:...:/usr/bin

Do the same thing for PKG_CONFIG_PATH (though this variable is often already empty). Now you should be able to build polybar with either the script or cmake and make. Make sure that you do a clean build (redownload all polybar sources).

This was reported in #502, #733, #659, #1629

Huge Emojis

Problem: When using the Noto Emoji font, Emojis appear extremely big on the bar. Setting the size property doesn't help.

Fix: Add the scale property to the font definition in your config. For example font-7 = NotoEmoji:scale=10. The larger the number the smaller the Emojis.

This issue was discovered in #905.

Click Commands are not Executed

Problem: Some click-* commands are not executed when the bar is clicked. This is a bug that is triggered by the click-* command producing output on stdout or stderr.

Workaround: The click-* command must not produce any output, so redirect any output to /dev/null. This can be done by appending >/dev/null 2>&1 to the click-* command (If you background the program with &, make sure that & is still at the very end).

This issue was discovered in #916.

With multiple modules of the same type, actions on those modules control the leftmost module

Problem: This affects all modules that provide their internal mouse actions that change the module behaviour:

  • internal/alsa
  • internal/date
  • custom/menu (Per it's Wiki Page you can already only define one menu per bar)
  • internal/mpd
  • internal/pulseaudio
  • internal/xbacklight

Fix/Workaround: There is currently no fix for this (besides not having the same module type twice on your bar). Just be aware of this issue when using multiple modules of the same type.

Error While Loading Shared Libraries: libjsoncpp

Problem: When you update the jsoncpp package, you might get the following error, when trying to run polybar:

polybar: error while loading shared libraries: cannot open shared object file: No such file or directory

This issue occurs because jsoncpp changes the name of their .so file every release and there really isn't anything we can do about that.

Fix: You have to recompile polybar, so that it links to the new .so file. If you use precompiled binaries from a repository, you either have to compile polybar yourself or contact the packager so that they can recompile polybar and publish a package with proper linkage. Alternatively you can symlink the file from the error message to (most likely in the /usr/lib directory).

Setting Module Backgrounds when using Gradients

Problem: When you use a gradient as your polybar background, explicitly setting any module's background color to whatever you have set as background-0, either through the -background setting or the %{B} formatting tag, will not change the background color at all.

Workaround: If you want to explicitly set a module's (or parts of its) background to background-0, use a color that is almost the same. E.g. if background-0 is #FFFF00 use #FFFF01.

This behaviour was introduced in #831, to resolve the issue described in #759. There is no way to resolve this without some major code changes to the renderer.

override-redirect in i3

Problem: i3 and polybar sometimes interact quite weirdly and often override-redirect = true is needed to resolve it. This however makes i3 not reserve space for the polybar window, making other windows overlap polybar. There doesn't seem to be that much that we can do about this from polybar's side, because as soon as we need to use override-redirect = true, we can't tell i3 to reserve space for the polybar window.

Workaround: The workaround that some people use, is to create a full-width fully transparent dummy bar on the same monitor and in the same position (with override-redirect = false), so that i3 reserves space for this dummy bar, effectively also reserving space for our actual bar. The real bar may need to have wm-restack = i3 set for it to not overlap with fullscreen windows. Note: This requires that you have a composition manager running because the dummy bar may overlap the real bar.

If you are using i3-gaps (branch gaps-next or version 4.17 once it's released), you can set gaps top X or gaps bottom X in your i3 config to reserve space for the bar where X is the number of pixels you want to reserve. Note: On multi-monitor setups this will be applied to all monitors.

Version Mismatch between xcb-proto and libxcb-randr0-dev on Ubuntu 17.04

Problem: On Ubuntu 17.04 (and possibly others), the xcb-proto version does not match the version of the libxcb-* packages, especially libxcb-randr0-dev. This creates problems with the header files. If you get the following or a similar compiler error, this fix may be for you:

lib/xpp/include/xpp/proto/randr.hpp:3026:42: error: use of undeclared identifier 'xcb_randr_get_monitors_reply'; did you mean 'xcb_randr_get_providers_reply'?

Fix: You will need to downgrade to xcb-proto to version 1.11-1, I didn't have any luck with using apt to downgrade, so I grabbed the source files from launchpad and compiled from source. You have to get both xcb-proto_1.11.orig.tar.gz and xcb-proto_1.11-1.diff.gz.

Now remove the already installed xcb-proto package and run the following command inside the folder where you downloaded the files to. This will compile xcb-proto-1.11-1 and install it on your system.

tar -xzvf xcb-proto_1.11.orig.tar.gz
gzip -d xcb-proto_1.11-1.diff.gz
cd xcb-proto-1.11
patch -p1 <../xcb-proto_1.11-1.diff
sudo make install

Note that it will not be installed via apt and thus to uninstall you'll need to run sudo make uninstall from within the xcb-proto-1.11 folder.

Now you should be able to compile polybar without problems, just clear the build directory first.

This issue was discovered in #644, you will find more details there.

You can’t perform that action at this time.