File: cpufreq-powersave

package info (click to toggle)
obus 1.2.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,480 kB
  • sloc: ml: 14,675; lisp: 52; makefile: 11; xml: 8
file content (19 lines) | stat: -rwxr-xr-x 476 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env ocamlscript
(*
 * cpufreq-powersave
 * -----------------
 * Copyright : (c) 2009, Jeremie Dimino <jeremie@dimino.org>
 * Licence   : BSD3
 *
 * This file is a part of obus, an ocaml implementation of D-Bus.
 *)

Ocaml.packs := ["obus.hal"; "lwt.syntax"]
--

(* Set the cpufreq governor to powersave on all cpus *)

let () = Lwt_main.run begin
  lwt computer = Lazy.force Hal_device.computer in
  Hal_device.Cpufreq.set_cpufreq_governor computer "powersave"
end