Results 1 to 3 of 3
  1.    #1  
    I assume most people that have opened this thread are already familiar with stories of Pres becoming "bricked" (or nearly so) due to SmartReflex or CPU-speed-scaling-based power saving setting changes. My simple modification to the patches that implement these settings is to wait ten minutes after start-up before changing any settings.

    This provides an ample opportunity for you to uninstall the startup script (patch) containing the patch if it is giving you trouble. If it is uninstalled in the meantime, the script can again check if you have not removed it before it actually enables the settings. I would advocate all similarly-dangerous scripts having these sort of changes made. Here is an example original script:
    Code:
    # -*- mode: shell-script; -*-
    description "SmartReflex"
    author "Alex Markson"
    version 1.0
    
    start on stopped finish
    stop on runlevel [!2]
    
    console none
    
    script
    
    # SmartReflex
    # "SmartReflex™ driver allows for auto-compensation of VDD1 and
    # VDD2 voltages (around the voltages specified by current OPP)
    # by analyzing the silicon characteristics, temperature, voltage etc"
    #
    # Enable SmartReflex
    echo -n 1 > /sys/power/sr_vdd1_autocomp
    echo -n 1 > /sys/power/sr_vdd2_autocomp
    
    end script
    which I then change to:

    Code:
    # -*- mode: shell-script; -*-
    description "SmartReflex"
    author "Alex Markson"
    version 1.0
    
    start on stopped finish
    stop on runlevel [!2]
    
    console none
    
    script
    
    # SmartReflex
    # "SmartReflex™ driver allows for auto-compensation of VDD1 and
    # VDD2 voltages (around the voltages specified by current OPP)
    # by analyzing the silicon characteristics, temperature, voltage etc"
    #
    # Wait ten minutes and check if this patch has been uninstalled in the meantime
    # before enabling settings that may cause system instability.  Otherwise, it can be
    # difficult to start up the system if the settings do prove unstable.
    (sleep 600
    test -e /etc/event.d/$UPSTART_JOB || exit
    # Enable SmartReflex
    echo -n 1 > /sys/power/sr_vdd1_autocomp
    echo -n 1 > /sys/power/sr_vdd2_autocomp
    ) &
    end script
  2.    #2  
    I just figured out that the Palm Pre suspends itself upon idle so the "ten minutes" in the patch is "ten minutes" of the phone actually being active with the screen on or music playing. This version of the script will account for that:
    Code:
    # -*- mode: shell-script; -*-
    description "SmartReflex"
    author "Alex Markson"
    version 1.0
    
    start on stopped finish
    stop on runlevel [!2]
    
    console none
    
    script
    
    # SmartReflex
    # "SmartReflex™ driver allows for auto-compensation of VDD1 and
    # VDD2 voltages (around the voltages specified by current OPP)
    # by analyzing the silicon characteristics, temperature, voltage etc"
    #
    # Wait ten minutes and check if this patch has been uninstalled in the meantime
    # before enabling settings that may cause system instability.  Otherwise, it can be
    # difficult to start up the system if the settings do prove unstable.
    (Tend=$(($(date +%s) + 600))
    while test $(date +%s) -lt $Tend; do sleep 1; done
    test -e /etc/event.d/$UPSTART_JOB || exit
    # Enable SmartReflex
    echo -n 1 > /sys/power/sr_vdd1_autocomp
    echo -n 1 > /sys/power/sr_vdd2_autocomp
    ) &
    end script
    Last edited by brianfeldman; 11/25/2009 at 01:12 PM. Reason: added content
  3.    #3  
    I made this much easier. Run this from the Palm's command line after installing any of the Powersave patches to give you a failsafe. You will need to run it again before uninstalling the patch, and it will undo the modifications it did.

    Code:
    wget http://green.homeunix.org/~green/safer-powersave.sh
    sh safer-powersave.sh

Tags for this Thread

Posting Permissions