You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was previously running Wayland with AW to track work time spent in front of the computer, but due to input lag (probably caused by 4k monitor+Wayland) I switched over to Xorg session, where things run more smoothly.
I realized that my simple python script for extracting work hours, started showing odd hours, even over the weekends, while I wasn't using the computer.
Checking the afk-buckets, there are afk/non-afk entries at random points when the computer was not in use, while checking the window-watcher-buckets, there are no entries/active windows for those times.
It seems that even though the computer is logged out (gnome login-screen) it will do some events that are tracked as not-afk.
Simple solution for me now:
suspend computer (energy savings yayy, which is probably what I should be doing anyway)
modify my work-hour script to use the json from window-watcher to extract the hours.
Also:
Is there some way to remove entries for those times when it wasn't tracked correctly?
I was previously running Wayland with AW to track work time spent in front of the computer, but due to input lag (probably caused by 4k monitor+Wayland) I switched over to Xorg session, where things run more smoothly.
Just to clarify, AW wasn't the cause of lag? I'm slightly worried it could be... (we don't support Wayland anyway right now, but would be good to know for when we start working on it).
I realized that my simple python script for extracting work hours, started showing odd hours, even over the weekends, while I wasn't using the computer.
Checking the afk-buckets, there are afk/non-afk entries at random points when the computer was not in use, while checking the window-watcher-buckets, there are no entries/active windows for those times.
It seems that even though the computer is logged out (gnome login-screen) it will do some events that are tracked as not-afk.
That's strange, the only events we listen to are mouse and keyboard events. Perhaps your mouse randomly sends off an event? I've noticed mine doing that sometimes.
I'm guessing the unexpected non-afk periods have a zero, or near-zero, duration?
Is there some way to remove entries for those times when it wasn't tracked correctly?
Good question: Apparently there isn't! I can add the API endpoint required (should be easy), it would land in the next version (0.7.2) and then you would just simply use aw-client to call the REST API (or call the API directly if that's your thing). I'm tracking the thing in #136
hmm looking closer at the AFK-json, the weird non-afk events seem to have a duration of
180.XXX (so almost exactly 3 minutes).. I could probably just check to ignore if "178 < duration < 182"
and the maximum error in my reporting would be +/- 3m, which is acceptable.
Would be interesting to know what seem to wake the computer for 180s every now and then tho =D
Those 180s doesn't bode well. I think that means we have a bug in the AFK watcher since that's the default "timeout" duration (the time you have to be inactive for the period to be counted as AFK).
I looked at the source, and it seems we're sending heartbeats that the user is still not AFK despite not receiving any new input. What do you think @johan-bjareholt?
@ErikBjare Seems so. I am running the old commit which still has hibernation support (c1f6d73425fe7f6c) because I liked that functionality where it seems to be working differently
master
...
# Send a heartbeat if no state change was made
else:
self.ping(self.afk)
the old commit i'm running on (c1f6d73425fe7f6c)
...
# Send a heartbeat if no state change was made
else:
if self.afk:
self.ping(self.afk)
elif self.seconds_since_last_input < self.settings.polling_interval:
self.ping(self.afk)
The commit I'm running certainly looks more correct
Activity
ErikBjare commentedon Nov 21, 2017
Thanks for filing this, good questions!
Just to clarify, AW wasn't the cause of lag? I'm slightly worried it could be... (we don't support Wayland anyway right now, but would be good to know for when we start working on it).
That's strange, the only events we listen to are mouse and keyboard events. Perhaps your mouse randomly sends off an event? I've noticed mine doing that sometimes.
I'm guessing the unexpected non-afk periods have a zero, or near-zero, duration?
Good question: Apparently there isn't! I can add the API endpoint required (should be easy), it would land in the next version (0.7.2) and then you would just simply use
aw-clientto call the REST API (or call the API directly if that's your thing). I'm tracking the thing in #136MaZZly commentedon Nov 23, 2017
Nah I think Wayland itself in combination with 4k monitor might be the problem. Also noticed this lag before installing ActivityWatch.
I guess I could try turning off the mouse at the end of the day to test it.
Sounds good with removal of entries, this way I could remove those odd ones if exists.
Anyway I guess I should modify my script to use the window watcher json dump instead as that one might be more reliable.
MaZZly commentedon Nov 23, 2017
hmm looking closer at the AFK-json, the weird non-afk events seem to have a duration of
180.XXX (so almost exactly 3 minutes).. I could probably just check to ignore if "178 < duration < 182"
and the maximum error in my reporting would be +/- 3m, which is acceptable.
Would be interesting to know what seem to wake the computer for 180s every now and then tho =D
ErikBjare commentedon Nov 23, 2017
Those 180s doesn't bode well. I think that means we have a bug in the AFK watcher since that's the default "timeout" duration (the time you have to be inactive for the period to be counted as AFK).
I looked at the source, and it seems we're sending heartbeats that the user is still not AFK despite not receiving any new input. What do you think @johan-bjareholt?
johan-bjareholt commentedon Nov 23, 2017
@ErikBjare Seems so. I am running the old commit which still has hibernation support (c1f6d73425fe7f6c) because I liked that functionality where it seems to be working differently
master
the old commit i'm running on (c1f6d73425fe7f6c)
The commit I'm running certainly looks more correct
johan-bjareholt commentedon Dec 22, 2017
Progress: ActivityWatch/aw-watcher-afk#31
ErikBjare commentedon May 29, 2018
I assume this was solved by ActivityWatch/aw-watcher-afk#31, closing.
Merge pull request ActivityWatch#135 from ActivityWatch/dev/timeline-…