No garbage cleanup

An evolving, supported alternative to Rovi
Forum rules
★ Download the latest EPG123 here: https://garyan2.github.io/ <> Setup guide here: https://garyan2.github.io/install.html
Post Reply
Djpasek

Posts: 9
Joined: Tue Jul 21, 2020 2:39 am
Location:

HTPC Specs: Show details

No garbage cleanup

#1

Post by Djpasek » Thu Feb 11, 2021 9:38 pm

In epg123 version 1.6.2.2 (latest version) running on Windows 10 version 20H2 (fully updated), epg123 downloads program guide data from my Schedules Direct account properly, and imports this program guide data correctly into WMC version 8.8.5 (latest version). So far, so good. But when I check the epg123 "Beginning epg123 client execution" logs, there is no indication that it is ever trying to "verify when garbage cleanup was last run" nor is there any indication of "Entering PerformGarbageCleanup()". Naturally, there is also no indication of "Successfully complete garbage cleanup". Furthermore, in the Registry Editor, there is no key for "dbgc:next run time" under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Service\EPG. Additionally, although the "mcupdate:next run time" key IS present in this same place, the the data value for "mcupdate:next run time" is empty. Now, I am embarrassed to admit that I have had the tasks for mcupdate and mcupdate_scheduled disabled in the task manager (which I have now enabled, realizing my mistake with the help of various threads on this topic) for quite a while now, so this might be a problem. But in addition, in task manager, when I navigate to the "Actions" tab of the mcupdate task, it points to C:\Windows\eHome\mcupdate.exe $(Arg0), not the epg123.exe program. Is this correct? My real problem, which I've been trying to troubleshoot for almost a year now, is that after running epg123 successfully and downloading and importing the program guide data into WMC, my HTPC will not stay asleep after recording a show at night and manually trying to put it to sleep. It appears to sleep for about one minute, then wakes itself up again if the display is shut off. Then after 2-3 minutes, it appears to go back to sleep again, but only for about one minute before waking up again, and this cycle will go on all night. powercfg says it is the ehrec process that is waking the HTPC up when stuck in this cycle, and the only thing that stops the cycle is to either end the windows media center host module process (ehrec) in task manager or reboot the HTPC. It seems as if something is preventing the windows media center host module process (ehrec) from being notified that the last recorded show has finished recording, so when I try to but the HTPC to sleep manually, it keeps waking up thinking that a show is still supposed to be recording. So I'm wondering if failure to do garbage cleanup has anything to do with my sleep problem. In other words, could garbage cleanup be running in the background preventing my HTPC to be able to stay asleep? If I could get epg123 to verify in its logs that it was successfully executing garbage cleanup, I could check that possibility off my list. Can anyone help me to get epg123 to do garbage cleanup, given the registry settings I have described? Or better yet, does anyone have any insight as to why ehrec is waking up my HTPC repeatedly ALL NIGHT LONG? Thanks for any help you can give.

User avatar
garyan2

Posts: 7438
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#2

Post by garyan2 » Thu Feb 11, 2021 10:13 pm

The garbage cleanup will run automatically every 5 days unless the epg123_update task action for the client includes the -f (force) or -nogc (no garbage collection) switches. Furthermore, it will not run GC from a [Save & Execute] via the configuration GUI.

To change the mcupdate task to point to the epg123Client.exe, you will need to delete your current task and create a new one. This will do 2 things; it will intercept calls to the task to avoid trying to download packages from the MS servers which are no longer present, and it will basically enable the [Get Latest Guide Listings] button in WMC to run the epg123_update task which could include the garbage collection but has a 5 minute timeout for the monitor. If the 5 minutes expires and the task is still running, you won't get a message in WMC that the guide update has been completed.

The mcupdate_scheduled task can be disabled without issue if you want, but I don't believe there is any harm with leaving it enabled.

For ehrec, only have 1 idea and that is to look at the registry The registry is [\\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Service\Recording] "NextRecordingAt" and see if it makes sense.
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

User avatar
garyan2

Posts: 7438
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#3

Post by garyan2 » Thu Feb 11, 2021 10:22 pm

I forgot 1 other thing for the ehrec issue. Check the task Microsoft\Windows\Media Center\RecordingRestart. This task should be disabled if there are no recordings in progress. If that is not getting disabled, which some folks have reported to be the case, then this might be the issue. I don't have an answer as to why that is happening, though.
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

Djpasek

Posts: 9
Joined: Tue Jul 21, 2020 2:39 am
Location:

HTPC Specs: Show details

#4

Post by Djpasek » Tue Feb 16, 2021 7:23 pm

garyan2 - Thank you for your response. I found it very helpful but I am still struggling a little. Your suggestion to check whether the RecordingRestart task was being reset to "disable" after a show was finished recording was spot on - it wasn't. I don't know why. My workaround was to create a desktop icon that runs a .bat file that: 1) sets the RecordingRestart task to disable, then 2) puts the HTPC to sleep using PSTools. I click on this desktop icon every night prior to going to bed to put my HTPC to sleep with the RecordingRestart task reset to disable. That works and prevents the wake/sleep endless cycling problem. And,thankfully, using PSTools the HTPC wakes up properly in the future to record MC TV show. I do wonder, however, why the RecordingRestart task is not being reset to "disable" after a show is finished recording. I wonder is this is an artifact of MC being grafted onto Windows 10 and not really being fully integrated with the W10 operating system.

