After I lock the screen and leave my machine alone, sometimes the monitor sleeps after some delay but sometimes it doesn't. I have already set system settings to allow monitor sleeping but I suspect some errant program is quietly preventing the monitor from sleeping. I want the monitor sleeping to be predictable and truly controlled by the system settings.
How can I find out which program is preventing monitor sleep, at at least why the monitor fails to sleep when it happens?
If the answer to the question is distro-specific, my distro is Arch Linux, but an answer for another popular distro like Fedora or Ubuntu would be equally helpful.