[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#194142: marked as done (longrun should provide a default infrastructure to respond to APM events)

Your message dated Mon, 18 Aug 2003 21:14:24 -0400
with message-id <20030819011424.GA14170@dragon.kitenet.net>
and subject line done
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

Received: (at submit) by bugs.debian.org; 21 May 2003 09:14:26 +0000
>From jean-philippe.guerard@laposte.net Wed May 21 04:14:19 2003
Return-path: <jean-philippe.guerard@laposte.net>
Received: from guerard.net1.nerim.net (corbeaunoir.org) [] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 19IPfu-00019t-00; Wed, 21 May 2003 04:14:18 -0500
Received: from yakkuru.nulle.part (unknown [])
	by corbeaunoir.org (Postfix) with ESMTP
	id BF35C4B901; Wed, 21 May 2003 11:14:16 +0200 (CEST)
Received: by yakkuru.nulle.part (Postfix, from userid 1000)
	id CA70010EF7D; Wed, 21 May 2003 11:14:09 +0200 (CEST)
Date: Wed, 21 May 2003 11:14:08 +0200
From: Jean-Philippe =?iso-8859-1?Q?Gu=E9rard?= <jean-philippe.guerard@laposte.net>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: longrun should provide a default infrastructure to respond to APM events
Message-ID: <20030521091408.GA1447@corbeaunoir.org>
Reply-To: Jean-Philippe =?iso-8859-1?Q?Gu=E9rard?= <jean-philippe.guerard@laposte.net>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="HcAYCG3uE/tztfnV"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
X-Reportbug-Version: 2.10.1
X-Accept-Language: fr en
X-Operating-System: Linux yakkuru 2.4.21-pre7 
User-Agent: Mutt/1.5.4i
Delivered-To: submit@bugs.debian.org
X-Spam-Status: No, hits=-12.3 required=4.0
	autolearn=ham version=2.53-bugs.debian.org_2003_05_20
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_05_20 (

Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

Package: longrun
Version: 0.9-7
Severity: wishlist
Tags: patch

Please find attached 2 files that can be used to provide automatic 
longrun tuning in reaction to APM events.

default-longrun shall be installed to /etc/default/longrun
event.d-longrun shall be installed to /etc/apm/event.d/longrun

Installing these 2 files will do nothing, unless the user 
customize /etc/default/longrun to enable automatic longrun setup.

This script has been tested and is working reasonnably well on my 

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux yakkuru 2.4.21-pre7 #1 dim mai 11 12:10:52 CEST 2003 i686
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro

Versions of packages longrun depends on:
ii  libc6                         2.3.1-17   GNU C Library: Shared libraries an

-- no debconf information

Jean-Philippe Guérard -- mailto:jean-philippe.guerard@laposte.net

Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=default-longrun

# Configuration file for /etc/apm/event.d/longrun
# This file will enable you to set up longrun depending on APM events.

# If this variable is set to 1, APM events will trigger a change in
# longrun settings.


# Performance mode
# Used to set the longrun performance window when running on
# AC power.
# Use "longrun -l" to check the available performance levels


# Economy mode
# Used to set the longrun performance window when running on
# battery.
# Use "longrun -l" to check the available performance levels

ECONOMY="0 70"

# Low battery mode
# Used to set the longrun performance window when the system
# battery is running out.
# Use "longrun -l" to check the available performance levels


# Under which battery charge do we consider the battery charge
# being low (you also need to update /etc/default/apmd).


# Debug mode
# If you set DEBUB to "1", longrun change will be logged to syslog.


Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="event.d-longrun"

#! /bin/sh

# Longrun setup in response to apm events
# Do not make change to this file, use /etc/default/longrun to tune
# this script



# Default values - overiden by /etc/default/longrun

ECONOMY="0 30"

# longrun settings update function

set_longrun () {
[ "$DEBUG" -eq 1 ] && logger -t longrun "$1; perf. window: $2; flag: $3"
"$LONGRUN_BIN" -s $2
"$LONGRUN_BIN" -f $3

# Is APM available

apm_available || exit 0

# Source the default values

if [ -e "$DEFAULTS" ]; then
    . "$DEFAULTS"

# Should we go on?

[ "$LONGRUN_ENABLE" = "1" ] || exit 0

# Check the APM kernel driver version, to see if we
# understand the content of /proc/apm. Then, get the
# remaining battery charge from /proc/apm.

# See /usr/src/linux/arch/i386/kernel/apm.c

APM_VERSION=`cat /proc/apm | cut -d " " -f 1`

if [ "$APM_VERSION" = "1.16" ] ; then
    REMAINING_POWER=`cat /proc/apm | cut -d " " -f 7 | tr -d "%"`

# Is longrun available

[ -x "$LONGRUN_BIN" ] || exit 0

# Act depending on the APM event

case "$1,$2" in

        if `on_ac_power` ; then

            set_longrun "on ac" "$PERFORMANCE" "performance"

        elif [ "$REMAINING_POWER" -eq -1 -o \
               "$REMAINING_POWER" -gt "$BATTERY_THRESHOLD" ] ; then

            set_longrun "on battery" "$ECONOMY" "economy"


            set_longrun "on battery" "$LOW_BATTERY" "economy"


        if `on_ac_power` ; then

            set_longrun "on ac" "$PERFORMANCE" "performance"

        elif [ "$REMAINING_POWER" -gt "$BATTERY_THRESHOLD" ] ; then

            set_longrun "on battery" "$ECONOMY" "economy"


            set_longrun "on battery" "$LOW_BATTERY" "economy"




Received: (at 194142-done) by bugs.debian.org; 19 Aug 2003 01:12:37 +0000
>From joey@kitenet.net Mon Aug 18 20:12:29 2003
Return-path: <joey@kitenet.net>
Received: from kitenet.net [] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 19ov2x-0005C3-00; Mon, 18 Aug 2003 20:12:27 -0500
Received: from dragon.kitenet.net (pm3naxs3-137.access.naxs.com [])
	(using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits))
	(Client CN "Joey Hess", Issuer "Joey Hess" (verified OK))
	by kitenet.net (Postfix) with ESMTP id 57ADE18032
	for <194142-done@bugs.debian.org>; Tue, 19 Aug 2003 01:12:26 +0000 (GMT)
Received: from joey by dragon.kitenet.net with local (Exim 3.35 #1 (Debian))
	id 19ov4q-0003iL-00
	for <194142-done@bugs.debian.org>; Mon, 18 Aug 2003 21:14:24 -0400
Date: Mon, 18 Aug 2003 21:14:24 -0400
From: Joey Hess <joeyh@debian.org>
To: 194142-done@bugs.debian.org
Subject: done
Message-ID: <20030819011424.GA14170@dragon.kitenet.net>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="huq684BweRXVnRxX"
Content-Disposition: inline
User-Agent: Mutt/1.5.4i
Sender: Joey Hess <joey@dragon.kitenet.net>
Delivered-To: 194142-done@bugs.debian.org
X-Spam-Status: No, hits=-9.3 required=4.0
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_8_17 (

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

This patch was applied in longrun 0.9-9. Forgot to put the bug number in
the changelog.

see shy jo

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.2 (GNU/Linux)



Reply to: