FS#22299 - [laptop-mode-tools] Can't set APM level when plugging AC on x86_64

Attached to Project: Arch Linux
Opened by Nicola Mori (snack) - Monday, 03 January 2011, 22:51 GMT
Last edited by Andrea Scarpino (BaSh) - Sunday, 15 May 2011, 20:19 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andreas Radke (AndyRTR)
Dan Griffiths (Ghost1227)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
laptop-mode on x86_64 doesn't set correctly the APM level for /dev/sda when plugging AC of my laptop. It can correctly set it to 1 when unplugging but not to 254 when plugging. My /etc/laptop-mode.conf is below. Note that this same configuration works on i686, and thast "sudo hdparm -B 254 /dev/sda" works correctly on both architectures.

Additional info:
* package version(s)
kernel: 2.6.36.2-1
laptop-mode-tools: 1.55-2
hdparm: 9.35-1

* config and/or log files etc.
/etc/laptop-mode/laptop-mode.conf:
[code]
ENABLE_LAPTOP_MODE_TOOLS=1
VERBOSE_OUTPUT=0
LOG_TO_SYSLOG=1
DEBUG=0

ENABLE_LAPTOP_MODE_ON_BATTERY=1
ENABLE_LAPTOP_MODE_ON_AC=1
ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED=0
ENABLE_AUTO_MODULES=0

MINIMUM_BATTERY_CHARGE_PERCENT=10
DISABLE_LAPTOP_MODE_ON_CRITICAL_BATTERY_LEVEL=1

HD="/dev/[hs]d[abcdefgh]"
PARTITIONS="auto /dev/mapper/*"
ASSUME_SCSI_IS_SATA=1

LM_BATT_MAX_LOST_WORK_SECONDS=600
LM_AC_MAX_LOST_WORK_SECONDS=120
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=1 #"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
[\code]

Steps to reproduce:
- place the laptop-mode.conf file above in the /etc/laptop-mode folder;
- start laptop-mode daemon on a x86_64 laptop plugged to AC;
- unplug and check APM status with "sudo hdparm -B /dev/sda". You should get 1;
- plug and check APM status as above. You should get 1 again instead of the desired 254.
This task depends upon

Closed by  Andrea Scarpino (BaSh)
Sunday, 15 May 2011, 20:19 GMT
Reason for closing:  Not a bug
Additional comments about closing:  see the last comment
Comment by Eric Belanger (Snowman) - Tuesday, 15 February 2011, 03:41 GMT
Is it fixed in laptop-mode-tools-1.56-1 ? If not, you might want to ask upstream about it. As the package is of 'any' arch, both i686 and x86_64 use the same package. So if it doesn't work with one arch, then it's probably an upstream issue.
Comment by Nicola Mori (snack) - Wednesday, 16 February 2011, 21:52 GMT
No, it still behave as in the original bug report. I'll try to collect some more precise info before submitting a bug report upstream. Thanks.
Comment by Greg (dolby) - Thursday, 05 May 2011, 09:22 GMT
Is this still a problem? Did you contact upstream?
FWIW this may be an issue with having both lmt and pm-utils installed on the same system. Debian and Ubuntu recently added conflicts between the two packages cause they both provide laptop-mode. pm-utils: /usr/lib/pm-utils/power.d/laptop-mode

You may want to check if your troubles disappear if you remove one of the two.
Comment by Nicola Mori (snack) - Saturday, 07 May 2011, 18:16 GMT
Greg, indeed I have /usr/lib/pm-utils/power.d/laptop-mode, but the point is that i686 works fine while x86_64 doesn't, using the same configuration. If the conflict you reported was the cause, then the i686 should not work as well (I think...). BTW, I mailed the bug on upstream mailing list (AFAIK laptop-mode projecty have no bug tracker).
Comment by Nicola Mori (snack) - Sunday, 15 May 2011, 19:08 GMT
I solved the problem after a mail exchange with upstream: acpid was missing in my system. After installing it, everything works again.
Thank you for your support, the bug report can be closed.

Loading...