The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

laptop-mode.conf (8)
  • >> laptop-mode.conf (8) ( Linux man: Команды системного администрирования )
  •  

    NAME

    laptop-mode.conf - Configuration file for the laptop-mode-tools and the laptop_mode control script.  

    DESCRIPTION

    This manual page documents the options that can be set in the laptop-mode.conf configuration file. For a description of what laptop mode does, see the laptop_mode(8) manpage.

     

    SETTINGS

    The syntax of options is OPTION=value. There are some groups of options that specify values depending on power state and laptop mode is enabled. These use the prefix "LM_" to indicate that a value is used only when laptop mode is enabled, "NOLM_" to indicate the opposite, "AC_" to indicate that a value is used only when the system is running on AC power, and "BATT_" to indicate that a value is used only when the system is running on batteries. Settings are prefixed with a combination of an optional LM_/NOLM_ prefix and an optional AC_/BATT_. For instance, the combination LM_AC_ means "when the system is in laptop mode and on AC power". (Note that this situation happens only if ENABLE_LAPTOP_MODE_ALWAYS is enabled!) If one of the prefixes (either LM_/NOLM_ or AC_/BATT_) is missing, then the value is used independently of the state of laptop mode or AC power, respectively. Options that start with "CONTROL_" are boolean settings that determine whether laptop mode tools is allowed to control a certain aspect of your system. Boolean settings always expect "0" to indicate the false (negative/no/disabled) value, and "1" to indicate the true (positive/yes/enabled) value.

    The following settings are available in laptop-mode.conf:

    VERBOSE_OUTPUT
    Set this to 1 if you want to see a lot of output when you start/stop laptop mode, and to 0 if you don't want this. Useful for debugging purposes.

    ENABLE_LAPTOP_MODE_ON_BATTERY
    ENABLE_LAPTOP_MODE_ON_AC
    These options determine whether laptop mode will be activated when the computer is on battery or on AC power, respectively. Note that if the system service laptop-mode is not started, then laptop mode will never be started, even if this option is enabled.
     
    ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED
    When this option is enabled, laptop mode will be activated when the laptop's lid is closed, even if the system is not working on batteries. Note that if the system service laptop-mode is not started, then laptop mode will never be started, even if this option is enabled. This feature is only supported on ACPI.
     
    MINIMUM_BATTERY_CHARGE_PERCENT
    The minimum number of battery minutes, charge (in mAh) or charge (in mWh) that you want to have available while your laptop is in laptop mode. When the number of minutes/mAhs/mWhs goes below this value, the data loss sensitive features are automatically disabled. Note that some batteries do not report a discharge rate, which means that MINIMUM_BATTERY_MINUTES has no effect for these batteries. These options are only supported on ACPI.

    DISABLE_LAPTOP_MODE_ON_CRITICAL_BATTERY_LEVEL
    If this option is enabled, the data loss sensitive features of laptop mode are disabled when the battery reports its state as "critical". This option is only supported on ACPI.

    HD
    The hard drives which laptop mode should operate upon. If you have multiple hard drives, you should list them all in this option, separated by spaces, for example: "/dev/hda /dev/hdb".

    PARTITIONS
    This option specifies the partitions or mount points that laptop mode should operate upon. Separate the partitions or mount points by spaces. You can include the entry "auto" to stand for the partitions on the hard drives specified in the HD option.
     
    ASSUME_SCSI_IS_SATA
    This option, enabled by default, tells laptop mode tools to assume that a device /dev/sdX is a SATA device, and that it should be controlled using hdparm. If your /dev/sdX drives are really SCSI drives, disable this option.

    LM_BATT_MAX_LOST_WORK_SECONDS
    LM_AC_MAX_LOST_WORK_SECONDS
    The maximum number of seconds worth of data that you can lose when power runs out or when the computer crashes. This is the maximum number of seconds that laptop mode will keep modified data in memory without being written to disk. (Note that the NOLM value is missing: modifying this value when laptop mode is disabled is extremely useless, as it won't save you any power, and will only lose you work.)
     
    CONTROL_READAHEAD
    When this option is enabled, laptop mode tools controls the readahead on the filesystems it works upon.

    LM_READAHEAD
    NOLM_READAHEAD
    The number of kilobytes to "read ahead" on your hard disks. Reading ahead means that whenever some data is read from disk, the data which is most likely to be accessed next is read as well, ahead of time. This then saves a hard disk spinup when the data is actually needed, because the data is then already in memory. Don't set this value too high, because the readahead applies to all files that are read!

    CONTROL_NOATIME
    When this option is enabled, laptop mode tools places the "noatime" option in the mount options of your filesystems when laptop mode is active. This option has the effect of disabling access time logging on files, which may save some disk activity. If you use programs that depend on access times (e.g., mutt), then you should disable this option.

    CONTROL_HD_IDLE_TIMEOUT
    When this option is enabled, laptop mode tools adjusts your hard drives' idle timeouts, i.e., the time of inactivity before they spin down.

    LM_AC_HD_IDLE_TIMEOUT_SECONDS
    LM_BATT_HD_IDLE_TIMEOUT_SECONDS
    NOLM_HD_IDLE_TIMEOUT_SECONDS
    These settings control the idle timeout for your hard drives. The values are specified in seconds. Values up to 20 minutes can be represented accurately by the hardware, anything above that is rounded down to half-hour precision. Use the value 0 to disable idle timeout.

    CONTROL_HD_POWERMGMT
    When this option is enabled, laptop mode tools adjusts your hard drives' power management settings.

    BATT_HD_POWERMGMT
    LM_AC_HD_POWERMGMT
    NOLM_AC_HD_POWERMGMT
    These values specify the power management level for your hard drives. The legal values for these options can be found in the hdparm(8) manual page, in the documentation of the -B option.

    CONTROL_HD_WRITECACHE
    When this option is enabled, laptop mode tools controls your hard drives' write cache settings.

    NOLM_AC_HD_WRITECACHE
    NOLM_BATT_HD_WRITECACHE
    LM_HD_WRITECACHE
    These options specify whether the write caches should be enabled for your hard drives.

    ACPI_WITHOUT_AC_EVENTS
    Enable this option if you have a laptop with a buggy ACPI implementation that doesn't send out AC adapter events. Enabling this option will make laptop mode check the AC adapter state whenever the battery state changes, which achieves just about the same effect as responding to AC adapter events.

    CONTROL_CPU_FREQUENCY
    When this option is enabled, laptop mode tools controls your CPU's frequency scaling bounds and the scaling governor. This option is currently only supported on 2.6 kernels.
     
    BATT_CPU_MAXFREQ
    BATT_CPU_INFREQ
    BATT_CPU_GOVERNOR
    BATT_CPU_IGNORE_NICE_LOAD
    LM_AC_CPU_MAXFREQ
    LM_AC_CPU_MINFREQ
    LM_AC_CPU_GOVERNOR
    LM_AC_CPU_IGNORE_NICE_LOAD
    NOLM_AC_CPU_MAXFREQ
    NOLM_AC_CPU_MINFREQ
    NOLM_AC_CPU_GOVERNOR
    NOLM_AC_CPU_IGNORE_NICE_LOAD
    These options specify the CPU frequency bounds and scaling governor in the various power states. You can change the MAXFREQ and MINFREQ values to any value listed in /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies. In addition, you can use "fastest" and "slowest". The GOVERNOR option controls the setting for /sys/devices/system/cpu/cpufreq/scaling_governor. The available options are dependent on the installed kernel. The most common ones are "conservative", "performance" and "ondemand". The IGNORE_NICE_LOAD option controls a setting that is available for the "conservative" and "ondemand" governors. Set this option to 1 if you want the frequency scaling governor to not increase the CPU frequency for the sake of low-priority ("nice") background processes.

    CONTROL_CPU_THROTTLING
    When this option is enabled, laptop mode tools controls your CPU's throttling level. It is only useful if your CPU doesn't support frequency scaling. This option is only supported on some ACPI hardware.
     
    BATT_CPU_THROTTLING
    LM_AC_CPU_THROTTLING
    NOLM_AC_CPU_THROTTLING
    These options specify the throttling level for the CPU in the various power states. You can change it to any level listed in /proc/acpi/processor/CPU0/throttling (use only the number!). In addition, you can use "maximum" (which is the slowest option), "minimum" (full speed) and "medium" (about halfway).

    CONTROL_SYSLOG_CONF
    When this option is enabled, laptop mode tools controls /etc/syslog.conf as a symlink. It will point /etc/syslog.conf (or the path specified by the SYSLOG_CONF configuration option) to the appropriate configuration file. Please use lm-syslog-setup(8) to set up the filesystem, and read the lm-syslog-setup(8) manual page for more information.
     
    LM_AC_SYSLOG_CONF
    NOLM_AC_SYSLOG_CONF
    BATT_SYSLOG_CONF
    These options specify the path to the configuration file for syslogd which is to be used.
     
    SYSLOG_CONF_SIGNAL_PROGRAM
    This option specifies the program that is to be signalled when the syslog.conf has been modified. By default this is set to "syslogd". Please note: the signal sent to the process is SIGHUP, which works for syslogd but not necessarily for replacement logging packages.
     
    SYSLOG_CONF
    This option specifies the path to the syslog.conf config file which is to be controlled as a symlink by laptop mode tools.

    CONTROL_DPMS_STANDBY
    When this option is enabled, laptop mode will control the DPMS standby timeout for all X displays on the machine that users have logged on to. In short, this allows laptop mode to control the time after which your screen is blanked.

    There is one limitation to this feature: the settings are not automatically applied to new X logons. This can be fixed by configuring the display manager. For the gdm display manager, configure a PostLogin directory (usually /etc/gdm/PostLogin or /etc/X11/gdm/PostLogin), and in that directory create a shell script called Default. In that file, include the command:

    ( sleep 60 ; /usr/sbin/laptop_mode force ) &

    Similar configurations are possible for other window managers. Please consult your window manager documentation for more information.

    BATT_DPMS_STANDBY
    LM_AC_DPMS_STANDBY
    NOLM_AC_DPMS_STANDBY
    These options specify the display standby timeouts for the X displays, in seconds.

    CONTROL_TERMINAL
    When this option is enabled, laptop mode will control the terminal blanking settings for Linux's virtual consoles.

    TERMINALS
    This option should contain a space-separated list of console device files that should be affected by the terminal blanking settings. Only one console device file needs to be included, because the settings are shared between all virtual consoles. By default this setting is set to /dev/tty1.

    BATT_TERMINAL_BLANK_MINUTES
    LM_AC_TERMINAL_BLANK_MINUTES
    NOLM_AC_TERMINAL_BLANK_MINUTES
    BATT_TERMINAL_POWERDOWN_MINUTES
    LM_AC_TERMINAL_POWERDOWN_MINUTES
    NOLM_AC_TERMINAL_POWERDOWN_MINUTES
    These options specify the terminal blanking and powerdown timeouts, in minutes. The allowed ranges are 1-60 minutes, or 0 to disable blanking or powerdown. The values are cumulative: the powerdown value is counted from the moment of screen blanking, not from the start of inactivity.

    CONTROL_BRIGHTNESS
    When this option is enabled, laptop mode will adjust your LCD screen's brightness settings, if possible. You must configure the following settings for this to work.

    BATT_BRIGHTNESS_COMMAND
    LM_AC_BRIGHTNESS_COMMAND
    NOLM_AC_BRIGHTNESS_COMMAND
    BRIGHTNESS_OUTPUT
    The BRIGHTNESS_COMMAND settings specify commands that should be executed in order to set the brightness of your LCD. The BRIGHTNESS_OUTPUT setting specifies where the output of the command will be written. For instance, if your LCD's brightness is adjusted by writing a numeric value 3 to a file called /proc/brightness, you should set the command to "echo 3" and the output file to "/proc/brightness". If your LCD's brightness is adjusted using a utility like "toshset", you should include the entire toshset command line as the command, and set the output file to "/dev/null".

    ENABLE_AUTO_HIBERNATION
    When this option is enabled, laptop mode will automatically hibernate your computer when the battery level reaches a certain configurable threshold. This feature is only available when ACPI is enabled.

    HIBERNATE_COMMAND
    This option specifies the command that laptop mode should execute when auto-hibernation is triggered. Normally, this is set to something like "/usr/sbin/hibernate".

    AUTO_HIBERNATION_BATTERY_CHARGE_PERCENT
    The battery level threshold for auto-hibernation, as a percentage of total battery capacity.

    AUTO_HIBERNATION_ON_CRITICAL_BATTERY_LEVEL
    When this option is enabled, auto-hibernation will kick in when the battery reports its state as "critical".

    CONTROL_START_STOP
    If this option is enabled, laptop mode tools will automatically start and stop daemons or other programs for you. The actual configuration of which daemons are to be stopped/started is done by placing links to the daemons' init scripts in the following directories:
    /etc/laptop-mode/batt-start
    /etc/laptop-mode/batt-stop
    /etc/laptop-mode/lm-ac-start
    /etc/laptop-mode/lm-ac-stop
    /etc/laptop-mode/nolm-ac-start
    /etc/laptop-mode/nolm-ac-stop
    As you have probably guessed, the directories of the form "X-stop-daemons" should contain init scripts of daemons that you want stopped in mode X, while the directories of the form "X-start-daemons" should contain init scripts of daemons that you want started in mode X. Of course, it is possible to put in your own handling of modes as well: the only requirement on the scripts in the directories is that they handle the "start" and "stop" commands, like init scripts usually do.

    The ordering of the script handling is as follows. When a mode is entered, the actions of the previous mode are undone, in reverse order. This means that if the previous mode had done "daemon1 stop", "daemon2 stop" and "daemon3 start", then the undoing actions will be "daemon3 stop", "daemon2 start", "daemon1 start". After that, the stop-scripts for the new mode are called, and then the start-scripts are called. Please note that there is no detection of commonalities between modes at this point, i.e., if the mode you're coming from and the mode you're going to both specify that a daemon "X" should be stopped, then the daemon will be un-stopped (that is, started) while leaving the previous mode, and then stopped again.

    CONTROL_MOUNT_OPTIONS
    When this option is enabled, laptop mode tools is allowed to control the mount options for your filesystems. Disabling this will break CONTROL_NOATIME, but it will most probably also break laptop mode itself, as changes to the mount options are crucial for achieving spun-down hard drives.

    LM_DIRTY_RATIO
    NOLM_DIRTY_RATIO
    This option specifies the percentage of system memory that is allowed to contain unwritten modified data when laptop mode is active.
     
    LM_DIRTY_BACKGROUND_RATIO
    NOLM_DIRTY_BACKGROUND_RATIO
    This option specifies the percentage of system memory that is allowed to contain unwritten modified data after the DIRTY_RATIO barrier has been crossed. The effect of this option is that when more than DIRTY_RATIO percent of memory contains modified data, the system will synchronously write back data until only DIRTY_BACKGROUND_RATIO percent of memory contains modified data.

    DEF_UPDATE
    DEF_XFS_AGE_BUFFER
    DEF_XFS_SYNC_INTERVAL
    DEF_XFS_BUFD_INTERVAL
    DEF_MAX_AGE
    These options contain the default (non-laptop-mode) values for some kernel options that are modified when laptop mode is active. You do not normally need to change these, they represent the normal kernel defaults.

    XFS_HZ
    This option specifies the number of units in a second that is utilized by a 2.4 kernel. If you run a 2.4 kernel with an XFS filesystem on non-Intel hardware, you need to change this option to reflect the kernel "ticks per second" value, which is the kernel variable HZ. Unfortunately this is not exposed anywhere, so you'll have to specify it manually.

    LM_SECONDS_BEFORE_SYNC
    The number of seconds that laptop mode waits after the disk goes idle before it starts a full sync. This should always be less than your hard disk idle timeout, because otherwise you'll have a sync directly after your drive spins down. Two seconds is usually a good value for this option.
     
    XFS_HZ
    This option expresses the unit of the XFS tuning parameters. The default is 100. This option is only useful for 2.4 kernels that have a value for HZ that is not 100. In the 2.6 kernel series, the XFS interfaces were modified to always use USER_HZ (which is currently always 100), so for these kernels you do not need to modify this value. Also, on 2.4 kernels the value of HZ is 100 for the most common architectures, so you need only change this value if you use a less common architecture.

     

    SEE ALSO

    laptop_mode(8).

    lm-syslog-setup(8).

    lm-profiler(8).

    hdparm(8).  

    AUTHOR

    This manual page was written by Bart Samwel ([email protected]). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation.
     


     

    Index

    NAME
    DESCRIPTION
    SETTINGS
    SEE ALSO
    AUTHOR


    Поиск по тексту MAN-ов: 




    Партнёры:
    PostgresPro
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру