Patch webOS Changing the "Turn off after X" time

From WebOS Internals
Revision as of 15:12, 18 September 2009 by Lukehale (talk | contribs) (Editing Process)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
<<- Return to webOS Patches


Changing the "Turn off after X" time in the Palm Pre ("Screen and Lock Menu")

By Townsend Harris ("tharris-" IRC channel)

Ultimately what this does is allow you to change the idle time value that turns the pre off. So this setting tells the pre "After X seconds of activity go to sleep". Now for me I wanted say 5 minutes so I can test stuff, but the average person might be ok with the 30 seconds, 1 minute, 2 minutes, or 3minutes, now we have an option.

SPECIAL NOTE: Changing this value to less than 30 seconds means you better be acting fast, as a side note I was able to set the value to 1 second and still operate the pre (I do not recommend this), but I had to be very fast. Also changing this value to a high number *can* drain your battery so be aware.

If all you want to do is keep the screen on while charging, you can set that using luna-send. Your screen will stay on when on usb power and wall power. When on the Touchstone, the Pre will still go back to the "lock" screen after the timeout period.

luna-send -n 1 palm://com.palm.display/control/setProperty '{"onWhenConnected":true}'

Editing Process


1) Access Linux on your phone: Portal:Accessing_Linux

2) SSH to your pre and sudo to root. Execute "rootfs_open -w".

3) make a copy of the original "/usr/palm/applications/" file by executing the following:

"cp /usr/palm/applications/ /usr/palm/applications/"

4) edit the /usr/palm/applications/ file

Goto line 102 (WebOS 1.1: Line 111, WebOS 1.2: Line 117) which should like like:

**//Available Timer Values.
 availableTimers: "[{label: $L('30 seconds'), value:30},{label: $L('1 minute'), value:60},{label: $L('2 minutes'), value:120},{label: $L('3 minutes'), value:180}],"**

and add this to the end of the string inside the last "]": ",{label: $L('5 Minutes'), value:300}" and edit it as you see fit. This will add "5 Minutes" to the drop down menu. You can add further options as you require (i.e. 30 minutes, 3 hours, etc.).

REMEMBER the value is based on SECONDS

5) Execute a rescan by running "luna-send -n 1 palm://com.palm.applicationManager/rescan {}" on the command line.

6) Execute "mount -o remount,ro /".

Voila you have changed your idle timeouts.

Patch Process

A version of this patch to set a "Never" option (actually only for 3 hours) is located in the webos-internals gitorious repository. Click Applying Patches for info on patching from it.