PowerScheduler++ test versions (1 Viewer)

doveman

Portal Pro
February 12, 2008
2,326
178
Home Country
United Kingdom United Kingdom
Re: PowerScheduler++ Test Version 1.2.5.8 for MP 1.2.x / 1.3 Alpha

When I resumed my PC from standby, my TV showed MP with the "Connection to TV service lost" error and asking me to enter the IP address.

When I tried to load TV Server config, nothing happened the first time and the second time brought up the Setup database connection window, which had X4 as the hostname, which is the name of my PC but I'm using the loopback adapter so it's set to 192.168.2.1 in both TV Server and MP config. Trying to test with it set to X4 failed and it still did so after changing it to 192.168.2.1

I then attempted to stop TVService.exe but was unable to, so killed it with TaskManager and tried to restart it, but that failed also.

I have set PS++ to run the following script, named resume.bat, on suspend/wakeup and Reinitialize TVservice is ticked, but I don't think it has been run.

Code:
if "%1" == "suspend" goto OnSuspend
if "%1" == "wakeup" goto OnWakeUp
goto Done

:OnSuspend
process -k “MediaPortal.exe”
goto Done

:OnWakeUp
net stop TVService
net start TVService
"C:\Program Files (x86)\Team MediaPortal\MediaPortal\MediaPortal.exe"
goto Done

:Done

After rebooting, I was able to open TV Server config normally and everything seems to be working. I've recently uninstalled Outpost Security Suite and am using Windows Firewall at the moment, but I believe that only blocks incoming connections and it has prompted me a couple of times about MP-related stuff, which I've allowed, and TV has been working fine.

I've attached logs from when I first noticed the problem, before I did most of the above, and another set after rebooting.
 

michael_t

Portal Pro
November 30, 2008
1,258
813
Home Country
Germany Germany
AW: Re: PowerScheduler++ Test Version 1.2.5.8 for MP 1.2.x / 1.3 Alpha

Well, it seems that you have a database problem. I do have these too every some weeks... You should try to repair the database and see, if the problems are gone then. Search in the forums or in Google how to repair a mySQL database.

With your scripts you should have in mind that the TV service is waiting for the command to complete. So the TV service could hang up if you have a command that does not finish or does not return back control to the TV service. I would be very careful with these things...

Michael
 

doveman

Portal Pro
February 12, 2008
2,326
178
Home Country
United Kingdom United Kingdom
Re: AW: Re: PowerScheduler++ Test Version 1.2.5.8 for MP 1.2.x / 1.3 Alpha

Well, it seems that you have a database problem. I do have these too every some weeks... You should try to repair the database and see, if the problems are gone then. Search in the forums or in Google how to repair a mySQL database.

With your scripts you should have in mind that the TV service is waiting for the command to complete. So the TV service could hang up if you have a command that does not finish or does not return back control to the TV service. I would be very careful with these things...

Michael

I don't know why you thought I had a database problem, but I've just tested and there were no repairs needed.

This script is the one I was using with no problems before I reinstalled Windows & MP. As I said, as far as I can tell from the logs, the script didn't run anyway but I could be wrong on that. I don't understand how the TV Service can be waiting for the command to complete, when the Wakeup sub-routine stops and then restarts the Service.
 

michael_t

Portal Pro
November 30, 2008
1,258
813
Home Country
Germany Germany
AW: Re: AW: Re: PowerScheduler++ Test Version 1.2.5.8 for MP 1.2.x / 1.3 Alpha

I don't know why you thought I had a database problem, but I've just tested and there were no repairs needed.
In both cases the first exception is related to the database.
This script is the one I was using with no problems before I reinstalled Windows & MP. As I said, as far as I can tell from the logs, the script didn't run anyway but I could be wrong on that. I don't understand how the TV Service can be waiting for the command to complete, when the Wakeup sub-routine stops and then restarts the Service.
That's what I meant... ;) You try to stop a process out of itself and I am not sure if this works and does not result in unwanted side effects.

Michael
 

doveman

Portal Pro
February 12, 2008
2,326
178
Home Country
United Kingdom United Kingdom
Re: AW: Re: AW: Re: PowerScheduler++ Test Version 1.2.5.8 for MP 1.2.x / 1.3 Alpha

In both cases the first exception is related to the database.
This script is the one I was using with no problems before I reinstalled Windows & MP. As I said, as far as I can tell from the logs, the script didn't run anyway but I could be wrong on that. I don't understand how the TV Service can be waiting for the command to complete, when the Wakeup sub-routine stops and then restarts the Service.
That's what I meant... ;) You try to stop a process out of itself and I am not sure if this works and does not result in unwanted side effects.

