Hello community, here is the log from the commit of package laptop-mode-tools for openSUSE:Factory checked in at Sat Jul 4 13:11:06 CEST 2009. -------- --- laptop-mode-tools/laptop-mode-tools.changes 2009-01-23 19:20:18.000000000 +0100 +++ /mounts/work_src_done/STABLE/laptop-mode-tools/laptop-mode-tools.changes 2009-06-26 17:21:11.000000000 +0200 @@ -1,0 +2,10 @@ +Fri Jun 26 17:20:24 CEST 2009 - seife@suse.de + +- update to 1.49. Notable changes: + - use syslog + - better diagnostic messages + - most of the other changes are unused in this package, see the + changelog for more information +- adjust dirty_ratio defaults to new kernel's defaults + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- laptop-mode_conf.diff laptop_mode.diff laptop-mode-initscript.diff laptop-mode-install_sh.diff laptop-mode-tools_1.45.tar.gz laptop-mode-udevadm.diff New: ---- laptop-mode-1.49_conf.diff laptop_mode-1.49.diff laptop-mode-1.49-initscript.diff laptop-mode-1.49-install_sh.diff laptop-mode-1.49-new-dirty-ratio-defaults.diff laptop-mode-tools_1.49.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ laptop-mode-tools.spec ++++++ --- /var/tmp/diff_new_pack.Ag3042/_old 2009-07-04 13:09:54.000000000 +0200 +++ /var/tmp/diff_new_pack.Ag3042/_new 2009-07-04 13:09:54.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package laptop-mode-tools (Version 1.45) +# spec file for package laptop-mode-tools (Version 1.49) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -18,7 +18,7 @@ Name: laptop-mode-tools -Version: 1.45 +Version: 1.49 Release: 1 License: GPL v2 or later BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -29,11 +29,11 @@ Source: %{name}_%{version}.tar.gz Source1: laptop-mode-tools.pm-utils-hook Source2: README.SUSE -Patch1: laptop-mode-install_sh.diff -Patch2: laptop_mode.diff -Patch3: laptop-mode_conf.diff -Patch4: laptop-mode-initscript.diff -Patch5: laptop-mode-udevadm.diff +Patch1: laptop-mode-1.49-install_sh.diff +Patch2: laptop_mode-1.49.diff +Patch3: laptop-mode-1.49_conf.diff +Patch4: laptop-mode-1.49-initscript.diff +Patch5: laptop-mode-1.49-new-dirty-ratio-defaults.diff BuildArch: noarch BuildRequires: pm-utils @@ -89,38 +89,12 @@ /usr/sbin/* %dir /usr/share/laptop-mode-tools/ %dir /usr/share/laptop-mode-tools/modules/ +%dir /usr/share/laptop-mode-tools/module-helpers/ /usr/share/laptop-mode-tools/modules/* +/usr/share/laptop-mode-tools/module-helpers/lm-polling-daemon /usr/lib/pm-utils/power.d/laptop-mode-tools +/usr/lib/pm-utils/sleep.d/05laptop-mode %doc /usr/share/man/man8/* %doc README.SUSE %changelog -* Fri Jan 23 2009 seife@suse.de -- fix udevadm version check (bnc#468848), remove old patches -* Thu Jan 15 2009 seife@suse.de -- update to 1.45 - - various improvements, most are not used in this package - - removed bashisms - - AC adapter fixes - - minor optimizations - - manpage fixes -* Fri Dec 12 2008 hmacht@suse.de -- fix enabling of laptop-mode by default: - Use %%insserv_force_if_yast instead of %%insserv_and_fillup to - enable laptop-mode-tools by default (fate#304737) -* Wed Sep 24 2008 ro@suse.de -- use udevadm info instead of udevinfo -* Tue Sep 16 2008 hmacht@suse.de -- fate#304737 - start laptop-mode-tools by default - remount devices with relatime when on battery - set hard dist power management to 128 when on battery -* Tue Aug 19 2008 seife@suse.de -- Add "Default-Start:" and "Default-Stop:" to initscript -* Thu May 08 2008 seife@suse.de -- build fix -- add README.SUSE -- enhance the init script -- pm-utils integration -* Wed May 07 2008 seife@suse.de -- initial submission, version 1.41 ++++++ laptop-mode-1.49_conf.diff ++++++ Index: b/etc/laptop-mode/laptop-mode.conf =================================================================== --- a/etc/laptop-mode/laptop-mode.conf +++ b/etc/laptop-mode/laptop-mode.conf @@ -1,7 +1,9 @@ ############################################################################### # +# SEE THE NOTES ON THE SUSE PACKAGE BELOW THIS SECTION! +# # Configuration for Laptop Mode Tools # ----------------------------------- # # There is a "system" to the configuration setting names: # CONTROL_something=0/1 Determines whether Laptop Mode Tools controls @@ -34,12 +36,24 @@ # Laptop Mode Tools modules have separate configuration files, that can be # found in /etc/laptop-mode/conf.d. Please look through these configuration # files as well, there are many useful power saving tools in there! # ############################################################################### - - +# +# NOTES FOR THE SUSE PACKAGE: +# --------------------------- +# +# i patched the main laptop_mode script, so that it has two additional +# parameters: "start" and "stop". If you call "laptop_mode start", then it +# will force the "on battery" profile, if you call "laptop_mode stop" then it +# will force the "on ac power" profile. +# +# If laptop-mode is enabled with "/etc/init.d/laptop-mode start", then +# pm-utils will call "laptop_mode start", when it is called via the HAL +# setLowPower method, and "laptop_mode stop" when this method is disabled. +# +############################################################################### ############################################################################### # Configuration debugging # ----------------------- ############################################################################### @@ -203,22 +217,22 @@ NOLM_READAHEAD=128 # # Should laptop mode tools add the "noatime" option to the mount options when # laptop mode is enabled? # -CONTROL_NOATIME=0 +CONTROL_NOATIME=1 # Should laptop use relatime instead of noatime? The "relatime" mount option has # more standards-compliant semantics, and allows more applications to work, # while retaining a low level of atime updates (i.e., disk writes). USE_RELATIME=1 # # Should laptop mode tools control the hard drive idle timeout settings? # -CONTROL_HD_IDLE_TIMEOUT=1 +CONTROL_HD_IDLE_TIMEOUT=0 # # Idle timeout values. (hdparm -S) # Default is 2 hours on AC (NOLM_HD_IDLE_TIMEOUT_SECONDS=7200) and 20 seconds @@ -230,17 +244,17 @@ NOLM_HD_IDLE_TIMEOUT_SECONDS=7200 # # Should laptop mode tools control the hard drive power management settings? # -CONTROL_HD_POWERMGMT=0 +CONTROL_HD_POWERMGMT=1 # # Power management for HD (hdparm -B values) # -BATT_HD_POWERMGMT=1 +BATT_HD_POWERMGMT=128 LM_AC_HD_POWERMGMT=254 NOLM_AC_HD_POWERMGMT=254 # ++++++ laptop_mode-1.49.diff ++++++ Index: b/usr/sbin/laptop_mode =================================================================== --- a/usr/sbin/laptop_mode +++ b/usr/sbin/laptop_mode @@ -414,11 +414,12 @@ if [ "$1" = "status" ] ; then log "STATUS" "Laptop Mode Tools is allowed to run: /var/run/laptop-mode-tools/enabled exists." else log "STATUS" "Laptop Mode Tools is NOT allowed to run: /var/run/laptop-mode-tools/enabled does not exist." fi log "STATUS" " " - STATFILES="/proc/sys/vm/laptop_mode /proc/apm /proc/pmu/info /proc/sys/vm/bdflush /proc/sys/vm/dirty_ratio /proc/sys/fs/xfs/age_buffer /proc/sys/fs/xfs/sync_interval /proc/sys/fs/xfs/lm_age_buffer /proc/sys/fs/xfs/lm_sync_interval /proc/sys/vm/pagebuf/lm_flush_age /proc/sys/fs/xfs/xfsbufd_centisecs /proc/sys/fs/xfs/xfssyncd_centisecs /proc/sys/vm/dirty_background_ratio /proc/sys/vm/dirty_expire_centisecs /proc/sys/fs/xfs/age_buffer/centisecs /proc/sys/vm/dirty_writeback_centisecs /sys/devices/system/cpu/*/cpufreq/cpuinfo_*_freq /sys/devices/system/cpu/*/cpufreq/scaling_governor /proc/acpi/button/lid/*/state /proc/acpi/ac_adapter/*/state /proc/acpi/battery/*/state /sys/class/power_supply/*/online /sys/class/power_supply/*/state" +# STATFILES="/proc/sys/vm/laptop_mode /proc/apm /proc/pmu/info /proc/sys/vm/bdflush /proc/sys/vm/dirty_ratio /proc/sys/fs/xfs/age_buffer /proc/sys/fs/xfs/sync_interval /proc/sys/fs/xfs/lm_age_buffer /proc/sys/fs/xfs/lm_sync_interval /proc/sys/vm/pagebuf/lm_flush_age /proc/sys/fs/xfs/xfsbufd_centisecs /proc/sys/fs/xfs/xfssyncd_centisecs /proc/sys/vm/dirty_background_ratio /proc/sys/vm/dirty_expire_centisecs /proc/sys/fs/xfs/age_buffer/centisecs /proc/sys/vm/dirty_writeback_centisecs /sys/devices/system/cpu/*/cpufreq/cpuinfo_*_freq /sys/devices/system/cpu/*/cpufreq/scaling_governor /proc/acpi/button/lid/*/state /proc/acpi/ac_adapter/*/state /proc/acpi/battery/*/state /sys/class/power_supply/AC/online /sys/class/power_supply/*/state" + STATFILES="/proc/sys/vm/laptop_mode /proc/apm /proc/pmu/info /proc/sys/vm/bdflush /proc/sys/vm/dirty_ratio /proc/sys/fs/xfs/age_buffer /proc/sys/fs/xfs/sync_interval /proc/sys/fs/xfs/lm_age_buffer /proc/sys/fs/xfs/lm_sync_interval /proc/sys/vm/pagebuf/lm_flush_age /proc/sys/fs/xfs/xfsbufd_centisecs /proc/sys/fs/xfs/xfssyncd_centisecs /proc/sys/vm/dirty_background_ratio /proc/sys/vm/dirty_expire_centisecs /proc/sys/fs/xfs/age_buffer/centisecs /proc/sys/vm/dirty_writeback_centisecs" for THISFILE in $STATFILES ; do if [ -e "$THISFILE" ] ; then log "STATUS" "$THISFILE:" if [ -r "$THISFILE" ] ; then cat "$THISFILE" | sed "s/^/ /" @@ -476,18 +477,19 @@ if [ ! -w /proc/sys/vm/laptop_mode ] ; t exit 1 fi INIT=0 # Display info in init script format? FORCE=0 # Force reapplying the current state? +FAKE_AC="" while [ "$1" != "" ] ; do case "$1" in init) INIT=1 ;; force) FORCE=1 ;; # Old options. We always do "auto" for any option now, but # we still have to accept the options. - start) ;; - stop) ;; + start) FORCE=1; FAKE_AC=0 ;; + stop) FORCE=1; FAKE_AC=1 ;; auto) ;; *) log "ERR" "Unrecognized option $1." exit 1 ;; esac shift @@ -502,69 +504,19 @@ STATE=enabled if [ "$ENABLE_LAPTOP_MODE_ON_BATTERY" -eq 0 -a "$ENABLE_LAPTOP_MODE_ON_AC" -eq 0 -a "$ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED" -eq 0 ] ; then STATE=disabled fi # Determine the power state. - -# First try /sys/class/power_supply/* -FOUND_SYS_CLASS_POWER_SUPPLY_AC=0 -ON_AC=0 -for POWER_SUPPLY in /sys/class/power_supply/* ; do - if [ -f $POWER_SUPPLY/type ] ; then - if [ "$(cat $POWER_SUPPLY/type)" = "Mains" ] ;then - log "VERBOSE" "Determining power state from $POWER_SUPPLY/online." - FOUND_SYS_CLASS_POWER_SUPPLY_AC=1 - if [ "$(cat $POWER_SUPPLY/online)" = 1 ] ; then - ON_AC=1 - fi - fi - fi -done - -if [ $FOUND_SYS_CLASS_POWER_SUPPLY_AC = 1 ] ; then - # Already found it! - log "VERBOSE" "Not trying other options, already found a power supply." -elif [ -d /proc/acpi/ac_adapter ] ; then - log "VERBOSE" "Determining power state from /proc/acpi/ac_adapter." - ADAPTERS_FOUND=0 - ON_AC=0 - for ADAPTER in /proc/acpi/ac_adapter/* ; do - if [ -f $ADAPTER/state ] ; then - ADAPTERS_FOUND=1 - STATUS=`awk '/^state: / { print $2 }' $ADAPTER/state` - if [ "$STATUS" = "on-line" ] ; then - ON_AC=1 - fi - fi - done - if [ "$ADAPTERS_FOUND" -eq 0 ] ; then - ON_AC=1 - fi -elif [ -f /proc/pmu/info ] ; then - log "VERBOSE" "Determining power state from /proc/pmu/info." - if ( grep -q "^AC Power.*0$" /proc/pmu/info ) ; then - log "VERBOSE" "/proc/pmu/info indicates absence of AC power." - ON_AC=0 - else - # It is possible that there is no AC Power = 1 in the file, - # but we always assume AC power when we're not sure. - ON_AC=1 - log "VERBOSE" "/proc/pmu/info indicates presence of AC power." - fi -elif [ -f /proc/apm ] ; then - log "VERBOSE" "Determining power state from /proc/apm." - read D1 D2 D3 APM_AC_STATE D0 laptop-mode-tools_1.49.tar.gz ++++++ ++++ 2568 lines of diff (skipped) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org