Zhorn Software
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Go down
avatar
radiocam
Posts : 9
Join date : 2018-11-06

Hey! My Caffeine's decaffed! (I think) Empty Hey! My Caffeine's decaffed! (I think)

Fri Jul 09, 2021 7:52 am
I load Caffeine in my W10 startup program -a vanilla load, no cmd line parameters or anything unusual.
And yet, my PC goes to sleep after the time in the Power & sleep settings (5 hours)

Any thoughts? I haven't yet done any close observation of this or looked at powercfg etc, which may help. (And I will)
Thought I better ask here first in case I'm missing something of the "bleedin' obvious" type....

Cheers

PS: Thinking I may try the "Shift key rather than F15" command line switch, see if that helps.

Update  (which may help others tracking down similar gremlins)

The powercfg utility has a lot of interesting parameters, even if most of the output is rather arcane.
The systemsleepdiagnostics parameter gives you a pretty good timeline of idle events, and showed me this (noting I had the settings at 5 hr)

...snip...
The system detected user input.      2021-07-09 08:59:25
The system is entering a sleep state due to the idle timeout.   2021-07-09 13:59:25
... snip...

And this was with stock standard Caffeine running and activated
So, two changes:
- I changed Caffeine to start for all users, rather than just me (my pc wakes automatically via the BIOS timer, and logs me in automatically)
- I used the -useshift switch

Been working fine today, I shortened the Sleep timeout setting to test more frequently during the day. 🤞

I also should mention: Caffeine runs fine on all my other PCs. This one is a hoary old beast, much tweaked, poked and prodded. Almost certainly environmental and not the fault of Caffeine, which - with Stickies - has been in my hip pocket toolkit ever since I was a young'un ... sigh ... a long time ago...


Last edited by radiocam on Sat Jul 10, 2021 2:38 am; edited 2 times in total (Reason for editing : UPdate with new info that may help others)
Sooyke
Sooyke
Posts : 402
Join date : 2018-04-28

Hey! My Caffeine's decaffed! (I think) Empty Re: Hey! My Caffeine's decaffed! (I think)

Sat Jul 10, 2021 12:16 pm
Thanks for the info , this is amazing ( and rather creepy...) the amount and detail it collected and saved . But from the snip you gave it seems it did not register a key event after 08:59:25 ? Does it now for the shift key ?


Best regards ,
avatar
radiocam
Posts : 9
Join date : 2018-11-06

Hey! My Caffeine's decaffed! (I think) Empty Re: Hey! My Caffeine's decaffed! (I think)