Michael

OK, well I think it was a more an issue of being unable to connect to the database for some reason, rather than the database being corrupt.

I'm sure the script used to work fine, and it's not my creation and others seem to use it OK. I just resumed again and this time had a black TV. In taskmanager I noticed there were two Mediaportal.exe (one about 256Mb, the other about 36M), killing the larger one gave me my wallpaper back on the TV, so I'm not sure what the smaller one was, but it wasn't displaying anything. The Mediaportal.log looks like a new process started but then got stuck on a D3D error, I assume because the already running MP possessed the display, which raises the question why wasn't MP killed by the script before going to standby? I could use the "Restart MP on resume" option in MP config, but then MP may restart before TVService, and as the script doesn't seem to be restarting TVService anyway, it's a bit moot at the moment.

I checked TVservice status and it was Stopping but it seemed to be taking a long while to do this, but has now stopped. There was also a cmd.exe in taskmanager, which I assume was the script, but this has gone now so I don't think TVService.exe is likely to start again. There's two taskhost.exe in taskmanager though. Surely it should be possible for PS++ to pass the script over to something, so that it finishes running even after TVService is stopped (if that is the problem at the moment)?

Is there anyway you can think of to integrate what this script's trying to do into PS++?
 

eb1965

Portal Pro
January 16, 2006
110
1
Bramsche (Osnabrueck)
Home Country
Germany Germany
AW: PowerScheduler++ Test Version 1.2.5.8 for MP 1.2.x / 1.3 Alpha

Ein Wunsch für die nächste Version:

Was ich an der "RUN Command...." Zeile micht so schön finde, ist das man dort nur EINEN Eintrag einstellen kann. Und den muss man dann auch noch definieren, ob er nur für wakeup, nur für standby oder für beides gelten soll. Besser wären da m.E ZWEI Zeilen. EINE für ne CMD bei standby und die ZWEITE für ne CMD bei wakeup. Dann könnte man auch unterschiedliche Programme bei Wakup und bei standby ausführen lassen.
 

stradivarius

Portal Member
January 5, 2012
12
0
57
Home Country
Italy Italy
Re: PowerScheduler++ Test Version 1.2.5.8 for MP 1.2.x / 1.3 Alpha

Please, eb1965, keep in mind this forum is read from all over the world.
What if everyone posts messages in different languages?
I'm Italian, but I understand all users can only exchange infos in English.
At least, try a little bit if your English isn't so good.

Se ti parlassi in Italiano, saresti capace di rispondermi?
Non credo che tutti siano capaci di leggere queste due righe.

Have a nice day!
 

doveman

Portal Pro
February 12, 2008
2,326
178
Home Country
United Kingdom United Kingdom
Re: PowerScheduler++ Test Version 1.2.5.8 for MP 1.2.x / 1.3 Alpha

Hi Michael

I ran into a problem whereby Standby doesn't work if "Grab EPG when idle" is enabled (it blocks it with Legacy Kernel Caller). Not the fault of PS++, but thought I'd draw it to your attention so if anyone else says they can't get PS++ working, you can advise them to disable this and reboot and see if that fixes their problem.

https://forum.team-mediaportal.com/bugreports-74/tvservice-preventing-standby-104613/
 

michael_t

Portal Pro
November 30, 2008
1,258
813
Home Country
Germany Germany
AW: Re: PowerScheduler++ Test Version 1.2.5.8 for MP 1.2.x / 1.3 Alpha

Thank you for this hint. I watched this before only while a recording was active, but not while grabbing EPG. Obvoiuosly some TV card drivers prevent standby always while the card is busy (whatever this means). Some drivers do not even release this system request when the activity is finished. In these cases you should check the "PS++ forces system to standby when idle" option. This allows PS++ to put the system into standby even if some drivers are (wrongly) preventing a system idle timeout.

Michael
 

doveman

Portal Pro
February 12, 2008
2,326
178
Home Country
United Kingdom United Kingdom
Re: AW: Re: PowerScheduler++ Test Version 1.2.5.8 for MP 1.2.x / 1.3 Alpha

In these cases you should check the "PS++ forces system to standby when idle" option. This allows PS++ to put the system into standby even if some drivers are (wrongly) preventing a system idle timeout.

Obviously that's no good if you want Windows to manage standby though (because you use the PC for other stuff and don't want PS++ sending it to sleep in the middle of a game, etc) is it?
 

Users who are viewing this thread

Top Bottom