What's the best way to auto off? (1 Viewer)

rsbrux

Documentation Group
  • Team MediaPortal
  • April 15, 2007
    1,137
    117
    Home Country
    Switzerland Switzerland
    TV-Server Version: n/a (TVE2)
    MediaPortal Version: 0.2.3.0 stable release
    MediaPortal Skin: BlueTwo wide
    Windows Version: XP MCE RU2
    CPU Type: Intel Pentium 4 @3 GHz
    HDD: Samsung HD501LJ 500GB
    Memory: 3 GB DDR 400 DIMM
    Motherboard: FIC P4M-915GD1-LF
    Motherboard Chipset: Intel i915G / iCH6
    Motherboard Bios: Phoenix 6.00 PG 10 May 2006
    Video Card: Nvidia GeForce 6600
    Video Card Driver: 9.1.4.7
    Sound Card: Realtek High Def. Audio
    Sound Card AC3: no AC3
    Sound Card Driver: 5.10.0.5178
    1. TV Card: Hauppauge HVR-1300 MCE
    1. TV Card Type: hybrid (only analog section in use)
    1. TV Card Driver: 2.116.24167.0
    2. TV Card:
    2. TV Card Type:
    2. TV Card Driver:
    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: dScaler
    MPEG2 Audio Codec: dScaler
    Satelite/CableTV Provider: Telezug (WWZ) Switzerland
    HTPC Case: FSC Scaleo E (FIC Spectra)
    Cooling: OEM
    Power Supply: OEM
    Remote: PDAwin.com TVRC 5.5
    TV: InFocus TD40
    TV - HTPC Connection: DVI

    I want my system to hibernate after 10-20 minutes of inactivity.
    If I use Windows Power Management for this purpose (setting the MP Power Scheduler plugin accordingly), Windows won't trigger hibernation as long as MP is running, even if MP is on the home screen and not playing, recording or udating EPG. However, if I set up MP's Power Scheduler to trigger hibernation, it does so even if I am in the middle of performing system maintenance (which I dom using another PC over a remote desktop connection.
    How can I set things up so that my system will go to sleep when MP is running but inactive, but only if no other foreground processes are active in any login?
     

    Marcusb

    Retired Team Member
  • Premium Supporter
  • February 16, 2005
    1,995
    29
    Melbourne
    If you use the TV Service in TV engine 3, then you can specify processes that will keep the PC turned on if they are running.

    Also, this will probably be a better solution, since the PC will continue to record, even if the MP GUI is not running.
     

    rsbrux

    Documentation Group
  • Team MediaPortal
  • April 15, 2007
    1,137
    117
    Home Country
    Switzerland Switzerland
    If you use the TV Service in TV engine 3, then you can specify processes that will keep the PC turned on if they are running. Also, this will probably be a better solution, since the PC will continue to record, even if the MP GUI is not running.
    Thnks for the tip. I guess this will finally motivate me to move up to TV engine 3. I have been resisting, since I only have a single-place installation, and am more interested in music than TV. However, I haven't succeeded in getting TV working with TV engine 2 since installing the 2.3.0 stable release, so I may as well step up to the challenge.
     

    rsbrux

    Documentation Group
  • Team MediaPortal
  • April 15, 2007
    1,137
    117
    Home Country
    Switzerland Switzerland
    Perhaps MCE Standby Tool is worth a look?
    Forum link
    Homepage

    Hi Sprag,
    Thanks for the tip. I was using MST before I graduated from MCE to MP. Since I had hibernate working all right using a combination of the Windows power manager and MP's built-in scheduler from MP 2.2.0 through 2.3.0 RC2, I was hoping to get this working without having to add another application to the mix.
    I can't be sure my current problems are due to 2.3.0 stable release however, because I rolled back to a pre-MP image in order to do a "virgin" installation.
    Given the problems with TV in my current installation, I may be better off looking at TVE 3 before adding a 3d party component.
     

    phe

    Portal Member
    September 21, 2007
    16
    2
    Home Country
    Germany Germany
    Hi rsbrux,

    I'm in a similar situation: 2 windows accounts, 1 for MP, 1 for work/maintenance via remote desktop connection from laptop; Hibernation via PowerScheduler/Homescreen.

    At the moment, to avoid hibernation during work, I manually set MP to a screen other than home.

    Of course this sucks, so I'm planning to modify PowerScheduler not to trigger hibernation as long as an other user is logged in.

    In order to logoff the second (work) account automatically (in case I forget doing so), i've put together a batch file and set the batch to run after an idle period of x minutes (Windows Task Scheduler).

    But because this would kill any background software as well, the batch file checks whether any given process (like a download manager) is running, and if so, it doesn't logoff the user.

    The weakest point in this, is how to figure out when your background software preventing auto-logoff has finished its work. In my case it's pretty easy as I only use FlashGet which can be told to exit when all downloads are completed.


    Maybe this is useful in some way.
    regards,
    phe



    Batchfile follows:

    Code:
    :: ********************************************************
    :: SafeLogout - Logout current user when countdown reached
    :: 		and none of the defined processes is active
    :: ********************************************************
    
    @echo off
    
    :: OPTIONS ************************************************
    
    	:: list of processes that prevent the logout (.exe-name)
    SET PROC01=flashget.exe
    rem SET YOUR_PROCESS=whatever.exe
    
    	:: duration of countdown before logout (seconds)
    SET TIMEOUT=10
    
    	:: option to force logout (usually not needed, loss of unsaved data!)
    rem SET FORCE=-f
    
    :: ********************************************************
    
    
    :: START **************************************************
    
    SET COUNTDOWN=%TIMEOUT%
    
    
    :: Search process list if any of the "magic" processes is active...
    tasklist /FI "IMAGENAME eq %PROC01%" | find /I /C "%PROC01%" 
    rem tasklist /FI "IMAGENAME eq %YOUR_PROCESS"  | find /I /C "YOUR_PROCESS"
    
    cls
    
    :: if so, leave everything as it is
    if %ERRORLEVEL% LEQ 0 exit 
    
    
    :: otherwise start countdown to logout
    echo Logout in %TIMEOUT% seconds...	### Cancel: CTRL+C + yes  (or click "x")###
    
    
    :: loop to show time left before logout
    SET LOOP=0
    
    :LOOP_START
    	SET /A LOOP=%LOOP%+1
    
    	echo %COUNTDOWN%
    	SET /A COUNTDOWN=%COUNTDOWN%-1
    
    	sleep 1
    	if NOT %errorlevel%==0 ping -w 1000 fake.timeout > nul
    	
    if %LOOP%==%TIMEOUT% GOTO LOOP_BREAK
    GOTO LOOP_START
    
    :LOOP_BREAK
    
    
    :: logout current user now!
    shutdown -l %FORCE% -t 00
     

    Users who are viewing this thread

    Top Bottom