Difference between revisions of "Paramano"

From ArchWiki
Jump to: navigation, search
(Trayfreq Setup)
(33 intermediate revisions by 11 users not shown)
Line 1: Line 1:
 +
[[Category:Power management]]
 +
[[Category:CPU]]
 +
[[it:Trayfreq]]
 +
[[ru:Trayfreq]]
 
== Introduction ==
 
== Introduction ==
 +
Trayfreq (pronounced tray-freek) is a GTK+ application released under GPL that lets you select your CPU's governor or frequency from a tray icon and displays information for your battery.  Trayfreq is designed to be desktop-environment-independent so it depends only on GTK+ and a system tray to show its icons.  Trayfreq is the perfect addition to Xfce, LXDE, and Window Managers (Openbox, Fluxbox, etc.).
  
Trayfreq (pronounced trayfreek) is a GTK+ application released under GPL that lets you select your CPU's governor or frequency from a tray icon; therefore, trayfreq only depends on GTK+ and anything that can show tray icons.
+
{{Warning| Package in AUR might not work with post 3.0.4 kernels. See recent comments. }}
  
== Installing ==
+
=== Latest Version ===
 +
0.2.x.dev1-3
  
Install [http://aur.archlinux.org/packages.php?ID=26999 trayfreq from the AUR]. I suggest using one of the [[AUR Helpers]].
+
=== Features ===
 +
* Displays a icon that shows you the relative current CPU frequency
 +
* When the CPU icon is right-clicked, it provides a menu of available frequencies and governors to choose.
 +
* When the CPU icon is left-clicked, it runs a command (set in config file, default nothing)
 +
* Displays a icon that shows you the status of your Battery (Charging, Discharging, Charged) and its relative current charge (optional)
 +
* Toggling of CPU governor based on if the battery is discharging or not.
 +
* Lightweight, Desktop-Environment Independent
  
== System Setup ==
+
== Installation ==
 +
Install [https://aur.archlinux.org/packages.php?ID=26999 trayfreq] from the [[AUR]]. [[AUR Helpers]] are available.
  
CPU scaling requires you to have a kernel with the ability already built in or have an appropriate driver module loaded.  If the former case represents you, then you do not have to worry.  If the latter case represents you, follow the following steps:
+
=== System Setup ===
 
+
For Trayfreq to work, you will need the appropriate kernel modules loaded and added to your [[rc.conf]]See [[CPU Frequency Scaling]] for instructions on loading cpufreq drivers and governors.
Most modern computers use the module acpi-cpufreq.  Other options include the p4-clockmod, powernow-k6, powernow-k7, powernow-k8, and speedstep-centrino drivers.
+
 
+
To load the driver:
+
# modprobe acpi-cpufreq
+
 
+
To load the driver automatically at start up add the module to /etc/rc.conf
+
# MODULES=( ... acpi-cpufreq ... )
+
 
+
== CPU Governors Setup ==  
+
Some CPU governors may not be built into your kernel, and you can add them to /etc/rc.conf to have them automatically load at start up. Again, edit /etc/rc.conf to load the governors' drivers.
+
  # MODULES=( ... cpufreq-conservative cpufreq-powersave cpufreq-userspace cpufreq-ondemand cpufreq-performance ... )
+
 
+
== Trayfreq Setup ==
+
  
 +
=== Trayfreq Setup ===
 
Now, let's edit the configuration file for trayfreq.
 
Now, let's edit the configuration file for trayfreq.
  # nano /usr/share/trayfreq/trayfreq.config
+
  $ cp /usr/share/trayfreq/trayfreq.config ~/.trayfreq.config
 +
$ nano ~/.trayfreq.config
 
Everything will be commented out; uncomment what you want to use. Let's go through the options
 
Everything will be commented out; uncomment what you want to use. Let's go through the options
*[events] -- the group events
+
*{{Ic|[battery]}} – the group battery
*activate=/usr/bin/xterm -- this sets the program to launch when the tray icon is activated (left clicked usually)
+
**{{Ic|show=1}} – 1 to show the battery tray icon, 0 to not show it
*[governor] -- the group governor
+
**{{Ic|governor=powersave}} – this sets the governor to use if the battery is discharging
*default=ondemand -- this sets the default governor to be set when trayfreq starts
+
*{{Ic|[ac]}} – the group for if the batter is not discharging
*[frequency] -- the group frequency
+
**{{Ic|governor=ondemand}} – this sets the governor to use if the battery is not discharging
*default=800000 -- this sets the default frequency in hertz to be set when trayfreq starts
+
*{{Ic|[events]}} – the group events
Note that, if a default frequency is set, it will override the governor.  Setting a frequency sets the maximum frequency and sets the governor to performance.
+
**{{Ic|activate=/usr/bin/xterm}} – this sets the program to launch when the tray icon is activated (left clicked usually)
 +
*{{Ic|[governor]}} – the group governor
 +
**{{Ic|default=ondemand}} – this sets the default governor to be set when trayfreq starts
 +
*{{Ic|[frequency]}} – the group frequency
 +
**{{Ic|default=800000}} – this sets the default frequency in hertz to be set when trayfreq starts
 +
Note that, if a default frequency is set, it will override the governor.   
  
 
Sample File:
 
Sample File:
 +
[battery]
 +
show=1
 +
governor=powersave
 +
[ac]
 +
governor=ondemand
 
  [events]
 
  [events]
 
  activate=/usr/bin/showbatt
 
  activate=/usr/bin/showbatt
  [governer]
+
  [governor]
 
  default=ondemand
 
  default=ondemand
 
  #[frequency]
 
  #[frequency]
 
  #default=800000
 
  #default=800000
  
 +
If you want, you can have a configuration file in your home folder, but it can now set the program to run when the tray icon is activated too.  The file should be {{ic|~/.trayfreq.config}}; if it exists, trayfreq will not look at {{ic|/usr/share/trayfreq/trayfreq.config}}.
  
If you want, you can have a configuration file in your home folder, but it cannot set the program to run when the tray icon is activated for security reasons.  The file should be ~/.trayfreq.config; if it exists, trayfreq will still look at /usr/share/trayfreq/trayfreq.config for the program to run when the tray icon is activated, but the configuration file in the home folder will override everything else.
+
== Remarks ==
 
+
A desktop file is installed into {{ic|/etc/xdg/autostart/}}. It will automatically start once installed. If you do not want it to start automatically, open the start up manager that comes with your desktop enviroment and uncheck trayfreq.
== Possible Annoyances ==
+
*Because of how trayfreq currently works, if the current governor is to performance, trayfreq will show that it is set to the highest frequency instead of the governor performance. This is because setting it to a specific frequency is setting the maximum frequency to the chosen frequency and changing the governor to performance, and setting the governor to performance is setting the maximum frequency to the maximum available frequency and changing the governor to performance; they're the same!
+
  
 
== External Links ==
 
== External Links ==
[http://u-lite.org/trayfreq trayfreq at u-lite's website]
+
*[http://trayfreq.sourceforge.net Trayfreq's Website]

Revision as of 13:52, 15 December 2012

Introduction

Trayfreq (pronounced tray-freek) is a GTK+ application released under GPL that lets you select your CPU's governor or frequency from a tray icon and displays information for your battery. Trayfreq is designed to be desktop-environment-independent so it depends only on GTK+ and a system tray to show its icons. Trayfreq is the perfect addition to Xfce, LXDE, and Window Managers (Openbox, Fluxbox, etc.).

Warning: Package in AUR might not work with post 3.0.4 kernels. See recent comments.

Latest Version

0.2.x.dev1-3

Features

  • Displays a icon that shows you the relative current CPU frequency
  • When the CPU icon is right-clicked, it provides a menu of available frequencies and governors to choose.
  • When the CPU icon is left-clicked, it runs a command (set in config file, default nothing)
  • Displays a icon that shows you the status of your Battery (Charging, Discharging, Charged) and its relative current charge (optional)
  • Toggling of CPU governor based on if the battery is discharging or not.
  • Lightweight, Desktop-Environment Independent

Installation

Install trayfreq from the AUR. AUR Helpers are available.

System Setup

For Trayfreq to work, you will need the appropriate kernel modules loaded and added to your rc.conf. See CPU Frequency Scaling for instructions on loading cpufreq drivers and governors.

Trayfreq Setup

Now, let's edit the configuration file for trayfreq.

$ cp /usr/share/trayfreq/trayfreq.config ~/.trayfreq.config
$ nano ~/.trayfreq.config

Everything will be commented out; uncomment what you want to use. Let's go through the options

  • [battery] – the group battery
    • show=1 – 1 to show the battery tray icon, 0 to not show it
    • governor=powersave – this sets the governor to use if the battery is discharging
  • [ac] – the group for if the batter is not discharging
    • governor=ondemand – this sets the governor to use if the battery is not discharging
  • [events] – the group events
    • activate=/usr/bin/xterm – this sets the program to launch when the tray icon is activated (left clicked usually)
  • [governor] – the group governor
    • default=ondemand – this sets the default governor to be set when trayfreq starts
  • [frequency] – the group frequency
    • default=800000 – this sets the default frequency in hertz to be set when trayfreq starts

Note that, if a default frequency is set, it will override the governor.

Sample File:

[battery]
show=1
governor=powersave
[ac]
governor=ondemand
[events]
activate=/usr/bin/showbatt
[governor]
default=ondemand
#[frequency]
#default=800000

If you want, you can have a configuration file in your home folder, but it can now set the program to run when the tray icon is activated too. The file should be ~/.trayfreq.config; if it exists, trayfreq will not look at /usr/share/trayfreq/trayfreq.config.

Remarks

A desktop file is installed into /etc/xdg/autostart/. It will automatically start once installed. If you do not want it to start automatically, open the start up manager that comes with your desktop enviroment and uncheck trayfreq.

External Links