- September 15, 2006
- 424
- 14
- 63
- Home Country
- United Kingdom
MediaPortal Version: SVN Build 12625 (13.01.2007 / 18:44 CET)
MediaPortal Skin: Blue Two
Windows Version: XP Home SP2
CPU Type: AMD 64X2 4200+
HDD: Samsung 200Gb
Memory: 1Gb DDR
Motherboard: ASUS P1-AH1
Motherboard Chipset: nVidia MCP 51
Motherboard Bios:
Video Card: nVidia GeForce 6150
Video Card Driver: 91.47
Sound Card: Realtek high def
Sound Card AC3: no AC3
Sound Card Driver: 5.10.0.5296
1. TV Card: Hauppauge HVR-1300
1. TV Card Type: DVB-T/Analogue hybrid with mpeg hw encoder
1. TV Card Driver: 2.5e
2. TV Card: Hauppauge Nova T-Stick
2. TV Card Type: DVB-T
2. TV Card Driver: 2.5e
3. TV Card:
3. TV Card Type:
3. TV Card Driver:
4. TV Card:
4. TV Card Type:
4. TV Card Driver:
MPEG2 Video Codec: Intervideo XPack 2.11.15
MPEG2 Audio Codec: Intervideo XPack 2.11.15
Satelite/CableTV Provider: NTL
HTPC Case: ASUS Pundit P1
Cooling:
Power Supply:
Remote: MS MCE
TV: Hyundai Q320 32" LCD
TV - HTPC Connection: DVI
During the testing for another problem with PowerScheduler I noticed this and I've now tracked it down. I'm fairly sure this is caused by the recent changes to allow "PowerScheduler will recover from a critical ShutDown".
Basically what happens is this. If PowerScheduler is in use and a program is scheduled to record and the recording starts while mp is running (not while it is suspended), then after the recording has completed if the user moves to the home screen PowerScheduler will not suspend the system after the set idle time.
How to reproduce
1. Setup to use PowerScheduler:
- ShutDownInterval = 5
- ShutDownMode = suspend
- ForceShutDown = False
- TimerInterval = 30
- WakeUpInterval = 2
- ReinitRecorder = True
2. Start MP
2. Schedule a recording a short time in the future.
3. Go to any non home screen (like MyMusic or MyTV - with TV off).
4. Wait for the recording to start.
5. Move to the home screen.
6. Wait for the recording to finish
7. Wait more than ShutDownInterval, note that MP does not suspend.
What I think is happening is that with the above PowerScheduler is setting a timer for the start of the program (as it should), however because the user is not in the home screen PowerScheduler correctly does not suspend before the program starts to record. However the timer still goes off and this causes the OnWakupTimer method to be called. This call checks to see if the system has previously shutdown correctly and if has not it attempts to "recover" by calling OnSuspend (assuming that OnResume and Start will be called shortly). However the system really has not been shutdown and so there is nothing to recover from. The problem is that OnSuspend cancels the PowerScheduler timer that runs every 30s to check to see if the system should be suspended. So if this is not running then it will not suspend after the program has finished recording and the system is idle.
I'm not 100% what the recovery code was fixing, so my take on a fix for the above may not be correct. But perhaps it would be better to move the code currently in OnWakeupTimer and place it in the window proc just before the code that currently handles the resume messages. That way if the system resumes without having shutdown correctly then the OnSuspend code would be executed thus allowing the OnResume/Start code to run correctly.
Hope this all makes sense....
Andy
MediaPortal Skin: Blue Two
Windows Version: XP Home SP2
CPU Type: AMD 64X2 4200+
HDD: Samsung 200Gb
Memory: 1Gb DDR
Motherboard: ASUS P1-AH1
Motherboard Chipset: nVidia MCP 51
Motherboard Bios:
Video Card: nVidia GeForce 6150
Video Card Driver: 91.47
Sound Card: Realtek high def
Sound Card AC3: no AC3
Sound Card Driver: 5.10.0.5296
1. TV Card: Hauppauge HVR-1300
1. TV Card Type: DVB-T/Analogue hybrid with mpeg hw encoder
1. TV Card Driver: 2.5e
2. TV Card: Hauppauge Nova T-Stick
2. TV Card Type: DVB-T
2. TV Card Driver: 2.5e
3. TV Card:
3. TV Card Type:
3. TV Card Driver:
4. TV Card:
4. TV Card Type:
4. TV Card Driver:
MPEG2 Video Codec: Intervideo XPack 2.11.15
MPEG2 Audio Codec: Intervideo XPack 2.11.15
Satelite/CableTV Provider: NTL
HTPC Case: ASUS Pundit P1
Cooling:
Power Supply:
Remote: MS MCE
TV: Hyundai Q320 32" LCD
TV - HTPC Connection: DVI
During the testing for another problem with PowerScheduler I noticed this and I've now tracked it down. I'm fairly sure this is caused by the recent changes to allow "PowerScheduler will recover from a critical ShutDown".
Basically what happens is this. If PowerScheduler is in use and a program is scheduled to record and the recording starts while mp is running (not while it is suspended), then after the recording has completed if the user moves to the home screen PowerScheduler will not suspend the system after the set idle time.
How to reproduce
1. Setup to use PowerScheduler:
- ShutDownInterval = 5
- ShutDownMode = suspend
- ForceShutDown = False
- TimerInterval = 30
- WakeUpInterval = 2
- ReinitRecorder = True
2. Start MP
2. Schedule a recording a short time in the future.
3. Go to any non home screen (like MyMusic or MyTV - with TV off).
4. Wait for the recording to start.
5. Move to the home screen.
6. Wait for the recording to finish
7. Wait more than ShutDownInterval, note that MP does not suspend.
What I think is happening is that with the above PowerScheduler is setting a timer for the start of the program (as it should), however because the user is not in the home screen PowerScheduler correctly does not suspend before the program starts to record. However the timer still goes off and this causes the OnWakupTimer method to be called. This call checks to see if the system has previously shutdown correctly and if has not it attempts to "recover" by calling OnSuspend (assuming that OnResume and Start will be called shortly). However the system really has not been shutdown and so there is nothing to recover from. The problem is that OnSuspend cancels the PowerScheduler timer that runs every 30s to check to see if the system should be suspended. So if this is not running then it will not suspend after the program has finished recording and the system is idle.
I'm not 100% what the recovery code was fixing, so my take on a fix for the above may not be correct. But perhaps it would be better to move the code currently in OnWakeupTimer and place it in the window proc just before the code that currently handles the resume messages. That way if the system resumes without having shutdown correctly then the OnSuspend code would be executed thus allowing the OnResume/Start code to run correctly.
Hope this all makes sense....
Andy