File: README.events

package info (click to toggle)
powersave 0.14.0-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,764 kB
  • ctags: 999
  • sloc: sh: 11,357; cpp: 8,103; ansic: 2,631; makefile: 388
file content (62 lines) | stat: -rw-r--r-- 2,598 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Events are triggered from the daemon when Hardware changes are
recognised or user requests have been made.

Have a look into @code{/etc/powersave/events} where you may want to
change the default behaviour how events get processed.

The syntax is:
@code{EVENT="action1 action2 action3 ..."}

Events are triggered e.g. when:
@itemize
@item power/sleep button presses and the lid closing/opening.
@item battery levels are exceeded
@item the power source changes (AC/Battery)
@item temperature limits are reached
@item the user requests a suspend/standby sleeping state
@item the machine resumes from a suspend/standby sleeping state
@item the daemon is stopped/started
@item the user manually requests a power save policy, so called scheme change
@item the CPU usage was under a certain level for a specific time
   (configurable in cpufreq conf file)
@item Any non thermal, battery, ac or button ACPI event had happend
@end itemize

If an event happens, the configured actions for this event are
processed from left to right.

There are internal (processed from the daemon internally) and external
actions (executed scripts located in @code{/usr/lib/powersave/scripts})
that can be assigned to each event.

Internal actions (name is reserved, scripts must not be named like that)
currently are:
@itemize
@item	ignore		(do nothing)
@item	throttle	(throttle cpu(s) if throttling is enabled in this scheme)
@item	dethrottle	(unthrottle cpu(s))
@item	reread_cpu_capabilities@*
	(Trigger reevaluation of usable CPU speeds. There are machines,
	that cannot run on full speed when on battery. This internal event
	causes a reevaluation of which speeds are available. Usually only
	makes sense in acadapter.*-events).
@item	suspend_to_disk	(Trigger the global.suspend2disk event)
@item	suspend_to_ram	(Trigger the global.suspend2ram event)
@item	standby		(Trigger the global.standby event)
@item	do_suspend_to_disk@*
	(Actually tell kernel to do a suspend-to-disk. Should only be used
	from a global.suspend2disk event)
@item	do_suspend_to_ram  (see do_suspend_to_disk)
@item	do_standby	(see do_suspend_to_disk)
@end itemize
External actions are simply executables (typically scripts) placed in
@code{/usr/lib/powersave/scripts}, the name of the executable is the event
name.

Example: put @code{EVENT_OTHER="debug_events"} into
@code{/etc/powersave/events} to debug the hotkey events on some
ASUS notebooks (the asus_acpi module has to be loaded) and watch
@code{/var/log/messages} for the output of the debug_events script..

See the next chapter (@ref{Scripts}) how to write your own scripts for events.