Bug#701785: laptop-mode-tools: Battery alarm level abnormally high, no option to disable check

2013-02-27 Thread Ritesh Raj Sarraf
On Wednesday 27 February 2013 10:54 AM, Mike Roddewig wrote:
 The battery in my Thinkpad T420 reports an abnormally high alarm level which
 results in laptop-mode-tools disabling the data-loss sensitive features, even
 at 50% battery charge. There is no option to disable this check in the
 configuration file. The offending code starts on line 818. For the time being
 I've commented out the if block (lines 818-830) which fixed the problem.

 $ cat /sys/class/power_supply/BAT0/alarm
 2455000
 $ cat /sys/class/power_supply/BAT0/charge_full
 4911000
Yup!!! Maybe we should have that configurable. It was done with the
assumption that the report we get from underneath is always correct.

-- 
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
Necessity is the mother of invention.




signature.asc
Description: OpenPGP digital signature


Bug#701785: laptop-mode-tools: Battery alarm level abnormally high, no option to disable check

2013-02-27 Thread Mike Roddewig
Added a configuration option to disable the check, attached a patch that fixes
the problem. I'm sorry if I didn't get anything quite right, this is my first
time submitting a patch! :)

Mike

On Wed, 27 Feb 2013 14:35:49 +0530
Ritesh Raj Sarraf r...@researchut.com wrote:

 On Wednesday 27 February 2013 10:54 AM, Mike Roddewig wrote:
  The battery in my Thinkpad T420 reports an abnormally high alarm level which
  results in laptop-mode-tools disabling the data-loss sensitive features,
  even at 50% battery charge. There is no option to disable this check in the
  configuration file. The offending code starts on line 818. For the time
  being I've commented out the if block (lines 818-830) which fixed the
  problem.
 
  $ cat /sys/class/power_supply/BAT0/alarm
  2455000
  $ cat /sys/class/power_supply/BAT0/charge_full
  4911000
 Yup!!! Maybe we should have that configurable. It was done with the
 assumption that the report we get from underneath is always correct.
 
 -- 
 Ritesh Raj Sarraf
 RESEARCHUT - http://www.researchut.com
 Necessity is the mother of invention.
 
 


-- 
Mike Roddewig m...@dietfig.org


patch
Description: Binary data


pgptlX4F_6Uor.pgp
Description: PGP signature


Bug#701785: laptop-mode-tools: Battery alarm level abnormally high, no option to disable check

2013-02-26 Thread Mike Roddewig
Package: laptop-mode-tools
Version: 1.61-2
Severity: normal

Dear Maintainer,

The battery in my Thinkpad T420 reports an abnormally high alarm level which
results in laptop-mode-tools disabling the data-loss sensitive features, even
at 50% battery charge. There is no option to disable this check in the
configuration file. The offending code starts on line 818. For the time being
I've commented out the if block (lines 818-830) which fixed the problem.

$ cat /sys/class/power_supply/BAT0/alarm
2455000
$ cat /sys/class/power_supply/BAT0/charge_full
4911000



-- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages laptop-mode-tools depends on:
ii  lsb-base4.1+Debian8
ii  psmisc  22.19-1+deb7u1
ii  util-linux  2.20.1-5.3

Versions of packages laptop-mode-tools recommends:
ii  ethtool 1:3.4.2-1
ii  hdparm  9.39-1+b1
ii  net-tools   1.60-24.2
pn  sdparm  none
ii  udev175-7
ii  wireless-tools  30~pre9-8

Versions of packages laptop-mode-tools suggests:
ii  acpid  1:2.0.16-1
pn  halnone

-- Configuration Files:
/etc/laptop-mode/conf.d/usb-autosuspend.conf changed:
DEBUG=0
CONTROL_USB_AUTOSUSPEND=auto
AUTOSUSPEND_USE_WHITELIST=0
AUTOSUSPEND_USBID_BLACKLIST=046d:c063
AUTOSUSPEND_USBTYPE_BLACKLIST=
AUTOSUSPEND_USBID_WHITELIST=
AUTOSUSPEND_USBTYPE_WHITELIST=
BATT_SUSPEND_USB=1
LM_AC_SUSPEND_USB=0
NOLM_AC_SUSPEND_USB=0
AUTOSUSPEND_TIMEOUT=2

/etc/laptop-mode/laptop-mode.conf changed:
ENABLE_LAPTOP_MODE_TOOLS=1
VERBOSE_OUTPUT=1
LOG_TO_SYSLOG=1
DEBUG=0
ENABLE_LAPTOP_MODE_ON_BATTERY=1
ENABLE_LAPTOP_MODE_ON_AC=0
ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED=0
ENABLE_AUTO_MODULES=1
MINIMUM_BATTERY_CHARGE_PERCENT=3
DISABLE_LAPTOP_MODE_ON_CRITICAL_BATTERY_LEVEL=0
HD=/dev/[hs]d[abcdefgh]
PARTITIONS=auto /dev/mapper/*
ASSUME_SCSI_IS_SATA=1
LM_BATT_MAX_LOST_WORK_SECONDS=300
LM_AC_MAX_LOST_WORK_SECONDS=360
CONTROL_READAHEAD=1
LM_READAHEAD=3072
NOLM_READAHEAD=128
CONTROL_NOATIME=0
USE_RELATIME=1
CONTROL_HD_IDLE_TIMEOUT=1
LM_AC_HD_IDLE_TIMEOUT_SECONDS=20
LM_BATT_HD_IDLE_TIMEOUT_SECONDS=20
NOLM_HD_IDLE_TIMEOUT_SECONDS=7200
CONTROL_HD_POWERMGMT=auto
BATT_HD_POWERMGMT=1
LM_AC_HD_POWERMGMT=254
NOLM_AC_HD_POWERMGMT=254
CONTROL_HD_WRITECACHE=1
NOLM_AC_HD_WRITECACHE=1
NOLM_BATT_HD_WRITECACHE=0
LM_HD_WRITECACHE=0
CONTROL_MOUNT_OPTIONS=1
LM_DIRTY_RATIO=60
NOLM_DIRTY_RATIO=40
LM_DIRTY_BACKGROUND_RATIO=1
NOLM_DIRTY_BACKGROUND_RATIO=10
DEF_UPDATE=5
DEF_XFS_AGE_BUFFER=15
DEF_XFS_SYNC_INTERVAL=30
DEF_XFS_BUFD_INTERVAL=1
DEF_MAX_AGE=30
XFS_HZ=100
LM_SECONDS_BEFORE_SYNC=2


-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org