Sat Jul 10, 2021 2:44 pm
@Sooyke:
Yes, it tracks a huge amount of detail - but I haven't wrapped my head around all of it.
I did truncate a lot of lines, and I'll show you what that "block" looked like.
But give it a try, it's interesting - and my cut  & paste loses the nice formatting and presentation in the report.
To run:
- open a command prompt with Run as Administrator
- run the command powercfg /systemsleepdiagnostics
- the default file is called system-sleep-diagnostics.html and is created in c:\windows\system32    (The file opens with browser as it's an html file)

I ran the report just now, late night (been doing other stuff) and was puzzled for a while because I kept getting a report identical to yesterday's
Finally realized that my Caffeine is now working so well that no sleep report is being created. Looks like it needs at least one idle transition to create the report for the day. I *think*.
Heck of a lot I don't yet understand about it, but it's pretty interesting stuff. If you google powercfg parameters, you get the MS page on the command. And there is a wealth of info that it seems to collect and report on (when requested). I am pretty sure this is extracted from the Windows event logs.
I'll leave you with what the full block looked like - but it is html formatted, so this will be pretty hard to read as text.
(If you do try it, test with at least one system sleep timeout so it generates a report for you)

... this was from the start of the day's log (my PC wakes up at 7:00
The system idle time was reset because: An application has indicated the user is present.    0:00:00    2021-07-09 07:00:28
The system idle time was reset because: The system detected user input.    0:00:26    2021-07-09 07:00:55
The system idle time was reset because: An application requires system execution.    0:01:07    2021-07-09 07:01:35
The system idle time was reset because: The system detected user input.    0:02:56    2021-07-09 07:03:25
The system idle time was reset because: The system detected user input.    0:03:56    2021-07-09 07:04:25
The system idle time was reset because: The system detected user input.    0:04:56    2021-07-09 07:05:25
The system idle time was reset because: The system detected user input.    0:05:56    2021-07-09 07:06:25
The system idle time was reset because: The system detected user input.    0:06:56    2021-07-09 07:07:25
The system idle time was reset because: The system detected user input.    0:07:56    2021-07-09 07:08:25
The system idle time was reset because: The system detected user input.    0:08:56    2021-07-09 07:09:25
The system idle time was reset because: The system detected user input.    0:09:56    2021-07-09 07:10:25
.... snipped many identical lines, looks like each entry is a mouse or keystroke resetting the idle timer ....
The system idle time was reset because: The system detected user input.    1:55:56    2021-07-09 08:56:25
The system idle time was reset because: The system detected user input.    1:56:56    2021-07-09 08:57:25
The system idle time was reset because: The system detected user input.    1:57:56    2021-07-09 08:58:25
... the next two lines are the ones I pasted in my previous post, in full here ....
The system idle time was reset because: The system detected user input.    1:58:56    2021-07-09 08:59:25
The system idle time was reset because: The system is entering a sleep state due to the idle timeout.    6:58:56    2021-07-09 13:59:25
The system went idle.    6:58:56    2021-07-09 13:59:25
The system idle time was reset because: The system idle parameters changed.    9:25:23    2021-07-09 16:25:52
The system idle time was initialized to 120 seconds. Initialization source: The user is not present. Using UnattendTimeout.    9:25:23    2021-07-09 16:25:52
The system idle time was reset because: An application has indicated the user is present.    9:25:23    2021-07-09 16:25:52
The system idle time was reset because: The system idle parameters changed.    9:25:23    2021-07-09 16:25:52
The system idle time was initialized to 18000 seconds. Initialization source: The user is present, the system is not InstantGo capable but does support S1, S2 or S3, so using IdleTimeout.    9:25:23    2021-07-09 16:25:52
The system idle time was reset because: An application has indicated the user is present.    9:25:23    2021-07-09 16:25:52

... and that was one block  (my term for the way it splits time up in the formatted report) ....
Sooyke
Sooyke
Posts : 402
Join date : 2018-04-28

Hey! My Caffeine's decaffed! (I think) Empty Re: Hey! My Caffeine's decaffed! (I think)

Sat Jul 10, 2021 3:05 pm
Thanks , yes i captured a log using powercfg and the content is amazing ( but mostly beyond my knowledge..... ) from the microsoft website i get the impression that it is needed to debug the sleep and idle software because it seems to be much more complex than i thought like interacting with the hardware .
Yesterday there was a post  ( https://zhornsoftware.forumotion.com/t502-change-keypress-for-caffeine ) so i tried the F17 key and checked the html and it confirmed that a " userinput " was done at one minute intervals .

Forensic evidence tools will have a field day ....

Have a nice weekend   Smile
Admin
Admin
Admin
Posts : 347
Join date : 2018-03-30
Location : London
http://www.zhornsoftware.co.uk

Hey! My Caffeine's decaffed! (I think) Empty Re: Hey! My Caffeine's decaffed! (I think)

Sat Jul 10, 2021 6:52 pm
Wow, that is a really comprehensive output - nice job Microsoft.  I've not seen it before - and it might come in helpful for other people troubleshooting Caffeine thanks.

Tom
avatar
radiocam
Posts : 9
Join date : 2018-11-06

Hey! My Caffeine's decaffed! (I think) Empty Re: Hey! My Caffeine's decaffed! (I think)

Fri Jul 16, 2021 8:53 am
Now I'm really confused.
Because Homer is still going to sleep (I should have called it something else, was probably asking for trouble , but the Simpson family lives on my LAN Wink

Probably more for my benefit, let me run through what I've tried so far (I'll number the instances):
- Caffeine-1 started (no parameters) in my startup folder -> Did not work
- Started Caffeine-2 (also) in the All Users startup, with -useshift option -> Seemed to work for a day
- To narrow down, stopped Caffeine-1 startup, so only Caffeine-2 -> Did not work
- Added Caffeine-1 back into the mix, but with -keypress option -> Did not work (!)

Now, I am pretty sure that either of these would have worked on Bart or Lisa (also W10 PCs)
So there is something on Homer that is interfering with Caffeine. Which is weird, because you'd think "interfering" would usually be in the reverse, ie. keeping a PC awake... But Homer is sort of my development and hobby PC, it runs a heap of Utilities and random software. Erratic behaviour is unsurprising .... but usually explainable with some thought and poking around.

So.. I'm going to disappear for a while and do some more rigorous testing.
(I also have a very shallow knowledge of what the diagnostics report is telling me. Not the main transitions, they are reasonably clear but some other stuff in there.)

We've just gone into a five day lock-down here in Melbourne. So the PC-Troubleshooting gods are urging me along, ha ha

Shall be back....
Cheers
Sponsored content

Hey! My Caffeine's decaffed! (I think) Empty Re: Hey! My Caffeine's decaffed! (I think)

Back to top
Permissions in this forum:
You can reply to topics in this forum