Bug 306 - Workrave doesn't react well to suspend/resume
Status:
RESOLVED FIXED
Component:
Core
Version:
1.4.1
Hardware:
PC Linux
Importance:
P4 normal
Target Milestone:
---
Assignee:
Rob Caelers
URL:
Depends on:
Blocks:
Reported:
Sep 10 2003 12:13:16 UTC
by:
Hugo Haas
Modified:
Mar 9 2008 23:16:59 UTC
CC List:
C Schoen
Francois Marier
WhoWhenWhatRemovedAdded
Hugo HaasNov 11 2003 02:21:20 UTCversion1.4.01.4.1
Rob CaelersNov 13 2003 01:30:13 UTCstatusNEWASSIGNED
C SchoenJan 18 2007 16:00:47 UTCccC Schoen
Rob CaelersAug 27 2007 14:03:39 UTCpriorityP2P4
Francois MarierOct 4 2007 22:24:54 UTCccFrancois Marier
Rob CaelersMar 9 2008 23:16:59 UTCresolutionFIXED
statusASSIGNEDRESOLVED
Description
Hugo Haas  Sep 10 2003 12:13:17 UTC
Workrave's way of counting time doesn't see when the machine is suspended and
then resumed:
- the micro break and the rest break counters keep their value: for example, if
the machine is suspended for 1 day, it is not useful to have Workrave ask for
the user for a rest break just 1 minute after the user started working again on
the resumed machine.
- similarly, the daily limit counter only gets reset when the machine happens to
be running at the time indicating; it would be nice if Workrave realized that
last time it did a check was before the reset time, and it now is after the
reset time, and resets it.

Regards,

Hugo
Comment 1
Rob Caelers  Sep 10 2003 13:02:27 UTC
Are you taking about the menuitem "mode->suspended" or about suspend to ram/disk
hibernate? Your description suggests the latter. However, you report this bug
for Linux. I haven't tested hibernate for Linux. 

For windows, a number of hibernate issues have been resolved after 1.4.0. Daily
snapshots are available from http://www.workrave.org/download/snapshots/. You
might want to try of these fix the problem you reported.
Comment 2
Hugo Haas  Nov 11 2003 02:21:20 UTC
I just did a test with Workrave 1.4.1:
- I used my computer.
- I suspended the computer to disk (with swsusp) for about a day
- I resumed.
After I resumed, Workrave displayed that I was 1:13 away from a rest break, when
I think that it should reset itself and should have told me that I was 25
minutes away (my setting) from it.

In short, it looks that the problem is still there.

Regards,

Hugo 
Comment 3
Rob Caelers  Nov 13 2003 01:30:13 UTC
Ah, you are using linux with software suspend. At the moment, Workrave only
detects hibernate/suspend on windows. On linux, workrave assumes that the time
the computer was suspended never occurred. In other words, the timer values
after resume are exactly the same are just before the suspend. I will
investigate if it is possible to receive syspend/resume events from swsusp.
Comment 4
Scott Gaskins  Jul 1 2004 17:49:54 UTC
Actually, Workrave does not seem to detect suspend to ram on Windows XP 
(Start>Shutdown>Standby) on my laptop.
The main problem I have noticed is that if/when I go to Standby and leave 
work, with say 1 hour left on my Daily Limit, then when I get home and several 
hours later open my laptop and start working again, immediately I get the "you 
should quit for the day" pop-up.
I think that the entire time the PC is suspended or hibernated, Workrave 
should stop counting...
Comment 5
Rob Caelers  Mar 9 2008 23:16:59 UTC
On Linux, Workrave still can't distinguish between changing the clock and a hibernate (in both cases, some time is missing). Linux has been changed to assume missing time is always hibernate/suspend. Not optimal, but the best I can do. Works for me(tm)

A number of windows hibernate bugs have been fixed in the past (after 2004). I haven't received any hibernate complaints lately, So, I assume hibernate is stable on Windows. I haven't seen any glitches myself.  

I'm closing this bug (in case people don't complain because there is an open bug about hibernate). Please re-open or file a new bug is hibernate is still broken.