<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mwarren</id>
	<title>WebOS Internals - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mwarren"/>
	<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/wiki/Special:Contributions/Mwarren"/>
	<updated>2026-04-24T15:00:18Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=OpenVPN_for_Palm_Pre&amp;diff=11925</id>
		<title>OpenVPN for Palm Pre</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=OpenVPN_for_Palm_Pre&amp;diff=11925"/>
		<updated>2010-10-22T06:36:43Z</updated>

		<summary type="html">&lt;p&gt;Mwarren: /* OpenVPN client installation */ Add pointer to PreVPNc GUI project.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
OpenVPN enables you to build a secure virtual private network (VPN) connection from your Palm device to another available OpenVPN server, over an encrypted TLS connection. For encryption, it uses the libraries of the OpenSSL program. On the transport layer, it can use TCP or UDP. The secure connection, or &amp;quot;tunnel&amp;quot;, between client and server is created using virtual network devices, using the [http://en.wikipedia.org/wiki/TUN/TAP TUN/TAP] kernel drivers.  With optware, openvpn is easily installable on your palm devices via ipkg. An application scenario could be to connect your Palm device via 3G to your home network, accessing data and services hosted by a NAS, for example.&lt;br /&gt;
&lt;br /&gt;
==OpenVPN client installation==&lt;br /&gt;
To setup a connection to an available OpenVPN endpoint, you need the appropriate kernel module (tun.ko) on your Palm device and build a client-configuration depending and what type of connection you want to create (bridged or routed). The optware OpenVPN ipkg is a clean installation as the clipboard below proves. The Palm Pre/Pixi Linux OS is compiled with the /dev/tun driver built in, so you can ignore the module dependency warning. There are two projects to create GUIs for webOS - [http://code.google.com/p/prevpnc/ PreVPNc on Google Code] and [http://gitorious.org/pre-openvpn pre-openvpn on Gitorious.org].&lt;br /&gt;
&lt;br /&gt;
note: oinstall is alias oinstall=&amp;quot;sudo ipkg-opt install&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
┌─(box@castle)-(09:28:44)-&amp;gt;&lt;br /&gt;
└─(~)--&amp;gt; $ oinstall openvpn&lt;br /&gt;
Installing openvpn (2.1_rc15-1) to root...&lt;br /&gt;
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/openvpn_2.1_rc15-1_arm.ipk&lt;br /&gt;
openvpn: unsatisfied recommendation for kernel-module-tun&lt;br /&gt;
Installing lzo (1.08-2) to root...&lt;br /&gt;
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/lzo_1.08-2_arm.ipk&lt;br /&gt;
Configuring lzo&lt;br /&gt;
Configuring openvpn&lt;br /&gt;
Successfully terminated.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OpenVPN client configuration==&lt;br /&gt;
OpenVPN is deployed quickly and easily. The [http://openvpn.net/ OpenVPN.net] website and source installations contain configuration scripts that can make OpenVPN connect to your home or work when WiFi is activated. The following excerpt assumes that you already have available the following things: &lt;br /&gt;
*a certificate for yourself / your device (in the example, called palmpre.crt)&lt;br /&gt;
*the issuing certificate authority (ca.crt)&lt;br /&gt;
*a key-file (palmpre.key)&lt;br /&gt;
*a client configuration for your Palm device (palmpre.ovpn)&lt;br /&gt;
Be aware, that the abovementioned filenames are only examples. Most likely, you would create these files yourself.&amp;lt;br&amp;gt;&lt;br /&gt;
'''It is highly suggested that you make yourself familiar in creating your own keys (and certificates), in case you are not provided with from a very trusted source!'''&amp;lt;br&amp;gt;  As you create certificates, keys, and certificate signing requests yourself, understand that only .key files should be kept confidential. .crt and .csr files can be sent over insecure channels such as plaintext email.You should never need to copy a .key file between computers.  Normally each computer will have its own certificate/key pair.&amp;lt;br&amp;gt;&lt;br /&gt;
Have a look at the wiki [http://wiki.nas-portal.org/index.php/Install_OpenVPN_on_QNAP#Telnet_Management_Interface Setup optware OpenVPN on a NAS], giving you exact instructions how to. For easy key management, the package easy-rsa provides necessary tools. It is also available via optware and well documented on the OpenVPN website.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
┌─(root@castle)-(10:17:05)-&amp;gt;&lt;br /&gt;
└─(/opt/etc/openvpn)--&amp;gt; # unzip palmpre.zip&lt;br /&gt;
Archive:  palmpre.zip&lt;br /&gt;
   creating: palmpre/&lt;br /&gt;
  inflating: palmpre/ca.crt&lt;br /&gt;
  inflating: palmpre/palmpre.key&lt;br /&gt;
  inflating: palmpre/palmpre.crt&lt;br /&gt;
  inflating: palmpre/palmpre.conf&lt;br /&gt;
  inflating: palmpre/dh2048.pem&lt;br /&gt;
  inflating: palmpre/palmpre.ovpn&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Starting OpenVPN==&lt;br /&gt;
For a first connection test, you should start openvpn on your Palm device allowing it to write to standard out. Thereby, you will be able to follow allong, if anything goes awry during the initialization sequence:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
openvpn --config /opt/etc/openvpn/palmpre/palmpre.ovpn&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
If it connects successfully , you could start it as a background task (adding &amp;amp;), redirecting output to /dev/null. (You could write an upstart script, see the example for the Hamachi VPN in the resources below.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
┌─(root@castle)-(10:19:33)-&amp;gt;&lt;br /&gt;
└─(/opt/etc/openvpn)--&amp;gt; # openvpn --config /opt/etc/openvpn/palmpre/palmpre.ovpn &amp;gt;&amp;gt;/dev/null&amp;amp;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing connection==&lt;br /&gt;
When testing access to your openvpn endpoint (server) from your Palm device, it can be benefitial if both can connect only via the openvpn tunnel (and not reach each other via an alternate route in your home network). The following scenario assumes, that a Palm device connects via openvpn to a private network (possibly your home network) from outside, using 3G (EVDO, UMTS). You can test this by turning off wifi and ssh to your Palm device using a Bluetooth PAN. See if your Palm device still has internet access over 3G, when turning off wifi. (While pinging google, drop wifi and monitor via SSH over Bluetooth PAN):&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
64 bytes from 74.125.67.100: seq=5 ttl=52 time=46.505 ms&lt;br /&gt;
64 bytes from 74.125.67.100: seq=6 ttl=52 time=45.603 ms&lt;br /&gt;
64 bytes from 74.125.67.100: seq=7 ttl=52 time=49.132 ms&lt;br /&gt;
64 bytes from 74.125.67.100: seq=8 ttl=52 time=101.013 ms &lt;br /&gt;
64 bytes from 74.125.67.100: seq=9 ttl=52 time=1556.213 ms &amp;lt;-- cutover wifi to evdo&lt;br /&gt;
64 bytes from 74.125.67.100: seq=10 ttl=52 time=561.371 ms&lt;br /&gt;
64 bytes from 74.125.67.100: seq=11 ttl=52 time=54.932 ms&lt;br /&gt;
64 bytes from 74.125.67.100: seq=12 ttl=50 time=109.436 ms&lt;br /&gt;
64 bytes from 74.125.67.100: seq=13 ttl=50 time=105.896 ms&lt;br /&gt;
64 bytes from 74.125.67.100: seq=14 ttl=50 time=104.523 ms&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you ping IPs in your home network now (the openvpn endpoint/gateway or other IPs behind), traffic to your private network is routed through the encrypted tunnel:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
┌─(root@castle)-(10:33:54)-&amp;gt;&lt;br /&gt;
└─(/opt/etc/openvpn/palmpre)--&amp;gt; # ping 192.218.1.10&lt;br /&gt;
PING 192.218.1.10 (192.218.1.10): 56 data bytes&lt;br /&gt;
64 bytes from 192.218.1.10: seq=0 ttl=42 time=456.665 ms&lt;br /&gt;
64 bytes from 192.218.1.10: seq=1 ttl=42 time=260.773 ms&lt;br /&gt;
64 bytes from 192.218.1.10: seq=2 ttl=42 time=268.189 ms&lt;br /&gt;
&lt;br /&gt;
┌─(root@castle)-(10:35:13)-&amp;gt;&lt;br /&gt;
└─(/opt/etc/openvpn/palmpre)--&amp;gt; # ping 192.218.0.1&lt;br /&gt;
PING 192.218.0.1 (192.218.0.1): 56 data bytes&lt;br /&gt;
64 bytes from 192.218.0.1: seq=0 ttl=64 time=259.552 ms&lt;br /&gt;
64 bytes from 192.218.0.1: seq=1 ttl=64 time=114.898 ms&lt;br /&gt;
64 bytes from 192.218.0.1: seq=2 ttl=64 time=118.958 ms&lt;br /&gt;
&lt;br /&gt;
┌─(root@castle)-(10:35:40)-&amp;gt;&lt;br /&gt;
└─(/opt/etc/openvpn/palmpre)--&amp;gt; # ping 192.218.0.218&lt;br /&gt;
PING 192.218.0.218 (192.218.0.218): 56 data bytes&lt;br /&gt;
64 bytes from 192.218.0.218: seq=0 ttl=64 time=502.137 ms&lt;br /&gt;
64 bytes from 192.218.0.218: seq=1 ttl=64 time=182.556 ms&lt;br /&gt;
64 bytes from 192.218.0.218: seq=2 ttl=64 time=123.016 ms&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==OpenVPN IRC channel==&lt;br /&gt;
The OpenVPN IRC channel ##OpenVPN exists on the same Freenode server #WebOS-Internals is located on. Please stop by either channel with questions after visiting [http://openvpn.net]&lt;br /&gt;
==Further resources==&lt;br /&gt;
#[http://openvpn.net/ OpenVPN.net] The official website of OpenVPN. See the excellent Documentation! (Community software &amp;gt; Documentation &amp;gt; Howto)&lt;br /&gt;
#[http://openvpn.net/easyrsa.html Easy-RSA] Key management tool for OpenVPN&lt;br /&gt;
#[http://www.webos-internals.org/wiki/HamachiVPN  Hamachi on Pre]. Use the popular, proprietary Hamachi for VPN on your Palm device.&lt;br /&gt;
#[http://wiki.nas-portal.org/index.php/Install_OpenVPN_on_QNAP#OpenVPN_GUI Optware OpenVPN on a QNAP Nas] gives you a good example of a complete configuration.&lt;/div&gt;</summary>
		<author><name>Mwarren</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:Govnah&amp;diff=10744</id>
		<title>Application:Govnah</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:Govnah&amp;diff=10744"/>
		<updated>2010-08-10T17:27:12Z</updated>

		<summary type="html">&lt;p&gt;Mwarren: Add sampling_down_factor doc from kernel.org, 2.6.24, Documentation/cpu-freq/governors.txt&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{application&lt;br /&gt;
|name=Govnah&lt;br /&gt;
|type=webOS&lt;br /&gt;
|version=Version: 0.6.1 &amp;lt;br /&amp;gt;(23 July 2010)&lt;br /&gt;
|tag=Utilities&lt;br /&gt;
|screenshot=GovnahHome4Life-0.6.1.png&lt;br /&gt;
|description=}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
=Summary=&lt;br /&gt;
[[image:Icon_WebOSInternals_Govnah.png|frameless|right]]&lt;br /&gt;
Advanced webOS kernels provide mechanisms to control various operating parameters on the device such as clock speed.  These kernels expose one or more &amp;quot;governors&amp;quot; which can control those parameters. An example of such a kernel is the [[Application:UberKernel|UberKernel]].  This application is available through [[Preware]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Purpose===&lt;br /&gt;
The application ''Govnah'' does two things:&lt;br /&gt;
:* It provides a real-time graph of CPU speed, CPU temperature, memory usage and system load &lt;br /&gt;
:* Provides a mechanism for setting the parameters of the &amp;quot;governors&amp;quot; exposed by the kernel and configuring other kernel features.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Real World Examples===&lt;br /&gt;
&lt;br /&gt;
The Uber-Kernel exposes a governor called ''on-demand''.  The on-demand governor increases and decreases clock speed based on the percentage of CPU usage. &lt;br /&gt;
&lt;br /&gt;
The ''on-demand'' governor exposes the following parameters which can be set by Govnah: &lt;br /&gt;
:* scaling_max_freq - Set the maximum frequency your CPU is allowed to scale to.&lt;br /&gt;
:* scaling_min_freq - Same as scaling_max_freq but setting a minimum value.&lt;br /&gt;
:* sampling_rate - How often you want the kernel to look at the CPU usage (in microseconds) Typically this is set to values of 10000 or more.&lt;br /&gt;
:* up_threshold - This defines what the average CPU usage percentage increase between samplings for the kernel to decide to increase the CPU frequency. &lt;br /&gt;
:* ignore_nice_load - If '0' (its default), all processes are counted towards the 'cpu utilization' value. When set to '1', the processes that are run with a 'nice' value will not count (and thus be ignored) in the overall usage calculation. &lt;br /&gt;
:* powersave_bias - This modifies the behavior of the ondemand governor to save more power by reducing the target frequency by a specified percentage. The bias is in tenths of a percent (0 to 1000).  A setting of 100 will result in a 10% smaller increase in CPU speed for a given usage than a setting of 0 would result in.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each &amp;quot;Governor&amp;quot; in the kernel tells ''Govnah'' what parameters it has that may be set and may also say what the limits of those parameters are.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Current Governors===&lt;br /&gt;
&lt;br /&gt;
Current governors available in the Uber-Kernel and supported by Govnah include: &lt;br /&gt;
:* On-demand - described above, increases clock speed in response to increases in CPU load. &lt;br /&gt;
:* Conservative - The opposite of on-demand conservative decreases CPU clock speed in response to decreases in CPU load. &lt;br /&gt;
:* Userspace - sets the CPU speed to a defined rate as chosen by LunaSysMgr&lt;br /&gt;
:* powersave - sets the CPU speed to the min frequency value&lt;br /&gt;
:* performance - sets the CPU speed to the max frequency value&lt;br /&gt;
:* screenstate - runs at a higher speed when the screen is on and at 500MHz when the screen is off &lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
=Installation=&lt;br /&gt;
The following guide assumes a Palm Pre/Pre+ that has the original 1.4.1.1 kernel and no over-clocking patches.&lt;br /&gt;
&lt;br /&gt;
#On Preware's home screen, type &amp;quot;Gov&amp;quot; and hit enter.&lt;br /&gt;
#Select &amp;quot;Govnah&amp;quot; and &amp;quot;Install&amp;quot;&lt;br /&gt;
#If you have not yet installed a &amp;quot;Kernel&amp;quot;, on Preware's home screen, type &amp;quot;uber&amp;quot; and hit enter.&lt;br /&gt;
#Select &amp;quot;[[Application:UberKernel|UberKernel (Palm Pre/Pre+)]]&amp;quot; and &amp;quot;Install&amp;quot;&lt;br /&gt;
#Restart your phone as promted&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
=Brief Usage=&lt;br /&gt;
===Where To Start===&lt;br /&gt;
{| Width=&amp;quot;61%&amp;quot; VAlign=&amp;quot;top&amp;quot;&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|[[image:GovnahTapProfile-0.6.1.png|160px|frameless|left|text-top]]&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|To begin accessing the power of Govnah's control over the Linux Kernel, tap the &amp;quot;Profile&amp;quot; row at the top of the main screen.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Profiles===&lt;br /&gt;
{| Width=&amp;quot;61%&amp;quot; VAlign=&amp;quot;top&amp;quot;&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|[[image:GovnahTapAdvanced-0.6.1.png|160px|frameless|left|text-top]]&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|Here is the list of stored Govnah Profiles.  Profiles are a simple way for you store various settings that you wish to be applied at boot-time.  You have the ability to store several different profiles for testing the best settings for '''your''' usage.  Tap &amp;quot;Advanced Settings&amp;quot; at the top to access the individual settings that get stored in the profiles.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Advanced Settings===&lt;br /&gt;
{| Width=&amp;quot;61%&amp;quot; VAlign=&amp;quot;top&amp;quot;&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|[[image:GovnahAdvSettings2-0.6.1.png|160px|frameless|left|text-top]]&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|This is the list of configurable items.  They are explained in more depth below.  You are ''strongly'' encouraged to read about what these settings mean and do.  Not all of them are beneficial to you or your battery.  Most of the defaults are a happy medium between the two.  The main one to change is &amp;quot;CPU Frequency&amp;quot;.  Tap that now.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CPU Frequency===&lt;br /&gt;
{| Width=&amp;quot;61%&amp;quot; VAlign=&amp;quot;top&amp;quot;&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|[[image:GovnahCPUFreq-0.6.1.png|160px|frameless|left|text-top]]&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|The first time you boot your Pre/Pixi after installing Govnah and UberKernel, it will be running at 600MHz.  This is where you ramp it up to 800MHz.  Select &amp;quot;800Mhz&amp;quot; in the &amp;quot;Set Speed&amp;quot; section and tap &amp;quot;Apply Settings&amp;quot;.  Your phone will immediately be running at 800Mhz.  Gesture Swipe left return to the &amp;quot;Advanced Settings&amp;quot; screen.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Compressed Swap (compcache)===&lt;br /&gt;
{| Width=&amp;quot;61%&amp;quot; VAlign=&amp;quot;top&amp;quot;&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|[[image:govnahCompSwap-0.6.1.png|160px|frameless|left|text-top]]&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|Compressed swap (compcache) is simply an amount of RAM (memory) that is reserved for compressing data loaded into RAM when the amount of RAM needed exceeds the space available. In a nut shell this provides more RAM space for application data to be loaded in RAM. The trade off is slightly reduced performance of the RAM for the data that is being compressed and uncompressed. But is faster than if the data were in a swap space on the internal storage drive (memory). To use this feature you must first set the amount of space that will be reserved and then toggle compcache enabled to on. Then click apply to make the settings active. If you desire to change the amount of space reserved once it has been active you must turn compcache enabled to off and click apply. Then change the amount of space reserved, turn compcache enabled to on, and click apply to make the new setting active.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Saving your Profile===&lt;br /&gt;
{| Width=&amp;quot;61%&amp;quot; VAlign=&amp;quot;top&amp;quot;&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|[[image:GovnahPalm4Life-0.6.1.png|160px|frameless|left|text-top]]&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|After leaving the step above, you will have ended up back at the &amp;quot;Advanced Settings&amp;quot; screen where the button &amp;quot;Save Current Profile&amp;quot; is at the bottom. This is where you can make your Pre/Pixi set to boot with your faster speed.  Set the name you want here and tap &amp;quot;Save As New Profile&amp;quot;.  Gesture swipe left to return to the &amp;quot;Profiles&amp;quot; screen.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Profile Management===&lt;br /&gt;
{| Width=&amp;quot;61%&amp;quot; VAlign=&amp;quot;top&amp;quot;&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|[[image:GovnahMegaProfiles2-0.6.1.png|160px|frameless|left|text-top]]&lt;br /&gt;
|valign=&amp;quot;top&amp;quot;|As you can clearly see, you can save many different profiles for testing various settings to find what best suits you and your usage patterns to find that &amp;quot;sweet spot&amp;quot; between speed and battery savings.  Only you can find this.  [http://forums.precentral.net/webos-internals/244701-govnah.html People can help suggest] what works for them, but no two devices are '''exactly''' the same.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Governors In-Depth=&lt;br /&gt;
* Generic items (needed for all)&lt;br /&gt;
** scaling_max_freq - Set the maximum frequency your CPU(s) are allowed to scale to. Look at the output from scaling_available_frequencies&lt;br /&gt;
** scaling_min_freq - Same as scaling_max_freq but setting a value that will not allow the CPU(s) to go below.&lt;br /&gt;
&lt;br /&gt;
* ondemand&lt;br /&gt;
** sampling_rate - This is measured in microseconds (one millionth of a second). This is how often you want the kernel to look at the CPU usage and to make decisions on what to do about the frequency. Typically this is set to values of around '10000' or more. If you wanted to set the sampling rate to 1 second you would set it to 1000000 like in the following example.&lt;br /&gt;
** sampling_rate_(min|max) - This is minimum and maximum sampling rates available that you may set 'sampling_rate' to. I believe in microseconds also.&lt;br /&gt;
** sampling_down_factor: this parameter controls the rate that the CPU makes a decision on when to decrease the frequency. When set to its default value of '5' it means that at 1/5 the sampling_rate the kernel makes a decision to lower the frequency. Five &amp;quot;lower rate&amp;quot; decisions have to be made in a row before the CPU frequency is actually lower. If set to '1' then the frequency decreases as quickly as it increases, if set to '2' it decreases at half the rate of the increase.&lt;br /&gt;
** up_threshold - This defines what the average CPU usage between the samplings of 'sampling_rate' needs to be for the kernel to make a decision on whether or not it should increase the frequency. For example when it is set to its default value of '80' it means that between the checking intervals the CPU needs to be on average more than 80% in use to then decide that the CPU frequency needs to be increased. &lt;br /&gt;
** ignore_nice_load - This parameter takes a value of '0' or '1'. When set to '0' (its default), all processes are counted towards the 'cpu utilization' value. When set to '1', the processes that are run with a 'nice' value will not count (and thus be ignored) in the overall usage calculation. &lt;br /&gt;
** powersave_bias - This modifies the behavior of the ondemand governor to save more power by reducing the target frequency by a specified percentage. By default, (powersave_bias  = 0), the ondemand governor selects the minimum processor frequency that can still complete a workload with minimal idle time. Doing so should result in the highest performance to power efficiency ratio. In some cases, you might prefer a greater emphasis on power efficiency than performance. In this case, set the powersave_bias parameter to a value between 1 and 1000 to reduce the target frequency by one-thousandth of that value. For example, set powersave_bias to 100 for a one-tenth reduction in target frequency. In this case, if the governor chooses a target frequency of 2 GHz (with powersave_bias  = 100), the governor instead will request 1.8GHz – a one-tenth reduction. If 1.8 GHz is an exact match with an available hardware frequency (listed in the scaling_available_freq parameter), the processor is set to this frequency. If 1.8 GHz is not available, the processor fluctuates between the closest available upper and lower frequencies for an average frequency of 1.8 GHz. (from IBM web page). The original author of the ondemand powersave_bias code explains it as &amp;quot;For example, If ondemand requests 2.0GHz based on utilization, and powersave_bias=100, this code will knock 10% off the target and seek a target of 1.8GHz instead of 2.0GHz until the next sampling. If 1.8 is an exact match with an hardware frequency we use it, otherwise we average our time between the frequency next higher than 1.8 and next lower than 1.8&amp;quot; (from http://osdir.com/ml/kernel.cpufreq/2006-07/msg00114.html ) - the key word appears to be &amp;quot;average&amp;quot;. The author also warns &amp;quot;In practice, users will not be able to detect a difference between 0.1% increments, but 1.0% increments turned out to be too large. Also, the max value of 1000 (100%) would simply peg the system in its deepest power saving P-state, unless the processor really has a hardware P-state at 0Hz&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* conservative&lt;br /&gt;
** freq_step - This describes what percentage steps the CPU freq should be increased and decreased smoothly by. By default the CPU frequency will increase in 5% chunks of your maximum CPU frequency. You can change this value to anywhere between 0 and 100 where '0' will effectively lock your CPU at a speed regardless of its load whilst '100' will, in theory, make it behave identically to the &amp;quot;ondemand&amp;quot; governor. &lt;br /&gt;
** down_threshold - This is same as the 'up_threshold' found for the &amp;quot;ondemand&amp;quot; governor but for the opposite direction. For example when set to its default value of '20' it means that if the CPU usage needs to be below 20% between samples to have the frequency decreased. &lt;br /&gt;
** sampling_rate - same as ondemand.&lt;br /&gt;
** sampling_rate_(min|max) - same as ondemand.&lt;br /&gt;
** up_threshold - same as ondemand.&lt;br /&gt;
** ignore_nice_load - same as ondemand.&lt;br /&gt;
&lt;br /&gt;
* userspace&lt;br /&gt;
** scaling_setspeed - one of the values from scaling_available_frequencies&lt;br /&gt;
** NB - when userspace is selected LunaSysMgr will change the frequency as it feels.&lt;br /&gt;
&lt;br /&gt;
* powersave&lt;br /&gt;
** Nothing special&lt;br /&gt;
&lt;br /&gt;
* performance&lt;br /&gt;
** Nothing special&lt;br /&gt;
&lt;br /&gt;
* screenstate&lt;br /&gt;
** Nothing special&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Developer Notes=&lt;br /&gt;
===Relaunching for Cross-App Integration===&lt;br /&gt;
There are 2 different launch params. One to get a list of profiles returned to your app, and one to apply a profile to the phone. This was implemented in v0.3.1.&lt;br /&gt;
&lt;br /&gt;
===Profile List===&lt;br /&gt;
The code below is how you would launch govnah and tell it to return a list of profiles to your app:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
this.controller.serviceRequest&lt;br /&gt;
(&lt;br /&gt;
	'palm://com.palm.applicationManager',&lt;br /&gt;
	{&lt;br /&gt;
		method: 'launch',&lt;br /&gt;
		parameters:&lt;br /&gt;
		{&lt;br /&gt;
			id: 'org.webosinternals.govnah',&lt;br /&gt;
			params:&lt;br /&gt;
			{&lt;br /&gt;
				type: 'get-profiles',&lt;br /&gt;
				returnid: 'app.to.relaunch'&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
);&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
You need to replace the returnid parameters value 'app.to.relaunch' with your apps id.&lt;br /&gt;
&lt;br /&gt;
The object below will be sent to your app-assistants handleLaunch function. (But with real data obviously.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	type: 'govnah-profiles',&lt;br /&gt;
	profiles:&lt;br /&gt;
	[&lt;br /&gt;
		{&lt;br /&gt;
			id: 1,&lt;br /&gt;
			name: 'Palm Default'&lt;br /&gt;
		},&lt;br /&gt;
		{&lt;br /&gt;
			id: 8,&lt;br /&gt;
			name: 'Awesome Profile!'&lt;br /&gt;
		},&lt;br /&gt;
		{...}&lt;br /&gt;
	]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Profile Apply===&lt;br /&gt;
The code below is how you use the list of profiles you received in the prior relaunch to have govnah apply a profile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
this.controller.serviceRequest&lt;br /&gt;
(&lt;br /&gt;
	'palm://com.palm.applicationManager',&lt;br /&gt;
	{&lt;br /&gt;
		method: 'launch',&lt;br /&gt;
		parameters:&lt;br /&gt;
		{&lt;br /&gt;
			id: 'org.webosinternals.govnah',&lt;br /&gt;
			params:&lt;br /&gt;
			{&lt;br /&gt;
				type: 'set-profile',&lt;br /&gt;
				profileid: 1&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
);&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Replace 'profileid' parameters value with the profile id you wish govnah to apply. Note that 'profilename' is also an accepted parameter. This launch will not relaunch your app, it will simply apply if the profileid/name you requested actually exists. (And will just ignore your request if it doesn't.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
* http://www.pantz.org/software/cpufreq/usingcpufreqonlinux.html&lt;br /&gt;
* http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=/liaai/cpufreq/TheOndemandGovernor.htm&lt;br /&gt;
* http://fasterdata.es.net/TCP-tuning/linux.html&lt;br /&gt;
* http://www.pdfgeni.com/book/Performance-analysis-of-loss-based-high-speed-TCP-congestion-control-algorithms-pdf.html - collection of documents on implementation of different IPv4 congestion control methods.&lt;br /&gt;
* http://www.mjmwired.net/kernel/Documentation/cpu-freq/governors.txt - Kernel documentation for the standard Linux CPU frequency governors&lt;/div&gt;</summary>
		<author><name>Mwarren</name></author>
	</entry>
</feed>