rcaelers / workrave

Workrave is a program that assists in the recovery and prevention of Repetitive Strain Injury (RSI). The program frequently alerts you to take micro-pauses, rest breaks and restricts you to your daily limit.
https://www.workrave.org
GNU General Public License v3.0
1.61k stars 204 forks source link

Time suspended not recognized as idle time #539

Open jjramsey opened 7 months ago

jjramsey commented 7 months ago

Describe the bug Workrave does not seem to recognize that when my desktop is suspended (i.e., I click "Suspend" in the GNOME menu and leave the machine alone). When I wake up from suspension, the rest break window appears, and the status indicator of Workrave indicates that my rest break is overdue by roughly however long I've been suspended (minus the length of the rest break?).

To Reproduce Steps to reproduce the behavior:

  1. Go to the upper right corner of the GNOME desktop and left-click.
  2. Click on the button with the "Power" icon. This will open a menu entitled "Power Off".
  3. Click on the "Suspend" item.
  4. Walk away for a few hours.
  5. Wake up the computer

Expected behavior Workrave should recognize that the computer has been idle and not prompt for a rest break.

Screenshots This is what I saw after the last time my desktop woke up from suspension: Screenshot from 2024-04-09 16-37-31

Linux

Additional context I'm running on Wayland, and the "Force the use of X11 on Wayland" is unchecked. I installed Workrave via the AUR (https://aur.archlinux.org/packages/workrave-git) but modified the PKGBUILD file so that Workrave is built with the -DWITH_GNOME45=ON and -DHAVE_WAYLAND:BOOL=TRUE CMake flags.

jjramsey commented 6 months ago

I still see the same problem after switching to KDE 6 on Wayland. The only difference is that instead if clicking the "Suspend" menu item in GNOME shell, I click the "Sleep" button in KDE's Application Menu.

Looks like the symptoms are similar to the ones for this bug found on Windows here: https://github.com/rcaelers/workrave/issues/540

patch-work commented 6 months ago

I confirm the problem on Fedora Linux 40, self-compiled workrave with default configuration.

https://github.com/rcaelers/workrave/issues/543