Prosíme přihlašte se nebo zaregistrujte.

Přihlašte se svým uživatelským jménem a heslem.

Autor Téma: Laptop mode - Jak na uspávání disku / parkování hlaviček v Jaunty?  (Přečteno 16398 krát)

DuckD

  • Stálý člen
  • ***
  • Příspěvků: 878
  • Karma: +126/-13
  • Open Srdcař
    • Zobrazit profil
    • www.duckd.cz
V Jaunty zase často parkují hlavičky disku při zapnutém laptop_mode.
Nastavení už není nastavení v souboru /etc/acpi/power.sh jak je psáno ve FAQ (bod 30), ale odkazuje se v tomto souboru na scripty:
/etc/acpi/battery.d/*.sh
/etc/acpi/ac.d/*.sh

V obou je to stejné:
Kód: [Vybrat]
...
if [ "$DO_HDPARM" = y ] ; then
  # Get the power state into STATE
  getState;
 
  for dev in /dev/sd? /dev/hd? ; do
    if [ -b $dev ] ; then
      # Check for APM support; discard errors since not all drives
      # support HDIO_GET_IDENTITY (-i).   
      if hdparm -i $dev 2> /dev/null | grep -q 'AdvancedPM=yes' ; then
if [ "$STATE" = "BATTERY" ] ; then
  hdparm -B 128 $dev
else
  hdparm -B 254 $dev
fi
      fi
    fi
  done
fi

Zkusil jsem trochu manuálovat a našel jsem výpis o disku. Tímto tedy získám aktuální nastavení "Advanced power management level"
hdparm -I /dev/sda | grep "Advanced power management level"
APML nastavuji přes:
hdparm -B čislo /dev/sda

Jak ale dostanu aktuální nastavení pro spindown timeout "výpis hodnoty" (hdparm -S)? Kde se nastavení nachází?
Z manuálových stránek čtu že "Advanced power management level" přímo ovlivňuje "spindown timeout",
nastavení: (hdparm -B 128 /dev/hda) nebo (hdparm -B 254 /dev/hda)
nepovoluje spindown timeout disku. Přesto se disk vypíná.
Prosím o radu.

man hdparm
Citace
-B     Set Advanced Power Management feature, if the drive supports  it.  A  low  value  means
      aggressive  power  management and a high value means better performance.  Possible set‐
      tings range from values 1 through 127 (which permit spin-down), and values 128  through
      254  (which  do  not  permit  spin-down).   The  highest  degree of power management is
      attained with a setting of 1, and the highest I/O performance with a setting of 254.  A
      value  of 255 tells hdparm to disable Advanced Power Management altogether on the drive
      (not all drives support disabling it, but most do).

-S     Set  the  standby (spindown) timeout for the drive.  This value is used by the drive to
      determine how long to wait (with no disk activity) before turning off the spindle motor
      to  save  power.  Under such circumstances, the drive may take as long as 30 seconds to
      respond to a subsequent disk access, though most drives are much quicker.  The encoding
      of  the  timeout  value is somewhat peculiar.  A value of zero means "timeouts are dis‐
      abled": the device will not automatically enter standby mode.  Values  from  1  to  240
      specify multiples of 5 seconds, yielding timeouts from 5 seconds to 20 minutes.  Values
      from 241 to 251 specify from 1 to 11 units of 30 minutes,  yielding  timeouts  from  30
      minutes to 5.5 hours.  A value of 252 signifies a timeout of 21 minutes. A value of 253
      sets a vendor-defined timeout period between 8 and 12  hours,  and  the  value  254  is
      reserved.   255  is  interpreted  as  21 minutes plus 15 seconds.  Note that some older
      drives may have very different interpretations of these values.

Nastavení laptop mode se provádí zde:
/etc/laptop-mode/laptop-mode.conf
Kód: [Vybrat]
#
# Enable laptop mode when on battery power.
#
ENABLE_LAPTOP_MODE_ON_BATTERY=1

#
# Enable laptop mode when on AC power.
#
ENABLE_LAPTOP_MODE_ON_AC=0

Počet zapnutí disků se zjistí příkazem:
smartctl -d ata -a /dev/sda | grep Load_Cycle

Souvisí s tématem:
Laptop mode FAQ
http://forum.ubuntu.cz/index.php/topic,15608.msg112263.html#msg112263
http://www.root.cz/clanky/jak-na-uspavani-disku-v-linuxu/
http://www.root.cz/clanky/setrime-energii-s-linuxem/
http://www.linuxexpres.cz/praxe/vyladte-si-ubuntu-na-asus-eee-901-podle-svych-predstav
http://wiki.ubuntu.cz/Zrychlen%C3%AD%20startu%20syst%C3%A9mu
https://wiki.ubuntu.com/PowerManagement
http://wiki.geteasypeasy.com/Get_the_most_of_the_battery
http://aldeby.org/blog/index.php/linux-laptop-power-saving-customization.html


hdparm, changing the hard-disk spindown (sleep time)
http://lists.freedesktop.org/archives/hal/2005-August/003116.html

Power Saving Techniques
http://tuxmobil.org/Mobile-Guide/mobile-guide-p6a5s7-power-saving-techniques.html

Disable sync() for syslog
http://wiki.openvz.org/Ubuntu_Gutsy_template_creation#Disable_sync.28.29_for_syslog

Disable Klogd and Syslogd
http://ubuntuforums.org/showthread.php?t=789803

pdflush
kjournal
firefox
gconfd-2
« Poslední změna: 12 Květen 2009, 23:07:41 od DuckD »
8) Lidé žijí v souborech. ===>> LINUXTERO <<=== Pravidelná dávka tvého linuxtera!

Sešívaný

  • Stálý člen
  • ***
  • Příspěvků: 667
  • Karma: +107/-14
    • Zobrazit profil
    • Osobní stránky
Re: Jak na uspávání disku / parkování hlaviček v Jaunty?
« Odpověď #1 kdy: 24 Duben 2009, 11:01:01 »
Když přece aktivuješ laptop mode, tak to parkuje jen, když to jede na baterku, to je myslím dostatečné, ne? Já jsem při takovém nastavení udělal jen minimální počet parkování od té doby, co to tam je (půl roku).

it-neuro

  • Člen
  • **
  • Příspěvků: 168
  • Karma: +8/-5
    • Zobrazit profil
Re: Jak na uspávání disku / parkování hlaviček v Jaunty?
« Odpověď #2 kdy: 24 Duben 2009, 20:56:18 »
Zabere to aj na moj SSD?  :D
Notebook Lenovo X230Tablet Intel Core i5 3320M  (2,6 GHz), 16GB DDR3RAM, 500GB 2.5" SSD HDD, 12.5"  HD Anti-Glare , 802.11 a/b/g/Draft-N Wlan, Bluetooth 3.0, 3G
DualBoot:
Ubuntu 12.04 - 64bit  (boot 4s) Windows 8.1 64bit (boot 5s)

luta

  • Návštěvník
  • *
  • Příspěvků: 34
  • Karma: +3/-0
    • Zobrazit profil
Re: Laptop mode - Jak na uspávání disku / parkování hlaviček v Jaunty?
« Odpověď #3 kdy: 04 Květen 2009, 19:45:27 »
tak me opravte pokud se milim ale ja po povoleni laptop-mode provedl upravy v samotnem laptop-mode.conf
Kód: [Vybrat]
#
# Should laptop mode tools control the hard drive idle timeout settings?
#
CONTROL_HD_IDLE_TIMEOUT=1


#
# Idle timeout values. (hdparm -S)
# Default is 2 hours on AC (NOLM_HD_IDLE_TIMEOUT_SECONDS=7200) and 20 seconds
# for battery and for AC with laptop mode on.
#
LM_AC_HD_IDLE_TIMEOUT_SECONDS=300
LM_BATT_HD_IDLE_TIMEOUT_SECONDS=300
NOLM_HD_IDLE_TIMEOUT_SECONDS=7200


#
# Should laptop mode tools control the hard drive power management settings?
#
CONTROL_HD_POWERMGMT=1


#
# Power management for HD (hdparm -B values)
#
BATT_HD_POWERMGMT=128
LM_AC_HD_POWERMGMT=254
NOLM_AC_HD_POWERMGMT=254

pro zjisteni jak laptop-mode nabiha nastavit v laptop-mode.conf
Kód: [Vybrat]
#
# Set this to 1 if you want to see a lot of information when you start/stop
# laptop_mode.
#
VERBOSE_OUTPUT=1
a je dobre pak projit dany vypis po spusteni prikazu laptop_mode
Kód: [Vybrat]
luta@luta-laptop:~$ sudo laptop_mode
Laptop Mode Tools 1.47
Determining power state from /sys/class/power_supply/ACAD/online.
Not trying other options, already found a power supply.
On AC power: Deactivating, because ENABLE_LAPTOP_MODE_ON_AC is not set.
Laptop mode enabled, not active
.
.
.

me laptop mode tusim nenabihal dokud jsem jej nepovolil v /etc/default/acpi-support (uz se mi to bohuzel zase vykourilo z hlavy).
V /var/run/laptop-mode-tools/ by mel byt pak soubor enabled
« Poslední změna: 04 Květen 2009, 20:16:16 od luta »
Compal HEL81-T5500/945GM/3GB/100GB-7200ot/archlinux64

srabik

  • Návštěvník
  • *
  • Příspěvků: 7
  • Karma: +2/-0
    • Zobrazit profil
Re: Laptop mode - Jak na uspávání disku / parkování hlaviček v Jaunty?
« Odpověď #4 kdy: 11 Červenec 2009, 22:20:16 »
Ahoj, tak jsem se rozhodl zapnout na svem notebooku laptop-mode. Precetl jsem snad vsechna pribuzna temata zde na foru + nektery externi stranky. Mam Ubuntu 9.04 s Gnome (+ doinstalovane Kubuntu s KDE, to ale nepouzivam). sysklogd a klogd mam vypnuty, zadny aplikace nejsou spusteny, proste jsem jenom v Gnome s par konzolema. Mam problem s neustalym probouzenim disku programem "gconfd-2". Kdyz uspim oba dva (jeden bezi pod uzivatelem, druhy pod rootem)

Kód: [Vybrat]
kill -s STOP cislo_procesu(opetovne spusteni pak
Kód: [Vybrat]
kill -s CONT cislo_procesu)

disk se prestane nesmyslne probouzet a spi mnou urcenou dobu. Problem je, ze ten gconfd-2 je potrebny, s jeho uspanim nejdou spoustet gnome aplikace jako gedit atd..
Takhle vypada vypis hnedka potom, co se disk probudi:

Kód: [Vybrat]
petr@petr-ntb:~$ sudo dmesg -c
[45193.235921] wpa_supplicant(2607): dirtied inode 239474 (wpa_supplicant.log) on sda2
[45193.235945] wpa_supplicant(2607): dirtied inode 239474 (wpa_supplicant.log) on sda2
[45193.235954] wpa_supplicant(2607): dirtied inode 239474 (wpa_supplicant.log) on sda2
[45198.203069] gconfd-2(3116): dirtied inode 703224 (%gconf.xml.new) on sda2
[45198.203131] gconfd-2(3116): WRITE block 22772480 on sda2
[45198.204210] kjournald(699): WRITE block 7848648 on sda2
[45200.092644] kjournald(699): WRITE block 12233960 on sda2
[45200.092667] kjournald(699): WRITE block 12233968 on sda2
[45200.092677] kjournald(699): WRITE block 12233976 on sda2
[45200.092685] kjournald(699): WRITE block 12233984 on sda2
[45200.092692] kjournald(699): WRITE block 12233992 on sda2
[45200.092699] kjournald(699): WRITE block 12234000 on sda2
[45200.092706] kjournald(699): WRITE block 12234008 on sda2
[45200.092713] kjournald(699): WRITE block 12234016 on sda2
[45200.093189] kjournald(699): WRITE block 12234024 on sda2
[45200.093502] gconfd-2(3116): dirtied inode 703224 (%gconf.xml.new) on sda2
[45200.093624] gconfd-2(3116): dirtied inode 703141 (?) on sda2
[45200.093865] gconfd-2(3116): dirtied inode 703141 (%gconf.xml.new) on sda2
[45200.093918] gconfd-2(3116): WRITE block 22821896 on sda2
[45200.094219] kjournald(699): WRITE block 12234032 on sda2
[45200.094232] kjournald(699): WRITE block 12234040 on sda2
[45200.094241] kjournald(699): WRITE block 12234048 on sda2
[45200.094248] kjournald(699): WRITE block 12234056 on sda2
[45200.094255] kjournald(699): WRITE block 12234064 on sda2
[45200.094262] kjournald(699): WRITE block 12234072 on sda2
[45200.094269] kjournald(699): WRITE block 12234080 on sda2
[45200.094276] kjournald(699): WRITE block 12234088 on sda2
[45200.094283] kjournald(699): WRITE block 12234096 on sda2
[45200.094290] kjournald(699): WRITE block 12234104 on sda2
[45200.094297] kjournald(699): WRITE block 12234112 on sda2
[45200.094942] kjournald(699): WRITE block 12234120 on sda2
[45200.095219] gconfd-2(3116): dirtied inode 703141 (%gconf.xml.new) on sda2
[45200.095324] gconfd-2(3116): dirtied inode 702828 (?) on sda2
[45200.095505] gconfd-2(3116): dirtied inode 702828 (%gconf.xml.new) on sda2
[45200.095548] gconfd-2(3116): WRITE block 22741024 on sda2
[45200.095828] kjournald(699): WRITE block 12234128 on sda2
[45200.095841] kjournald(699): WRITE block 12234136 on sda2
[45200.095849] kjournald(699): WRITE block 12234144 on sda2
[45200.095856] kjournald(699): WRITE block 12234152 on sda2
[45200.095863] kjournald(699): WRITE block 12234160 on sda2
[45200.095870] kjournald(699): WRITE block 12234168 on sda2
[45200.095877] kjournald(699): WRITE block 12234176 on sda2
[45200.095884] kjournald(699): WRITE block 12234184 on sda2
[45200.095891] kjournald(699): WRITE block 12234192 on sda2
[45200.095898] kjournald(699): WRITE block 12234200 on sda2
[45200.095905] kjournald(699): WRITE block 12234208 on sda2
[45200.096440] kjournald(699): WRITE block 12234216 on sda2
[45200.096695] gconfd-2(3116): dirtied inode 702828 (%gconf.xml.new) on sda2
[45200.096795] gconfd-2(3116): dirtied inode 703179 (?) on sda2
[45202.096255] pdflush(30): WRITE block 7603840 on sda2
[45202.096389] pdflush(30): WRITE block 22545776 on sda2
[45202.096403] pdflush(30): WRITE block 22545816 on sda2
[45202.096416] pdflush(30): WRITE block 22660704 on sda2
[45202.096428] pdflush(30): WRITE block 22660712 on sda2
[45202.096442] pdflush(30): WRITE block 22806528 on sda2
[45202.104289] kjournald(699): WRITE block 12234224 on sda2
[45202.104314] kjournald(699): WRITE block 12234232 on sda2
[45202.104324] kjournald(699): WRITE block 12234240 on sda2
[45202.104332] kjournald(699): WRITE block 12234248 on sda2
[45202.104340] kjournald(699): WRITE block 12234256 on sda2
[45202.104347] kjournald(699): WRITE block 12234264 on sda2
[45202.104354] kjournald(699): WRITE block 12234272 on sda2
[45202.104361] kjournald(699): WRITE block 12234280 on sda2
[45202.104369] kjournald(699): WRITE block 12234288 on sda2
[45202.104968] kjournald(699): WRITE block 12234296 on sda2
[45202.105246] pdflush(30): WRITE block 0 on sda2
[45202.105264] pdflush(30): WRITE block 8 on sda2
[45202.105274] pdflush(30): WRITE block 22544384 on sda2
[45202.105286] pdflush(30): WRITE block 22544392 on sda2
[45202.105295] pdflush(30): WRITE block 22545616 on sda2
[45202.105307] pdflush(30): WRITE block 22545624 on sda2
[45202.105316] pdflush(30): WRITE block 22545792 on sda2
[45202.105404] pdflush(30): WRITE block 22660720 on sda2

Probuzeni spusti
"[45198.203131] gconfd-2(3116): WRITE block 22772480 on sda2"

Moje nastaveni /etc/laptop-mode/laptop-mode.conf

Kód: [Vybrat]
###############################################################################
#
# Configuration for Laptop Mode Tools
# -----------------------------------
#
# There is a "system" to the configuration setting names:
#    CONTROL_something=0/1   Determines whether Laptop Mode Tools controls
#                            something
#    LM_something=value      Value of "something" when laptop mode is active
#    NOLM_something=value    Value of "something" when laptop mode is NOT
#                            active
#    AC_something=value      Value of "something" when the computer is running
#                            on AC power
#    BATT_something=value    Value of "something when the computer is running
#                            on battery power
#
# There can be combinations of LM_/NOLM_ and AC_/BATT_ prefixes, but the
# available prefixes are different for each setting. The available ones are
# documented in the manual page, laptop-mode.conf(8). If there is no LM_/
# NOLM_ in a setting name, then the value is used independently of laptop
# mode state, and similarly, if there is no AC_/BATT_, then the value is used
# independently of power state.
#
# Some options only work on ACPI systems. They are marked ACPI-ONLY.
#
# Note that this configuration file is a fragment of shell script: you
# can use all the features of the shell scripting language to achieve your
# desired configuration.
#
#
# Modules
# -------
#
# 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!
#
###############################################################################



###############################################################################
# Configuration debugging
# -----------------------
###############################################################################


#
# Set this to 1 if you want to see a lot of information when you start/stop
# laptop_mode.
#
VERBOSE_OUTPUT=0



###############################################################################
# When to enable laptop mode
# --------------------------
#
# "Laptop mode" is the mode in which laptop mode tools makes the computer
# consume less power. This includes the kernel "laptop_mode" feature, which
# allows your hard drives to spin down, as well as various other settings which
# can be tweaked by laptop mode tools. You can enable or disable all of these
# settings using the CONTROL_... options further down in this config file.
###############################################################################


#
# Enable laptop mode when on battery power.
#
ENABLE_LAPTOP_MODE_ON_BATTERY=1


#
# Enable laptop mode when on AC power.
#
ENABLE_LAPTOP_MODE_ON_AC=1


#
# Enable laptop mode when the laptop's lid is closed, even when we're on AC
# power? (ACPI-ONLY)
#
ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED=0



###############################################################################
# When to enable data loss sensitive features
# -------------------------------------------
#
# When data loss sensitive features are disabled, laptop mode tools acts as if
# laptop mode were disabled, for those features only.
#
# Data loss sensitive features include:
# - laptop_mode (i.e., delayed writes)
# - hard drive write cache
#
# All of the options that follow can be set to 0 in order to prevent laptop
# mode tools from using them to stop data loss sensitive features. Use this
# when you have a battery that reports the wrong information, that confuses
# laptop mode tools.
#
# Disabling data loss sensitive features is ACPI-ONLY, and it only works if
# your battery gives off frequent ACPI events to indicate a change in battery
# level.
#
# NOTE: If your battery does NOT give off battery events often enough, you can
# enable the battery-level-polling module to make this work. Look at the
# file /etc/laptop-mode/conf.d/battery-level-polling.conf for more information.
#
###############################################################################


#
# Disable all data loss sensitive features when the battery level (in % of the
# battery capacity) reaches this value.
#
MINIMUM_BATTERY_CHARGE_PERCENT=3


#
# Disable data loss sensitive features when the battery reports its state
# as "critical".
#
DISABLE_LAPTOP_MODE_ON_CRITICAL_BATTERY_LEVEL=1



###############################################################################
# Controlled hard drives and partitions
# -------------------------------------
#
# For spinning down your hard drives, laptop mode will remount file systems and
# adjust hard drive spindown timeouts. These parameters specify which
# devices and partitions are affected by laptop mode.
###############################################################################


#
# The drives that laptop mode controls.
# Separate them by a space, e.g. HD="/dev/hda /dev/hdb". The default is a
# wildcard, which will get you all your IDE and SCSI/SATA drives.
#
HD="/dev/[hs]d[abcdefgh]"


#
# The partitions (or mount points) that laptop mode controls.
# Separate the values by spaces. Use "auto" to indicate all partitions on drives
# listed in HD. You can add things to "auto", e.g. "auto /dev/hdc3". You can
# also specify mount points, e.g. "/mnt/data".
#
PARTITIONS="auto /dev/mapper/*"


#
# If this is enabled, laptop mode tools will assume that SCSI drives are
# really SATA drives that only _look_ like SCSI drives, and will use hdparm
# to control them. Set this to 0 if you have /dev/sd devices and you want
# laptop mode tools to use the "sdparm" command to control them.
#
ASSUME_SCSI_IS_SATA=1


###############################################################################
# Hard drive behaviour settings
# -----------------------------
#
# These settings specify how laptop mode tools will adjust the various
# parameters of your hard drives and file systems.
###############################################################################


#
# Maximum time, in seconds, of work that you are prepared to lose when your
# system crashes or power runs out. This is the maximum time that Laptop Mode
# will keep unsaved data waiting in memory before spinning up your hard drive.
#
LM_BATT_MAX_LOST_WORK_SECONDS=600
LM_AC_MAX_LOST_WORK_SECONDS=600


#
# Should laptop mode tools control readahead?
#
CONTROL_READAHEAD=1


#
# Read-ahead, in kilobytes. You can spin down the disk while playing MP3/OGG
# by setting the disk readahead to a reasonable size, e.g. 3072 (3 MB).
# Effectively, the disk will read a complete MP3 at once, and will then spin
# down while the MP3/OGG is playing. Don't set this too high, because the
# readahead is applied to _all_ files that are read from disk.
#
LM_READAHEAD=3072
NOLM_READAHEAD=128


#
# Should laptop mode tools add the "noatime" option to the mount options when
# laptop mode is enabled?
#
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=0


#
# Should laptop mode tools control the hard drive idle timeout settings?
#
CONTROL_HD_IDLE_TIMEOUT=1


#
# Idle timeout values. (hdparm -S)
# Default is 2 hours on AC (NOLM_HD_IDLE_TIMEOUT_SECONDS=7200) and 20 seconds
# for battery and for AC with laptop mode on.
#
LM_AC_HD_IDLE_TIMEOUT_SECONDS=300
LM_BATT_HD_IDLE_TIMEOUT_SECONDS=300
NOLM_HD_IDLE_TIMEOUT_SECONDS=7200


#
# Should laptop mode tools control the hard drive power management settings?
#
CONTROL_HD_POWERMGMT=1


#
# Power management for HD (hdparm -B values)
#
BATT_HD_POWERMGMT=1
LM_AC_HD_POWERMGMT=1
NOLM_AC_HD_POWERMGMT=254


#
# Should laptop mode tools control the hard drive write cache settings?
#
CONTROL_HD_WRITECACHE=0


#
# Write cache settings for HD (hdparm -W values)
#
NOLM_AC_HD_WRITECACHE=1
NOLM_BATT_HD_WRITECACHE=0
LM_HD_WRITECACHE=0




###############################################################################
# Settings you probably don't want to touch
# -----------------------------------------
#
# It is usually not necessary to change these parameters. They are included
# for completeness' sake.
###############################################################################


#
# Change mount options on partitions in PARTITIONS? You don't really want to
# disable this. If you do, then your hard drives will probably not spin down
# anymore.
#
CONTROL_MOUNT_OPTIONS=1


#
# Dirty synchronous ratio.  At this percentage of dirty pages the process
# which calls write() does its own writeback.
#
LM_DIRTY_RATIO=60
NOLM_DIRTY_RATIO=40


#
# Allowed dirty background ratio, in percent.  Once DIRTY_RATIO has been
# exceeded, the kernel will wake pdflush which will then reduce the amount
# of dirty memory to dirty_background_ratio.  Set this nice and low, so once
# some writeout has commenced, we do a lot of it.
#
LM_DIRTY_BACKGROUND_RATIO=1
NOLM_DIRTY_BACKGROUND_RATIO=10


#
# kernel default settings -- don't touch these unless you know what you're
# doing.
#
DEF_UPDATE=5
DEF_XFS_AGE_BUFFER=15
DEF_XFS_SYNC_INTERVAL=30
DEF_XFS_BUFD_INTERVAL=1
DEF_MAX_AGE=30


#
# This must be adjusted manually to the value of HZ in the running kernel
# on 2.4, until the XFS people change their 2.4 external interfaces to work in
# centisecs. This can be automated, but it's a work in progress that still
# needs some fixes. On 2.6 kernels, XFS uses USER_HZ instead of HZ for
# external interfaces, and that is currently always set to 100. So you don't
# need to change this on 2.6.
#
XFS_HZ=100


#
# Seconds laptop mode has to to wait after the disk goes idle before doing
# a sync.
#
LM_SECONDS_BEFORE_SYNC=2

Ne(vy)resil jste to uz nekdo? Popripade nevite jak by se to dalo vyresit?
Dik

dog.big

  • Člen
  • **
  • Příspěvků: 216
  • Karma: +25/-3
  • inactive :/
    • Zobrazit profil
Re: Laptop mode - Jak na uspávání disku / parkování hlaviček v Jaunty?
« Odpověď #5 kdy: 12 Červenec 2009, 18:02:31 »
Mne hlavičky parkují jako šílené i pokud laptop-mode nepoužívám (a jedu na baterii)..
Můj hdd podporuje asi jenom 2 stavy
pro hdparm -B 128 $dev - až do nějakých hdparm -B 200 $dev parkuje pořád
a poté neparkuje vůbec :(
Momentálně Linux INACTIVE.. problém s IGP
My powerful PC :D: Laptop Toshiba L40-14D, CPU: Intel Celeron 1,73Ghz, Chipset: Intel GL960, RAM: 3GB dual ch., VGA: Intel x3100, HDD: 120GB Toshiba, Snd: Realtek HD

UfoNet

  • Stálý člen
  • ***
  • Příspěvků: 559
  • Karma: +22/-7
  • skill:Ctrl+C & Ctrl+V
    • Zobrazit profil
Re: Laptop mode - Jak na uspávání disku / parkování hlaviček v Jaunty?
« Odpověď #6 kdy: 20 Červenec 2009, 21:54:18 »
to parkování zjistíte jak? Z nějakého logu nebo jen tak sluchem?
Mluvit o Linuxu nestačí, lepší je, když si s Linuxem budou děti hrát. Nebudou se ho bát.

pavolzetor

  • Host
Re: Laptop mode - Jak na uspávání disku / parkování hlaviček v Jaunty?
« Odpověď #7 kdy: 20 Červenec 2009, 22:02:10 »
cez smart mon tools

$sudo aptitude install smartmontools

$sudo smartctl -a /dev/sda
« Poslední změna: 20 Červenec 2009, 22:05:23 od Pavol Klačanský »

dog.big

  • Člen
  • **
  • Příspěvků: 216
  • Karma: +25/-3
  • inactive :/
    • Zobrazit profil
Re: Laptop mode - Jak na uspávání disku / parkování hlaviček v Jaunty?
« Odpověď #8 kdy: 21 Červenec 2009, 12:17:39 »
u mne výpis počtu zaparkování hlavičky
Kód: [Vybrat]
193 Load_Cycle_Count        0x0032   097   097   000    Old_age   Always       -       34269

Počet hodin, které běží  - dimenzováno na 20,000 hodin:
Kód: [Vybrat]
  9 Power_On_Hours          0x0032   090   090   000    Old_age   Always       -       4049

realokované sektory (3 z výroby a 1 způsobený mojí chybou - vypnutí PC při zápisu na HDD):
Kód: [Vybrat]
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       4


jak je to u vás?
PS: notebook sem provozoval s XP/Vista a Seven + poslední měsíc Ubuntu 9.04 - notebook běží denně min 10hodin už 2 roky v kuse - životnost pro parkování hlaviček by měla být něco kolem 100 až 600 tisíc. Záleží na výrobci a na papírových hodnotách (ve skutečnosti HDD většinou na tento problém neodcházejí ;)).
Momentálně Linux INACTIVE.. problém s IGP
My powerful PC :D: Laptop Toshiba L40-14D, CPU: Intel Celeron 1,73Ghz, Chipset: Intel GL960, RAM: 3GB dual ch., VGA: Intel x3100, HDD: 120GB Toshiba, Snd: Realtek HD

zemko

  • Člen
  • **
  • Příspěvků: 123
  • Karma: +3/-1
  • fat skankin bastard
    • Zobrazit profil
mozna nesmyslny bump, ale prijde mi nesmysl zakladat nove vlakno s odkazem na toto

mam problem s Lenovo IdeaPad B560 a 500GB WD ... je v provozu mesic a uz ma 2700 parkovani

tady je vypis z vcerejska zmereny v prubehu pul hodiny (jeden dil Two and a half men)
Kód: [Vybrat]
root@zemkovo-lenovo:/home/zemko# smartctl -d ata -a /dev/sda | grep Load_Cycle
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       2604
root@zemkovo-lenovo:/home/zemko# smartctl -d ata -a /dev/sda | grep Load_Cycle
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       2606
root@zemkovo-lenovo:/home/zemko# smartctl -d ata -a /dev/sda | grep Load_Cycle
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       2636
root@zemkovo-lenovo:/home/zemko# smartctl -d ata -a /dev/sda | grep Load_Cycle
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       2689
root@zemkovo-lenovo:/home/zemko# smartctl -d ata -a /dev/sda | grep Load_Cycle
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       2695
root@zemkovo-lenovo:/home/zemko# smartctl -d ata -a /dev/sda | grep Load_Cycle
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       2698

pouzivam 11.04 a moc se mi to nelibi, ptze vim, ze nekdo ma po pul roce jen 600 parkovani...

pro jistotu prikladam kompletni vypis
Kód: [Vybrat]
root@zemkovo-lenovo:/home/zemko# smartctl -d ata -a /dev/sda
smartctl 5.40 2010-07-12 r3124 [x86_64-unknown-linux-gnu] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Scorpio Blue Serial ATA family
Device Model:     WDC WD5000BEVT-24A0RT0
Serial Number:    WD-WX11EA0A1163
Firmware Version: 01.01A02
User Capacity:    500 107 862 016 bytes
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   8
ATA Standard is:  Exact ATA specification draft version not indicated
Local Time is:    Thu Aug  4 11:27:09 2011 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: (13200) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: (   2) minutes.
Extended self-test routine
recommended polling time: ( 154) minutes.
Conveyance self-test routine
recommended polling time: (   5) minutes.
SCT capabilities:        (0x7037) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   183   180   021    Pre-fail  Always       -       1816
  4 Start_Stop_Count        0x0032   098   098   000    Old_age   Always       -       2440
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   100   253   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       238
 10 Spin_Retry_Count        0x0032   100   100   051    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       168
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       26
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       2702
194 Temperature_Celsius     0x0022   120   101   000    Old_age   Always       -       27
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   253   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   100   253   051    Old_age   Offline      -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]


SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

jAster_BA

  • Závislák
  • ****
  • Příspěvků: 4165
  • Karma: +198/-52
  • FEI STU stole my soul, don't have time anymore :/
    • Zobrazit profil
Re: Laptop mode - Jak na uspávání disku / parkování hlaviček v Jaunty?
« Odpověď #10 kdy: 05 Srpen 2011, 16:13:45 »
Ja mám tiež celkom velké parkovanie okolo 29k a to má ten disk necelého pól roka. A beží necelých 30 dní dokopy.:/
Mám doma všelijaké staré haraburdy ale najviac ma *censored*tie novšie s grafikou ATI/AMD... registered as user #520570

Linuxové počítadlo Automatická kompilácia jadra

DuckD

  • Stálý člen
  • ***
  • Příspěvků: 878
  • Karma: +126/-13
  • Open Srdcař
    • Zobrazit profil
    • www.duckd.cz
Re: Laptop mode - Jak na uspávání disku / parkování hlaviček v Jaunty?
« Odpověď #11 kdy: 08 Srpen 2011, 08:01:05 »
>> zemko
a zkoušel jsi vypnout laptop mode (u běhu na baterky i sítě)?
8) Lidé žijí v souborech. ===>> LINUXTERO <<=== Pravidelná dávka tvého linuxtera!

zemko

  • Člen
  • **
  • Příspěvků: 123
  • Karma: +3/-1
  • fat skankin bastard
    • Zobrazit profil
Re: Laptop mode - Jak na uspávání disku / parkování hlaviček v Jaunty?
« Odpověď #12 kdy: 10 Srpen 2011, 11:08:34 »
no vypnul jsem ho, ale nepomaha to...porad roste

DuckD

  • Stálý člen
  • ***
  • Příspěvků: 878
  • Karma: +126/-13
  • Open Srdcař
    • Zobrazit profil
    • www.duckd.cz
Re: Laptop mode - Jak na uspávání disku / parkování hlaviček v Jaunty?
« Odpověď #13 kdy: 10 Srpen 2011, 15:48:40 »
Co máš za typ notebooku? Jak jsi co kde vypnul? V nastavení BIOSu není není nějaké šetření HDD?
8) Lidé žijí v souborech. ===>> LINUXTERO <<=== Pravidelná dávka tvého linuxtera!

ntz_reloaded

  • Lokaj
  • Moderátor
  • Závislák
  • ***
  • Příspěvků: 3727
  • Karma: +363/-65535
  • skill :: ur home erly
    • Zobrazit profil
Re: Laptop mode - Jak na uspávání disku / parkování hlaviček v Jaunty?
« Odpověď #14 kdy: 10 Srpen 2011, 15:54:54 »
necetl jsem cele ale 254 podle me nestaci .. laboroval jsem s tim u sebe a pouzivam hodnotu 255 (0xFF)
tikejte mi, taky Vam tikam ...
song of the day - openSUSE, openindiana, DuckDuckGo
The noise ain't noise anymore, who's to blame, WHO'S TO BLAME ??

zemko

  • Člen
  • **
  • Příspěvků: 123
  • Karma: +3/-1
  • fat skankin bastard
    • Zobrazit profil
Re: Laptop mode - Jak na uspávání disku / parkování hlaviček v Jaunty?
« Odpověď #15 kdy: 10 Srpen 2011, 18:41:54 »
DuckD: vypnul jsem laptop_mode, zpomalilo to, ale porad to roste dost rychle

laptop: Lenovo Ideapad B560, ubuntu 11.04 s Unity

Kód: [Vybrat]
root@zemkovo-lenovo:/home/zemko# smartctl -d ata -a /dev/sda
smartctl 5.40 2010-07-12 r3124 [x86_64-unknown-linux-gnu] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Scorpio Blue Serial ATA family
Device Model:     WDC WD5000BEVT-24A0RT0
Serial Number:    WD-WX11EA0A1163
Firmware Version: 01.01A02
User Capacity:    500 107 862 016 bytes
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   8
ATA Standard is:  Exact ATA specification draft version not indicated
Local Time is:    Wed Aug 10 18:39:44 2011 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: (13200) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: (   2) minutes.
Extended self-test routine
recommended polling time: ( 154) minutes.
Conveyance self-test routine
recommended polling time: (   5) minutes.
SCT capabilities:       (0x7037) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   192   180   021    Pre-fail  Always       -       1375
  4 Start_Stop_Count        0x0032   097   097   000    Old_age   Always       -       3253
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   100   253   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       268
 10 Spin_Retry_Count        0x0032   100   100   051    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       196
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       27
193 Load_Cycle_Count        0x0032   199   199   000    Old_age   Always       -       3514
194 Temperature_Celsius     0x0022   111   101   000    Old_age   Always       -       36
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   253   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   100   253   051    Old_age   Offline      -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]


SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

Kód: [Vybrat]
root@zemkovo-lenovo:/home/zemko# hdparm -I /dev/sda

/dev/sda:

ATA device, with non-removable media
Model Number:       WDC WD5000BEVT-24A0RT0                  
Serial Number:      WD-WX11EA0A1163
Firmware Revision:  01.01A02
Transport:          Serial, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6
Standards:
Supported: 8 7 6 5
Likely used: 8
Configuration:
Logical max current
cylinders 16383 16383
heads 16 16
sectors/track 63 63
--
CHS current addressable sectors:   16514064
LBA    user addressable sectors:  268435455
LBA48  user addressable sectors:  976773168
Logical/Physical Sector size:           512 bytes
device size with M = 1024*1024:      476940 MBytes
device size with M = 1000*1000:      500107 MBytes (500 GB)
cache/buffer size  = 8192 KBytes
Nominal Media Rotation Rate: 5400
Capabilities:
LBA, IORDY(can be disabled)
Queue depth: 32
Standby timer values: spec'd by Standard, with device specific minimum
R/W multiple sector transfer: Max = 16 Current = 0
Advanced power management level: 1
Recommended acoustic management value: 128, current value: 254
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
    Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
    Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
Enabled Supported:
  * SMART feature set
    Security Mode feature set
  * Power Management feature set
  * Write cache
  * Look-ahead
  * Host Protected Area feature set
  * WRITE_BUFFER command
  * READ_BUFFER command
  * NOP cmd
  * DOWNLOAD_MICROCODE
  * Advanced Power Management feature set
    SET_MAX security extension
    Automatic Acoustic Management feature set
  * 48-bit Address feature set
  * Device Configuration Overlay feature set
  * Mandatory FLUSH_CACHE
  * FLUSH_CACHE_EXT
  * SMART error logging
  * SMART self-test
  * General Purpose Logging feature set
  * WRITE_{DMA|MULTIPLE}_FUA_EXT
  * 64-bit World wide name
  * IDLE_IMMEDIATE with UNLOAD
  * {READ,WRITE}_DMA_EXT_GPL commands
  * Segmented DOWNLOAD_MICROCODE
  * Gen1 signaling speed (1.5Gb/s)
  * Gen2 signaling speed (3.0Gb/s)
  * Native Command Queueing (NCQ)
  * Host-initiated interface power management
  * Phy event counters
  * Idle-Unload when NCQ is active
  * NCQ priority information
  * DMA Setup Auto-Activate optimization
  * Device-initiated interface power management
  * Software settings preservation
  * SMART Command Transport (SCT) feature set
  * SCT Long Sector Access (AC1)
  * SCT LBA Segment Access (AC2)
  * SCT Features Control (AC4)
  * SCT Data Tables (AC5)
    unknown 206[12] (vendor specific)
    unknown 206[13] (vendor specific)
    unknown 206[14] (vendor specific)
Security:
Master password revision code = 65534
supported
not enabled
not locked
not frozen
not expired: security count
supported: enhanced erase
134min for SECURITY ERASE UNIT. 134min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 50014ee600aaac2f
NAA : 5
IEEE OUI : 0014ee
Unique ID : 600aaac2f
Checksum: correct

a Laptop_mode jsem vypinal pres $echo "0" > /proc/sys/vm/laptop_mode

EDIT: tak ted na to koukam a asi bude chyba v NEvypnuti Laptop Modeu

Enable laptop mode when on battery power.
ENABLE_LAPTOP_MODE_ON_BATTERY=1


Kód: [Vybrat]
root@zemkovo-lenovo:/home/zemko# cat /etc/laptop-mode/laptop-mode.conf
###############################################################################
#
# Configuration for Laptop Mode Tools
# -----------------------------------
#
# There is a "system" to the configuration setting names:
#    CONTROL_something=0/1   Determines whether Laptop Mode Tools controls
#                            something
#    LM_something=value      Value of "something" when laptop mode is active
#    NOLM_something=value    Value of "something" when laptop mode is NOT
#                            active
#    AC_something=value      Value of "something" when the computer is running
#                            on AC power
#    BATT_something=value    Value of "something when the computer is running
#                            on battery power
#
# There can be combinations of LM_/NOLM_ and AC_/BATT_ prefixes, but the
# available prefixes are different for each setting. The available ones are
# documented in the manual page, laptop-mode.conf(8). If there is no LM_/
# NOLM_ in a setting name, then the value is used independently of laptop
# mode state, and similarly, if there is no AC_/BATT_, then the value is used
# independently of power state.
#
# Some options only work on ACPI systems. They are marked ACPI-ONLY.
#
# Note that this configuration file is a fragment of shell script: you
# can use all the features of the shell scripting language to achieve your
# desired configuration.
#
#
# Modules
# -------
#
# 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!
#
###############################################################################


###############################################################################
# Enable/Disable laptop-mode-tools execution
# ------------------------------------------
# Set it to 0 to completely disable laptop-mode-tools from running
###############################################################################
#
ENABLE_LAPTOP_MODE_TOOLS=1


###############################################################################
# Configuration debugging
# -----------------------
###############################################################################

#
# Set this to 1 if you want to see a lot of information when you start/stop
# laptop_mode.
#
VERBOSE_OUTPUT=0

# Set this to 1 if you want to log messages to syslog
LOG_TO_SYSLOG=1

# Run in shell debug mode
# Enable this if you would like to execute the entire laptop-mode-tools program
# in shell debug mode. Warning: This will create a lot of text output
# If you are debugging an individual module, perhaps you would want to enable
# each module specific debug mode (available in module conf files)
DEBUG=0

###############################################################################
# When to enable laptop mode
# --------------------------
#
# "Laptop mode" is the mode in which laptop mode tools makes the computer
# consume less power. This includes the kernel "laptop_mode" feature, which
# allows your hard drives to spin down, as well as various other settings which
# can be tweaked by laptop mode tools. You can enable or disable all of these
# settings using the CONTROL_... options further down in this config file.
###############################################################################


#
#Enable laptop mode when on battery power.
#
ENABLE_LAPTOP_MODE_ON_BATTERY=1


#
# Enable laptop mode when on AC power.
#
ENABLE_LAPTOP_MODE_ON_AC=0


#
# Enable laptop mode when the laptop's lid is closed, even when we're on AC
# power? (ACPI-ONLY)
#
ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED=0


#
# Enable all simple zero-configuration auto modules
# This option enables all simple modules (listed below) without requiring
# the user to enable each module individually
#
# List of modules which can be automatically enabled with this setting are:
#
# ac97-powersave
# cpufreq
# dpms-standby
# eee-superhe
# ethernet
# exec-commands
# hal-polling
# hdparm
# intel-hda-powersave
# intel-sata-powermgmt
# runtime-pm
# sched-mc-power-savings
# sched-smt-power-savings
# terminal-blanking
# usb-autosuspend
# wireless-ipw-power
# wireless-iwl-power
# wireless-power
#
# Set this to 1 to enable all simple zero-configuration auto modules listed above.
#
# NOTE: You can explicitly enable/disable any of the above modules by changing their
# values in the individual settings file
#
ENABLE_AUTO_MODULES=1



###############################################################################
# When to enable data loss sensitive features
# -------------------------------------------
#
# When data loss sensitive features are disabled, laptop mode tools acts as if
# laptop mode were disabled, for those features only.
#
# Data loss sensitive features include:
# - laptop_mode (i.e., delayed writes)
# - hard drive write cache
#
# All of the options that follow can be set to 0 in order to prevent laptop
# mode tools from using them to stop data loss sensitive features. Use this
# when you have a battery that reports the wrong information, that confuses
# laptop mode tools.
#
# Disabling data loss sensitive features is ACPI-ONLY, and it only works if
# your battery gives off frequent ACPI events to indicate a change in battery
# level.
#
# NOTE: If your battery does NOT give off battery events often enough, you can
# enable the battery-level-polling module to make this work. Look at the
# file /etc/laptop-mode/conf.d/battery-level-polling.conf for more information.
#
###############################################################################


#
# Disable all data loss sensitive features when the battery level (in % of the
# battery capacity) reaches this value.
#
MINIMUM_BATTERY_CHARGE_PERCENT=3


#
# Disable data loss sensitive features when the battery reports its state
# as "critical".
#
DISABLE_LAPTOP_MODE_ON_CRITICAL_BATTERY_LEVEL=1



###############################################################################
# Controlled hard drives and partitions
# -------------------------------------
#
# For spinning down your hard drives, laptop mode will remount file systems and
# adjust hard drive spindown timeouts. These parameters specify which
# devices and partitions are affected by laptop mode.
###############################################################################


#
# The drives that laptop mode controls.
# Separate them by a space, e.g. HD="/dev/hda /dev/hdb". The default is a
# wildcard, which will get you all your IDE and SCSI/SATA drives.
#
HD="/dev/[hs]d[abcdefgh]"


#
# The partitions (or mount points) that laptop mode controls.
# Separate the values by spaces. Use "auto" to indicate all partitions on drives
# listed in HD. You can add things to "auto", e.g. "auto /dev/hdc3". You can
# also specify mount points, e.g. "/mnt/data".
#
PARTITIONS="auto /dev/mapper/*"


#
# If this is enabled, laptop mode tools will assume that SCSI drives are
# really SATA drives that only _look_ like SCSI drives, and will use hdparm
# to control them. Set this to 0 if you have /dev/sd devices and you want
# laptop mode tools to use the "sdparm" command to control them.
#
ASSUME_SCSI_IS_SATA=1


###############################################################################
# Hard drive behaviour settings
# -----------------------------
#
# These settings specify how laptop mode tools will adjust the various
# parameters of your hard drives and file systems.
###############################################################################


#
# Maximum time, in seconds, of work that you are prepared to lose when your
# system crashes or power runs out. This is the maximum time that Laptop Mode
# will keep unsaved data waiting in memory before spinning up your hard drive.
#
LM_BATT_MAX_LOST_WORK_SECONDS=600
LM_AC_MAX_LOST_WORK_SECONDS=360


#
# Should laptop mode tools control readahead?
#
CONTROL_READAHEAD=1


#
# Read-ahead, in kilobytes. You can spin down the disk while playing MP3/OGG
# by setting the disk readahead to a reasonable size, e.g. 3072 (3 MB).
# Effectively, the disk will read a complete MP3 at once, and will then spin
# down while the MP3/OGG is playing. Don't set this too high, because the
# readahead is applied to _all_ files that are read from disk.
#
LM_READAHEAD=3072
NOLM_READAHEAD=128


#
# Should laptop mode tools add the "noatime" option to the mount options when
# laptop mode is enabled?
#
CONTROL_NOATIME=0

# 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


#
# Idle timeout values. (hdparm -S)
# Default is 2 hours on AC (NOLM_HD_IDLE_TIMEOUT_SECONDS=7200) and 20 seconds
# for battery and for AC with laptop mode on.
#
LM_AC_HD_IDLE_TIMEOUT_SECONDS=20
LM_BATT_HD_IDLE_TIMEOUT_SECONDS=20
NOLM_HD_IDLE_TIMEOUT_SECONDS=7200


#
# Should laptop mode tools control the hard drive power management settings?
#
# Set to 0 to disable
CONTROL_HD_POWERMGMT="auto"


#
# Power management for HD (hdparm -B values)
#
BATT_HD_POWERMGMT=1
LM_AC_HD_POWERMGMT=254
NOLM_AC_HD_POWERMGMT=254


#
# Should laptop mode tools control the hard drive write cache settings?
#
CONTROL_HD_WRITECACHE=0


#
# Write cache settings for HD (hdparm -W values)
#
NOLM_AC_HD_WRITECACHE=1
NOLM_BATT_HD_WRITECACHE=0
LM_HD_WRITECACHE=0




###############################################################################
# Settings you probably don't want to touch
# -----------------------------------------
#
# It is usually not necessary to change these parameters. They are included
# for completeness' sake.
###############################################################################


#
# Change mount options on partitions in PARTITIONS? You don't really want to
# disable this. If you do, then your hard drives will probably not spin down
# anymore.
#
CONTROL_MOUNT_OPTIONS=1


#
# Dirty synchronous ratio.  At this percentage of dirty pages the process
# which calls write() does its own writeback.
#
LM_DIRTY_RATIO=60
NOLM_DIRTY_RATIO=40


#
# Allowed dirty background ratio, in percent.  Once DIRTY_RATIO has been
# exceeded, the kernel will wake pdflush which will then reduce the amount
# of dirty memory to dirty_background_ratio.  Set this nice and low, so once
# some writeout has commenced, we do a lot of it.
#
LM_DIRTY_BACKGROUND_RATIO=1
NOLM_DIRTY_BACKGROUND_RATIO=10


#
# kernel default settings -- don't touch these unless you know what you're
# doing.
#
DEF_UPDATE=5
DEF_XFS_AGE_BUFFER=15
DEF_XFS_SYNC_INTERVAL=30
DEF_XFS_BUFD_INTERVAL=1
DEF_MAX_AGE=30


#
# This must be adjusted manually to the value of HZ in the running kernel
# on 2.4, until the XFS people change their 2.4 external interfaces to work in
# centisecs. This can be automated, but it's a work in progress that still
# needs some fixes. On 2.6 kernels, XFS uses USER_HZ instead of HZ for
# external interfaces, and that is currently always set to 100. So you don't
# need to change this on 2.6.
#
XFS_HZ=100


#
# Seconds laptop mode has to to wait after the disk goes idle before doing
# a sync.
#
LM_SECONDS_BEFORE_SYNC=2

EDIT2: podla prikazu od tomasze mam na baterku trosku bordel taky..
Kód: [Vybrat]
root@zemkovo-lenovo:/home/zemko# sudo hdparm -I /dev/sda | grep 'Advanced '
Advanced power management level: 1
   * Advanced Power Management feature set
« Poslední změna: 11 Srpen 2011, 09:22:06 od zemko »

tomasz

  • Návštěvník
  • *
  • Příspěvků: 18
  • Karma: +1/-0
    • Zobrazit profil
Re: Laptop mode - Jak na uspávání disku / parkování hlaviček v Jaunty?
« Odpověď #16 kdy: 11 Srpen 2011, 02:29:17 »
Sry, ze vojdem do diskusie, ale moje statistiky:

Kód: [Vybrat]
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   186   154   021    Pre-fail  Always       -       1700
  4 Start_Stop_Count        0x0032   092   092   000    Old_age   Always       -       8687
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   100   253   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   091   091   000    Old_age   Always       -       7271
 10 Spin_Retry_Count        0x0032   100   100   051    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   099   099   000    Old_age   Always       -       1778
191 G-Sense_Error_Rate      0x0032   001   001   000    Old_age   Always       -       5542
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       154
193 Load_Cycle_Count        0x0032   020   020   000    Old_age   Always       -       540080
194 Temperature_Celsius     0x0022   103   098   000    Old_age   Always       -       44
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   253   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   100   253   051    Old_age   Offline      -       0

Dost sa mi nepaci to cislo pri "193 Load_Cycle_Count" ... mohli to sposobit Win7? Notebook (MSI CX620) ma 1.5 roka a asi rok sustavne bezal na Win7 + ide 24/7

Edit: mozem potvrdit, ze to robi W7 (ked odpojim AC tak v Ubuntu kazdych cca 10 sekund zachrci disk a pribudne 193jka) zatial co pod W7 to robi stale, nezavisle na AC

Pri behu na bateriu sa zmeni APM na 128 z povodnej 254
Kód: [Vybrat]
tomasz@tomasz-MS-1688:~$ sudo hdparm -I /dev/sda | grep 'Advanced '
Advanced power management level: 128
  * Advanced Power Management feature set
Prejavi sa zmena na vydrzi, ked APM nasilu zvysim na 254?
« Poslední změna: 11 Srpen 2011, 02:48:19 od tomasz »

zemko

  • Člen
  • **
  • Příspěvků: 123
  • Karma: +3/-1
  • fat skankin bastard
    • Zobrazit profil
Re: Laptop mode - Jak na uspávání disku / parkování hlaviček v Jaunty?
« Odpověď #17 kdy: 19 Srpen 2011, 10:37:15 »
tak asi vim kde je problem...system neudrzi nastaveni z hdparm...kdyz odpojim adapter tak musim znovu zadat $hdparm -B 254 -S 253 /dev/sda aby se prestalo parkovat, kdyz zapnu laptop musim znovu zadat $hdparm -B 254 -S 253 /dev/sda, kdyz laptop probudim, je potreba znovu zadat $hdparm -B 254 -S 253 /dev/sda

a pak to prestane parkovat....jen teda nevim jak to udelat "napevno"

zemko

  • Člen
  • **
  • Příspěvků: 123
  • Karma: +3/-1
  • fat skankin bastard
    • Zobrazit profil
Re: Laptop mode - Jak na uspávání disku / parkování hlaviček v Jaunty?
« Odpověď #18 kdy: 29 Srpen 2011, 12:02:27 »
tak jsem nastavil hdparm.conf na

Kód: [Vybrat]
root@zemkovo-lenovo:/home/zemko# cat /etc/hdparm.conf
## This is the default configuration for hdparm for Debian.  It is a
## rather simple script, so please follow the following guidelines :)
## Any line that begins with a comment is ignored - add as many as you
## like.  Note that an in-line comment is not supported.  If a line
## consists of whitespace only (tabs, spaces, carriage return), it will be
## ignored, so you can space control fields as you like.  ANYTHING ELSE
## IS PARSED!!  This means that lines with stray characters or lines that
## use non # comment characters will be interpreted by the initscript. 
## This has probably minor, but potentially serious, side effects for your
## hard drives, so please follow the guidelines.  Patches to improve
## flexibilty welcome.  Please read /usr/share/doc/hdparm/README.Debian for
## notes about known issues, especially if you have an MD array.
##
## Note that if the init script causes boot problems, you can pass 'nohdparm'
## on the kernel command line, and the script will not be run.
##
## Uncommenting the options below will cause them to be added to the DEFAULT
## string which is prepended to options listed in the blocks below.
##
## If an option is listed twice, the second instance replaces the first.
##
## /sbin/hdparm is not run unless a block of the form:
##      DEV {
##         option
##         option
##         ...
##      }
## exists.  This blocks will cause /sbin/hdparm OPTIONS DEV to be run.
## Where OPTIONS is the concatenation of all options previously defined
## outside of a block and all options defined with in the block.

# -q be quiet
quiet
# -a sector count for filesystem read-ahead
#read_ahead_sect = 12
# -A disable/enable the IDE drive's read-lookahead feature
#lookahead = on
# -b bus state
#bus = on
# -B apm setting
#apm = 254
# -c enable (E)IDE 32-bit I/O support - can be any of 0,1,3
#io32_support = 1
# -d disable/enable the "using_dma" flag for this drive
#dma = off
# -D enable/disable the on-drive defect management
#defect_mana = off
# -E cdrom speed
#cd_speed = 16
# -k disable/enable the "keep_settings_over_reset" flag for this drive
#keep_settings_over_reset = off
# -K disable/enable the drive's "keep_features_over_reset" flag
#keep_features_over_reset = on
# -m sector count for multiple sector I/O
#mult_sect_io = 32
# -P maximum sector count for the drive's internal prefetch mechanism
#prefetch_sect = 12
# -r read-only flag for device
#read_only = off
# -s Turn on/off power on in standby mode
# poweron_standby = off
# -S standby (spindown) timeout for the drive
#spindown_time = 253
# -u interrupt-unmask flag for the drive
#interrupt_unmask = on
# -W Disable/enable the IDE drive's write-caching feature
#write_cache = off
# -X IDE transfer mode for newer (E)IDE/ATA2 drives
#transfer_mode = 34
# -y force to immediately enter the standby mode
#standby
# -Y force to immediately enter the sleep mode
#sleep
# -Z Disable the power-saving function of certain Seagate drives
#disable_seagate
# -M Set the acoustic management properties of a drive
#acoustic_management
# -p Set the chipset PIO mode
# chipset_pio_mode
# --security-freeze Freeze the drive's security status
# security_freeze
# --security-unlock Unlock the drive's security
# security_unlock = PWD
# --security-set-pass Set security password
# security_pass = password
# --security-disable Disable drive locking
# security_disable
# --user-master Select password to use
# user-master = u
# --security-mode Set the security mode
# security_mode = h

# Root file systems.  Please see README.Debian for details
# ROOTFS = /dev/hda

## New note - you can use straight hdparm commands in this config file
## as well - the set up is ugly, but it keeps backwards compatibility
## Additionally, it should be noted that any blocks that begin with
## the keyword 'command_line' are not run until after the root filesystem
## is mounted.  This is done to avoid running blocks twice.  If you need
## to run hdparm to set parameters for your root disk, please use the
## standard format.

#Samples follow:
#First three are good for devfs systems, fourth one for systems that do
#not use devfs.  The fifth example uses straight hdparm command line
#syntax.  Any of the blocks that use command line syntax must begin with
#the keyword 'command_line', and no attempt is made to validate syntax. 
#It is provided for those more comfortable with hdparm syntax.

#/dev/discs/disc0/disc {
# mult_sect_io = 16
# write_cache = off
# spindown_time = 240
#}

#/dev/discs/disc1/disc {
# mult_sect_io = 32
# spindown_time = 36
# write_cache = off
#}

#/dev/cdroms/cdrom0 {
# dma = on    
# interrupt_unmask = on
# io32_support = 0
#}

#/dev/hda {
# mult_sect_io = 16
# write_cache = off
# dma = on
#}

dulezite je apm a spindown, i kdyz to tady je napevno, tak pri zapnuti/probuzeni/odpojeni z adapteru to zacina na 128 a spindown taky neni na 253...takze uz me to zacina pekne srat...asi se vratim zpet na 10.10

zemko

  • Člen
  • **
  • Příspěvků: 123
  • Karma: +3/-1
  • fat skankin bastard
    • Zobrazit profil