I’m currently authoring an add on which utilizes the alarm API create function. Everything works correctly if I test my extension normally, but this is something I want to run in the background even when my OS (Xfce) is locked. It seems that if the alarm is set to go off when my OS is locked, it doesn’t actually fire the event and only does so immediately after I unlock my OS by logging in. I’ve only been able to test this on Debian Linux Buster with Xfce, however, i’m suspicious that this would work the same way on Windows 10 or 11. When I first embarked on this project I expected the alarm API to run code (similar to a cron job, even when the OS is locked). Is there a way to circumvent this and have my code run even when my box is locked. Any information would be helpful. Thanks.
Try to test if the Firefox code is actually running while the screen is locked, something like:
window.setInterval(() => console.log(new Date()), 1e3)
(open background script, paste it in, then lock and unlock the screen to see if there is log every second)
Because it sounds strange that Firefox would check if the screen is locked and not run an alarm in that case… although, maybe it makes sense, why should an addon “do things” when UI is not available to user.
What exactly are you trying to do with your alarm? Maybe there is a better way.