I have set "Away after 5 minutes" in:
Gajim
-> Preferences
-> Status
This mostly works as expected: After 5 minutes of inactivity, my status automatically changes to "Away". When I come back and move mouse, or type on keyboard, the status changes back to "Available".
But it only works 95% of the time. Sometimes, I come back, move mouse, but status does not change to "Available".
This is extremely annoying, as I have to always check whether my status has changed every time I come back.
Why does it work sometimes, but not always?
What affects this behavior?
Is this simply a bug in Gajim
, or is there something on my system that I can do to fix this?
I am using Debian Buster
, and gajim 1.1.2-2
Why does such a simple thing not work reliably ?
EDIT
I am using plain Openbox as my window manager, and slim
as my login manager. I do have dbus daemon running.
But I don't have any Gnome/KDE/… desktop environment.
I also don't have any screensaver
Best Answer
I'll try to answer your question even before you update question with the details.
The Analysis
There are these states of idle in gajim:
You usually consider only
AWAKE
orAWAY
. TheUNKNOWN
state is a generic state which is set when you don't get any result from_get_idle_monitor
(see below).XA
state is an extended away - screen is locked or you have a screen saver (Only for Windows, funny is that when you are on Gnome or using XScreenSaver you can't be on extended away (it is always false)).This is how gajim decides if you are still idling:
Since you are probably not using Windows I'll cover the
DBusGnomeIdleMonitor
andXssIdleMonitor
.If you are using Gnome then you are probably using this part of the code. I recommend using logging on debug mode so you will get all the messages from this part of the code.
If you see this message:
Then gajim has problems getting idle time from your environment (hard to say a reason for that - probably DBus is not working correctly). Of course, you could also see the
log.info('Idle time via D-Bus not available: %s', error)
message.Here you should see the
log.info('Idle time via XScreenSaverInfo not available: %s', error)
message if you are using it. This part of the code can generate OSError messages which usually happens if you r XScreenSaver or System is missing somehow a vital part of it.The error messages you could get:
Solution
If you are using Gnome and it does not always work, I would try to install XScreenSaver perhaps that would be more reliable way to detect your activity.