But I need a little more help with the garbage collection. This is what I've done: 1) deleted the mcupdate task (that runs mcupdate.exe) as you instructed. 2) created a new mcupdate task with the "action" tab pointing to "...epg123client.exe" WITHOUT any switches (no $(Arg0)...whatever that is) or anything else) and a trigger of running daily at 1:00 pm. and 3) I've disabled the mcupdate_scheduled task (as you suggested). Now, at 1:00 pm daily, the new mcupdate task is triggered, epg123client.exe runs, but in the epg123 log, although I do get indication that epg123client is started (and the epg123client GUI window pops up), I get only one line in the log that says "no tasks scheduled to run" and nothing else happens. After this, the task scheduler says the new mcupdate task has run successfully and reschedules it to run the next day at 1:00 pm. Also, in the registry, under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Service\EPG there is no key for "dbgc:next run time". And the value for "mcupdate:next run time" is empty. The "dl" key is set to 0, however, and at least that is good.

Question #1: Shouldn't there be a registry key for "dbgc:next run time" already in the registry, or do I have to create it? Could this be why epg123client.exe is not doing GC? Should the registry setting for "dbgc:next run time" have been created when I installed epg123 v.1.6.2.2?

Question #2: If I do have to create it, what is the proper value for the date: yyyy-mm-dd, mm-dd-yyyy, or dd-mm-yyyy? I know there was some confusion about this a few months ago on this board so I wondered what your latest thoughts are about this.

Question #3: Am I just being too impatient and all I need to do is wait 5 days and I will see GC performed upon the 5th running of epg123client.exe in the logs?

Thanks for your help again. Once I get this thing working, expect a little money coming your way. :)

User avatar
garyan2

Posts: 7438
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#5

Post by garyan2 » Wed Feb 17, 2021 12:33 am

Sorry, when I said to delete your scheduled task I meant the epg123 task... not the mcupdate task. Just open the client, in the upper left corner click the [Delete] button and then click the same [Create] button. It will correct/update the mcupdate task. The next scheduled run should do garbage cleanup and when it is complete it will add the registry entry "dbgc:next run time".
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

Djpasek

Posts: 9
Joined: Tue Jul 21, 2020 2:39 am
Location:

HTPC Specs: Show details

#6

Post by Djpasek » Sun Feb 21, 2021 8:07 pm

Thanks again, Gary. This worked. The only issue was when I: 1) opened the client 2) clicked the Delete button in the upper left hand corner to delete the epg123update task, the spinning round blue curser appeared and wouldn't stop until I hit control-alt-delete to navigate to the task manager and ended the epg123 client program in task manager. Despite getting frozen, however, epg123client DID delete the pre-existing epg123update task. The epg123client also froze when creating the new epg123-update task, but again after ending the epg123client application in task manager, the new epg123-update task WAS properly created. And everything works, now, including garbage collection.

Any idea why the epg123 client is freezing up when deleting an old and creating a new task?

User avatar
garyan2

Posts: 7438
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#7

Post by garyan2 » Sun Feb 21, 2021 8:27 pm

The only thing I can think of is when it tries to update the mcupdate task at the same time. When it creates a task, it will change the mcupdate task to point to epg123client.exe; when it deletes a task, it restores it to point to mcupdate.exe. With the task created, is the mcupdate task pointing to epg123client.exe?
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

Djpasek

Posts: 9
Joined: Tue Jul 21, 2020 2:39 am
Location:

HTPC Specs: Show details

#8

Post by Djpasek » Mon Feb 22, 2021 10:40 pm

Yes, the mcupdate task is pointing to epg123client.exe with the epg123_update task having been created and running properly.

User avatar
garyan2

Posts: 7438
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#9

Post by garyan2 » Mon Feb 22, 2021 11:12 pm

I don't know then. I don't even activate the wait cursor, so the form became unresponsive.

What epg123 does when creating a task:
1) creates the task in xml format and saves to the base folder
2) imports the xml file to create the task
3) modifies the mcupdate task
4) refreshes the scheduled task panel with the latest info

Obviously 1-3 is happening just fine. Not sure what could hang it up during #4 since it obviously didn't have a problem updating the panel when you first open the GUI.
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

Djpasek

Posts: 9
Joined: Tue Jul 21, 2020 2:39 am
Location:

HTPC Specs: Show details

#10

Post by Djpasek » Sun Feb 28, 2021 10:34 pm

Ok then. Probably is unique to my hardware configuration, I would guess. That's not your problem then. Thanks for your help. Keep doing what you do with epg123. I hope people send you a little cash once in a while so you don't get tired of keeping epg123 working. Those of us who LOVE WMC are counting on you. Thanks again.

Post Reply