Monitor connection callback doesnt get called on Ubuntu

I am running application using GLFW on Ubuntu 20.04
When a new monitor is connected the callback I set never gets called.
I looked inside the GLFW code and I see that the only call to the callback is from glfwInputMonitor.
The only place I found which calls this function is from _glfwPollMonitorsX11 which is called during init.
Does GLFW not support connection/disconnection on X11?

Monitor changes on X11 are also polled when events are processed:

If you are able to build GLFW from the Github source with cmake you can run the events.c test to check if this catches your monitor connection/disconnection. If there is a problem with that then this might be a bug. Note that GLFW only supports a single X11 screen (see _glfwPollMonitorsX11 only returns main X screen display(s) · Issue #1927 · glfw/glfw · GitHub and Only one monitor detected X11 - #11 by elmindreda ), so if the monitor is registered to another X11 screen in your config it might not get polled.