From WebOS Internals
(Redirected from Govnah)
Jump to navigation Jump to search

This page is currently available in these languages:

Australia.png USA.png Application:Govnah
Germany.png Application:Govnah-DE
France.png Application:Govnah-FR


Icon WebOSInternals Govnah.png

Advanced webOS kernels provide mechanisms to control various operating parameters on the device such as clock speed. These kernels expose one or more "governors" which can control those parameters. An example of such a kernel is the UberKernel. This application is available through Preware.


Govnah's UI provides access to:

  • A real-time graph of CPU speed, CPU temperature, memory usage and system load
  • A mechanism for setting the parameters of the governors exposed by the various Linux kernels.
  • Ability to reduce/raise the amount of power parts of the device uses to reduce battery consumption.
  • Temperature range which lowers/resets CPU frequency to cool down the device under heavy load.
  • Ability to slow down the CPU when battery is low.
  • The amount of swap that can be compressed (compcache).
  • The enabled Linux IO schedulers.
  • The enabled Linux TCP Congestion algorithms.


The following guide assumes a Palm Pre/Pre+/Pre2/Veer/TouchPad is currently running Palm's stock kernel with no over-clocking patches.

  1. On Preware's home screen, type "Govnah" and hit enter.
  2. Select "Govnah" and "Install".
  3. If you have not yet installed a replacement "Kernel", on Preware's home screen, type "uber" and hit enter.
  4. Select "UberKernel" and "Install".
  5. Restart your phone as prompted.

See the the UberKernel page for further information on its abilities and use.

Brief Usage

Where To Start

To begin accessing the power of Govnah's control over the Linux Kernel, tap the "Profile" row at the top of the main screen.


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 "Advanced Settings" at the top to access the individual settings that get stored in the profiles.

Advanced Settings

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 "CPU Frequency". Tap that now.

CPU Frequency

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 "800Mhz" in the "Set Speed" section and tap "Apply Settings". Your phone will immediately be running at 800Mhz. Gesture Swipe left return to the "Advanced Settings" screen.

Compressed Swap (compcache)

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.

Saving your Profile

After leaving the step above, you will have ended up back at the "Advanced Settings" screen where the button "Save Current Profile" 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 "Save As New Profile". Gesture swipe left to return to the "Profiles" screen.

Profile Management

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 "sweet spot" between speed and battery savings. Only you can find this. People can help suggest what works for them, but no two devices are exactly the same.


"Unknown" Profile

  • With webOS 2.1, HP as implemented a 10M compcache natively. This causes a problem with Govnah's abilty to assign your compcache value before the webOS's upstart scripts does which will cacue Govnah to display "Unknown" as a profile name. To remedy:
  1. Save your profile with the stock 10M compcache.
  2. You need to edit /etc/event.d/compcache to reflect your setting.
  • The number is your target size in K. For a 14M compcache: 14 * 1024 = 14336.
  • Reboot your phone.

Governors In-Depth

Real World Examples

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.

The on-demand governor exposes the following parameters which can be set by Govnah:

  • scaling_max_freq - Set the maximum frequency your CPU is allowed to scale to.
  • scaling_min_freq - Same as scaling_max_freq but setting a minimum value.
  • 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.
  • up_threshold - This defines what the average CPU usage percentage increase between samplings for the kernel to decide to increase the CPU frequency.
  • 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.
  • 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.

Each "Governor" in the kernel tells Govnah what parameters it has that may be set and may also say what the limits of those parameters are.

Standard Linux Governors

Generic Items (all)

  • scaling_max_freq: Set the maximum frequency your CPU(s) are allowed to scale to. Look at the output from scaling_available_frequencies
  • scaling_min_freq: Same as scaling_max_freq but setting a value that will not allow the CPU(s) to go below.


  • 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.
  • sampling_rate_(min|max): This is minimum and maximum sampling rates available that you may set 'sampling_rate' to. I believe in microseconds also.
  • 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 "lower rate" 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.
  • 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.
  • 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.
  • 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 "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" (from ) - the key word appears to be "average". The author also warns "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".


  • 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 "ondemand" governor.
  • down_threshold: This is same as the 'up_threshold' found for the "ondemand" 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.
  • sampling_rate: same as ondemand.
  • sampling_rate_(min|max): same as ondemand.
  • up_threshold: same as ondemand.
  • ignore_nice_load: same as ondemand.


  • scaling_setspeed: one of the values from scaling_available_frequencies
  • NB: when userspace is selected LunaSysMgr will change the frequency as it feels.


  • Nothing special


  • Nothing special


  • Nothing special

Developer Notes

Relaunching for Cross-App Integration

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.

Profile List

The code below is how you would launch Govnah and tell it to return a list of profiles to your app:

		method: 'launch',
			id: 'org.webosinternals.govnah',
				type: 'get-profiles',
				returnid: ''

You need to replace the returnid parameters value '' with your apps id.

The object below will be sent to your app-assistants handleLaunch function. (But with real data obviously.)

	type: 'govnah-profiles',
			id: 1,
			name: 'Palm Default'
			id: 8,
			name: 'Awesome Profile!'

Profile Apply

The code below is how you use the list of profiles you received in the prior relaunch to have Govnah apply a profile.

		method: 'launch',
			id: 'org.webosinternals.govnah',
				type: 'set-profile',
				profileid: 1

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.)


Support Development

Btn donateCC LG.gif

Official Forum
Bug Reporting
Registration on the site is required to submit bug reports.
Feature Requests
Registration on the site is required to submit feature requests.