workrave icon indicating copy to clipboard operation
workrave copied to clipboard

Activity incorrectly detected (gnome, X, v1.10.44)

Open eliotb opened this issue 3 years ago • 8 comments

For both microbreaks and breaks, the countdown stops after about 2 seconds, and the border flashes orange, even when there is no user activity.

To Reproduce Breaks

  1. Click "rest break" on the applet menu
  2. The rest break window appears, the timer counts down for 3 seconds then stops

Microbreak

  1. Wait for microbreak
  2. "Time for a microbreak" window - counts down, border flashes orange then red
  3. "Microbreak" window, counts down from 30 to 28 seconds, then stops

Expected behavior Timers count down as normal

** Linux (please complete the following information in case you encountered the bug on Linux):**

  • Distribution: Ubuntu
  • Distribution Version: 20.04
  • Desktop Environment: Gnome on X
  • Workrave Version: 1.10.44

Possible related issues #207 #212 #228 #229 #231

eliotb avatar Oct 16 '20 21:10 eliotb

I'd be interested in how to debug this in a passive way e.g. a debug window visible with scrolling logs. Something that can be observed without touching the keyboard or mouse.

eliotb avatar Oct 16 '20 21:10 eliotb

Right now the breaks are working correctly for me. I don't think this means the problem doesn't exist, rather, it is intermittent or only occurs under certain circumstances (yet to be determined)

eliotb avatar Oct 18 '20 05:10 eliotb

Unfortunately, I haven't been able to reproduce these activity monitoring issues. I am currently adding some extra diagnostics to Workrave that may help in finding the cause of this issue.

Does the problem occur when you are playing music/videos? Or immediately after suspend/hibernate?

rcaelers avatar Oct 18 '20 12:10 rcaelers

I am having this problem 100% of the time when the webcam is in use (eg: during video conferences), but it's also "intermittent". Here's what just happened.

Many tabs open in Chrome, one is a web conference using the webcam. Micro break timer pops up, counts down 2 secs, then pauses.

If I switch to another browser tab that has a text input area (this GH issue, actually) and click into the text area, after a few moments the micro break timer will restart.

If I click back to the browser tab with the webcam running, the timer pauses and never restarts.

If I click back into this tab and into the text input area on the GH issue, the timer restarts.

I have observed this also without the cam running, but was not able to diagnose.

workrave-1.10.37-2.fc33.x86_64 gnome 3.38 X11 (wayland disabled) Fedora 33

thoraxe avatar Dec 14 '20 15:12 thoraxe

For what it's worth, my video camera feed is "muted" on this conference, but I believe the web app is actively still capturing it -- it's just not sending it.

There is a text entry area for the conference chat in the web conference browser tab. Clicking into that text area doesn't cause the timer to honor activity. It keeps counting down even without KB/mouse input.

As soon as I switch off that tab back to the GH issue and click into the issue text box, the timer will eventually pause and reset.

thoraxe avatar Dec 14 '20 15:12 thoraxe

I validated just now that you don't have to be in a text entry box. Switching to my GMail browser tab and just sitting there also allows Workrave to detect idle.

thoraxe avatar Dec 14 '20 15:12 thoraxe

Interestingly, Google Meet doesn't "work" by clicking into another tab. It only worked with BlueJeans, but I didn't have my camera muted, so I'll need to do more testing.

thoraxe avatar Dec 14 '20 16:12 thoraxe

Workrave 1.10.45 contains the extra debugging I mentioned.

If you still encounter activity monitoring issues and switching to the 'alternate monitor' (In the preferences, in the timers section, monitoring tab. Toggle the 'Use alternate monitor' checkbox), does not solve the issue, please try the following:

When you encounter the problem, open the preferences, and go to the 'Monitoring' tab in the Timers section. Press the 'Debug monitoring' button. A new window should appear that shows some internal state and state changes. Wait a minute or so and copy/paste the content of the debug window and add it to this bug report or mail it to me (there should not be any personal data in the logs). Note that this requires version 1.10.45.

rcaelers avatar May 12 '21 21:05 rcaelers