Laptop HP Nw 8440: Diferență între versiuni

De la Wiki.lug.ro
Salt la: navigare, căutare
Linia 5: Linia 5:
 
In primul rand configuratia hardware:
 
In primul rand configuratia hardware:
  
  00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express Memory Controller Hub (rev 03) <br />
+
  00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express Memory Controller Hub (rev 03)
  00:01.0 PCI bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express PCI Express Root Port (rev 03) <br />
+
  00:01.0 PCI bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express PCI Express Root Port (rev 03)
  00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01) <br />
+
  00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)
  00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01) <br />
+
  00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01)
  00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 01) <br />
+
  00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 01)
  00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 01) <br />
+
  00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 01)
  00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 01) <br />
+
  00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 01)
  00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 01) <br />
+
  00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 01)
  00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 01) <br />
+
  00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 01)
  00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 01) <br />
+
  00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 01)
  00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01) <br />
+
  00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)
  00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e1) <br />
+
  00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e1)
  00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 01) <br />
+
  00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 01)
  00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01) <br />
+
  00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01)
  00:1f.2 SATA controller: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller AHCI (rev 01) <br />
+
  00:1f.2 SATA controller: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller AHCI (rev 01)
  01:00.0 VGA compatible controller: ATI Technologies Inc M56P [Radeon Mobility X1600] <br />
+
  01:00.0 VGA compatible controller: ATI Technologies Inc M56P [Radeon Mobility X1600]
  02:06.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller <br />
+
  02:06.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller
  02:06.1 FireWire (IEEE 1394): Texas Instruments PCIxx12 OHCI Compliant IEEE 1394 Host Controller <br />
+
  02:06.1 FireWire (IEEE 1394): Texas Instruments PCIxx12 OHCI Compliant IEEE 1394 Host Controller
  02:06.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD) <br />
+
  02:06.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)
  02:06.3 Generic system peripheral [0805]: Texas Instruments PCIxx12 SDA Standard Compliant SD Host Controller <br />
+
  02:06.3 Generic system peripheral [0805]: Texas Instruments PCIxx12 SDA Standard Compliant SD Host Controller
  02:06.4 Communication controller: Texas Instruments PCIxx12 GemCore based SmartCard controller <br />
+
  02:06.4 Communication controller: Texas Instruments PCIxx12 GemCore based SmartCard controller
  08:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5753M Gigabit Ethernet PCI Express (rev 21) <br />
+
  08:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5753M Gigabit Ethernet PCI Express (rev 21)
  10:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02) <br />
+
  10:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
  
 
  florin@samflorin-laptop:~$ cat /proc/cpuinfo |grep -i model
 
  florin@samflorin-laptop:~$ cat /proc/cpuinfo |grep -i model

Versiunea de la data 6 iulie 2007 23:44

Salut,

In randurile de mai jos va voi povesti despre experientele mele sexuale cu un laptop HP Nw 8440 si linux.

In primul rand configuratia hardware:

00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express Memory Controller Hub (rev 03)
00:01.0 PCI bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express PCI Express Root Port (rev 03)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 01)
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 01)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 01)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 01)
00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01)
00:1f.2 SATA controller: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller AHCI (rev 01)
01:00.0 VGA compatible controller: ATI Technologies Inc M56P [Radeon Mobility X1600]
02:06.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller
02:06.1 FireWire (IEEE 1394): Texas Instruments PCIxx12 OHCI Compliant IEEE 1394 Host Controller
02:06.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)
02:06.3 Generic system peripheral [0805]: Texas Instruments PCIxx12 SDA Standard Compliant SD Host Controller
02:06.4 Communication controller: Texas Instruments PCIxx12 GemCore based SmartCard controller
08:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5753M Gigabit Ethernet PCI Express (rev 21)
10:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
florin@samflorin-laptop:~$ cat /proc/cpuinfo |grep -i model
model           : 15
model name      : Intel(R) Core(TM)2 CPU         T7200  @ 2.00GHz
model           : 15
model name      : Intel(R) Core(TM)2 CPU         T7200  @ 2.00GHz


Pentru animalul de mai sus, va recomand un kernel cel putin 2.6.19 datorita unor buguri de "bad state" (a se vedea https://bugzilla.novell.com/show_bug.cgi?id=179702 ).
La acest model rezolvarea problemei a fost un kernel update,urmat de un upgrade de bios de pe pagina producatorului.


Distributia curenta pe acest model e Ubuntu 7.04 "Feisty Fawn". In timpul instalarii veti avea surpriza ca interfata grafica sa nu porneasca.
Workaround: instalati cu installerul in mod text sau din consola live-cd-ului sa dati:

sudo apt-get update
sudo apt-get install xorg-driver-fglrx
sudo aticonfig --initial
/etc/init.d/gdm restart (gdm poate fi inlocuit de xdm/kdm).

Dupa instalare, activarea "Multiverse" si aducerea la zi a pachetelor, pentru rezolvarea diverselor probleme de suspend2disk/suspend2ram (vezi sudo pmi capabilities) am editat astfel /etc/default/acpi-support:

# Comment the next line to disable ACPI suspend to RAM
ACPI_SLEEP=true
# Comment the next line to disable suspend to disk
ACPI_HIBERNATE=true
# Change the following to "standby" to use ACPI S1 sleep, rather than S3.
# This will save less power, but may work on more machines
ACPI_SLEEP_MODE=mem
# Add modules to this list to have them removed before suspend and reloaded
# on resume. An example would be MODULES="em8300 yenta_socket"
#
# Note that network cards and USB controllers will automatically be unloaded 
# unless they're listed in MODULES_WHITELIST
MODULES="ipw3945 sbp2 ohci1394 ieee1394"
# Add modules to this list to leave them in the kernel over suspend/resume
MODULES_WHITELIST="fglrx"
# Should we save and restore state using the VESA BIOS Extensions?
SAVE_VBE_STATE=false
# The file that we use to save the vbestate
VBESTATE=/var/lib/acpi-support/vbestate
# Should we attempt to warm-boot the video hardware on resume?
POST_VIDEO=false
# Save and restore video state?
# SAVE_VIDEO_PCI_STATE=true
# Should we switch the screen off with DPMS on suspend?
USE_DPMS=false
# Use Radeontool to switch the screen off? Seems to be needed on some machines
# RADEON_LIGHT=true
# Uncomment the next line to switch away from X and back again after resume.
# This is needed for some hardware, but should be unnecessary on most.
DOUBLE_CONSOLE_SWITCH=false
# Set the following to "platform" if you want to use ACPI to shut down
# your machine on hibernation
HIBERNATE_MODE=shutdown
# Comment this out to disable screen locking on resume
LOCK_SCREEN=true
# Uncomment this line to have DMA disabled before suspend and reenabled
# afterwards
# DISABLE_DMA=true
# Uncomment this line to attempt to reset the drive on resume. This seems
# to be needed for some Sonys
# RESET_DRIVE=true
# Add services to this list to stop them before suspend and restart them in 
# the resume process.
STOP_SERVICES="mysql "
# Restart Infra Red services on resume - off by default as it crashes some
# machines
RESTART_IRDA=false
# Switch to laptop-mode on battery power - off by default as it causes odd
# hangs on some machines
ENABLE_LAPTOP_MODE=true

Continutul /etc/apt/sources.list :

deb http://ro.archive.ubuntu.com/ubuntu/ feisty main restricted
deb-src http://ro.archive.ubuntu.com/ubuntu/ feisty main restricted
deb http://ro.archive.ubuntu.com/ubuntu/ feisty-updates main restricted
deb-src http://ro.archive.ubuntu.com/ubuntu/ feisty-updates main restricted
deb http://ro.archive.ubuntu.com/ubuntu/ feisty universe
deb-src http://ro.archive.ubuntu.com/ubuntu/ feisty universe
deb http://ro.archive.ubuntu.com/ubuntu/ feisty multiverse
deb-src http://ro.archive.ubuntu.com/ubuntu/ feisty multiverse
deb http://security.ubuntu.com/ubuntu feisty-security main restricted
deb-src http://security.ubuntu.com/ubuntu feisty-security main restricted
deb http://security.ubuntu.com/ubuntu feisty-security universe
deb-src http://security.ubuntu.com/ubuntu feisty-security universe
deb http://security.ubuntu.com/ubuntu feisty-security multiverse
deb-src http://security.ubuntu.com/ubuntu feisty-security multiverse
deb http://medibuntu.sos-sts.com/repo/ feisty free non-free
deb-src http://medibuntu.sos-sts.com/repo/ feisty free non-free
deb http://hydr0g3n.free.fr/qbittorrent/feisty/ ./
deb-src http://hydr0g3n.free.fr/qbittorrent/feisty/ ./
deb http://www.virtualbox.org/debian feisty non-free
deb http://wine.budgetdedicated.com/apt feisty main
deb http://beryl.xglusers.de/ubuntu.beryl-project.org/ feisty main
deb http://download.tuxfamily.org/syzygy42 feisty avant-window-navigator
deb http://repository.debuntu.org/ feisty multiverse
deb-src http://repository.debuntu.org/ feisty multiverse

Deoarece xgl din feisty are unele probleme de functionare, in /etc/apt/preferences am adaugat urmatoarele:


Cut here------

Package: * Pin: release o=lupine Pin-Priority: 1000


End here------

pentru a prefera pachetele din repository-ul beryl.

Am adaugat in /etc/modules urmatoarele linii:


Cut here-----------

cpufreq_conservative cpufreq_ondemand cpufreq_powersave cpufreq_stats cpufreq_userspace acpi-cpufreq


End here-----------

si am dezactivat powernowd din sysv-rc-conf (sudo apt-get install sysv-rc-conf) deoarece procesorul este unul intel,

iar power management e asigurat de laptop-mode-tools.

Continutul /etc/laptop-mode/laptop-mode.conf


Cut here-------
  1. Configuration for Laptop Mode Tools
  2. -----------------------------------
  3. There is a "system" to the configuration setting names:
  4. CONTROL_something=0/1 Determines whether Laptop Mode Tools controls
  5. something
  6. LM_something=value Value of "something" when laptop mode is active
  7. NOLM_something=value Value of "something" when laptop mode is NOT active
  8. AC_something=value Value of "something" when the computer is running
  9. on AC power
  10. BATT_something=value Value of "something when the computer is running on
  11. battery power
  12. There can be combinations of LM_/NOLM_ and AC_/BATT_ prefixes, but the
  13. available prefixes are different for each setting. The available ones are
  14. documented in the manual page, laptop-mode.conf(8). If there is no LM_/NOLM_
  15. in a setting name, then the value is used independently of laptop mode state,
  16. and similarly, if there is no AC_/BATT_, then the value is used independently
  17. of power state.
  18. Some options only work on ACPI systems. They are marked ACPI-ONLY.
  19. Note that this configuration file is a fragment of bash shell script: you
  20. can use all the features of the bash scripting language to achieve your
  21. desired configuration.


  1. Configuration debugging
  2. -----------------------
  1. Set this to 1 if you want to see a lot of information when you start/stop
  2. laptop_mode.

VERBOSE_OUTPUT=0


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

ENABLE_LAPTOP_MODE_ON_BATTERY=1

  1. Enable laptop mode when on AC power.

ENABLE_LAPTOP_MODE_ON_AC=1

  1. Enable laptop mode when the laptop's lid is closed, even when we're on AC
  2. power? (ACPI-ONLY)

ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED=1


  1. When to enable data loss sensitive features
  2. -------------------------------------------
  3. When data loss sensitive features are disabled, laptop mode tools acts as if
  4. laptop mode were disabled, for those features only.
  5. Data loss sensitive features include:
  6. - laptop_mode (i.e., delayed writes)
  7. - hard drive write cache
  8. All of the options that follow can be set to 0 in order to prevent laptop
  9. mode tools from using them to stop data loss sensitive features. Use this
  10. when you have a battery that reports the wrong information, that confuses
  11. laptop mode tools.
  12. Disabling data loss sensitive features is ACPI-ONLY.
  1. Disable all data loss sensitive features when the battery level (in % of the
  2. battery capacity) reaches this value.

MINIMUM_BATTERY_CHARGE_PERCENT=3

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

DISABLE_LAPTOP_MODE_ON_CRITICAL_BATTERY_LEVEL=1


  1. Controlled hard drives and partitions
  2. -------------------------------------
  3. For spinning down your hard drives, laptop mode will remount file systems and
  4. adjust hard drive spindown timeouts. These parameters specify which
  5. devices and partitions are affected by laptop mode.
  1. The drives that laptop mode controls.
  2. Separate them by a space, e.g. HD="/dev/hda /dev/hdb". The default is a
  3. wildcard, which will get you all your IDE and SCSI/SATA drives.

HD="/dev/[hs]d[abcdefgh]"

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

PARTITIONS="auto /dev/mapper/*"


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

ASSUME_SCSI_IS_SATA=1


  1. Hard drive behaviour settings
  2. -----------------------------
  3. These settings specify how laptop mode tools will adjust the various
  4. parameters of your hard drives and file systems.
  1. Maximum time, in seconds, of work that you are prepared to lose when your
  2. system crashes or power runs out. This is the maximum time that Laptop Mode
  3. 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

  1. Should laptop mode tools control readahead?

CONTROL_READAHEAD=1

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

LM_READAHEAD=3072 NOLM_READAHEAD=128

  1. Should laptop mode tools add the "noatime" option to the mount options when
  2. laptop mode is enabled?

CONTROL_NOATIME=1

  1. Should laptop mode tools control the hard drive idle timeout settings?

CONTROL_HD_IDLE_TIMEOUT=1

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

LM_AC_HD_IDLE_TIMEOUT_SECONDS=7200 LM_BATT_HD_IDLE_TIMEOUT_SECONDS=20 NOLM_HD_IDLE_TIMEOUT_SECONDS=7200

  1. Should laptop mode tools control the hard drive power management settings?

CONTROL_HD_POWERMGMT=1

  1. Power management for HD (hdparm -B values)

BATT_HD_POWERMGMT=1 LM_AC_HD_POWERMGMT=255 NOLM_AC_HD_POWERMGMT=255

  1. Should laptop mode tools control the hard drive write cache settings?

CONTROL_HD_WRITECACHE=1

  1. Write cache settings for HD (hdparm -W values)

NOLM_AC_HD_WRITECACHE=1 NOLM_BATT_HD_WRITECACHE=1 LM_HD_WRITECACHE=1


  1. CPU frequency scaling and throttling
  2. ------------------------------------
  3. Laptop mode tools can automatically adjust your kernel CPU frequency
  4. settings. This includes upper and lower limits and scaling governors.
  5. There is also support for CPU throttling, on systems that don't support
  6. frequency scaling.
  7. This feature only works on 2.6 kernels.
  1. Should laptop mode tools control the maximum CPU frequency?

CONTROL_CPU_FREQUENCY=1

  1. Legal values are "slowest" for the slowest speed that your
  2. CPU is able to operate at, "fastest" for the fastest speed,
  3. "medium" for some value in the middle, or any value listed in
  4. /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_frequencies.

BATT_CPU_MAXFREQ=medium BATT_CPU_MINFREQ=slowest BATT_CPU_GOVERNOR=powersave LM_AC_CPU_MAXFREQ=fastest LM_AC_CPU_MINFREQ=slowest LM_AC_CPU_GOVERNOR=powersave NOLM_AC_CPU_MAXFREQ=fastest NOLM_AC_CPU_MINFREQ=slowest NOLM_AC_CPU_GOVERNOR=powersave

  1. Should laptop mode tools control the CPU throttling? This is only useful
  2. on processors that don't have frequency scaling.
  3. (Only works when you have /proc/acpi/processor/CPU*/throttling.)

CONTROL_CPU_THROTTLING=0

  1. Legal values are "maximum" for the maximum (slowest) throttling level,
  2. "minimum" for minimum (fastest) throttling level, "medium" for a value
  3. somewhere in the middle (this is usually 50% for P4s), or any value listed
  4. in /proc/acpi/processor/CPU*/throttling. Be careful when using "maximum":
  5. this may be _very_ slow (in fact, with P4s it slows down the processor
  6. by a factor 8).

BATT_CPU_THROTTLING=medium LM_AC_CPU_THROTTLING=medium NOLM_AC_CPU_THROTTLING=minimum


  1. Syslog configuration control
  2. ----------------------------
  3. Syslog daemons have a tendency to sync their log files when entries are
  4. written to them. This causes disks to spin up, which is not very nice when
  5. you're trying to save power. The syslog.conf can be tweaked to *not* sync
  6. a given file, by prepending the log file name with a dash, like this:
  7. mail.* -/var/log/mail/mail.log
  8. Using the following options, you can let laptop mode switch between
  9. different syslog configurations depending on whether you are working on
  10. battery or on AC power. To set this up, start by configuring these options
  11. for your syslog daemon, and then run lm-syslog-setup to create the various
  12. files. Then edit the laptop mode-specific syslog configuration files to
  13. remove the syncs only when laptop mode is active.
  1. Should laptop mode tools control which syslog.conf should be used?

CONTROL_SYSLOG_CONF=0

  1. Laptop mode tools controls syslog.conf by replacing /etc/syslog.conf (or
  2. whatever you specify in SYSLOG_CONF) by a link to the files configured here.
  3. NOTE: these files are NOT created by default, and if they do not
  4. exist this feature will not work. You can run the script
  5. /usr/sbin/lm-syslog-setup to set things up.

LM_AC_SYSLOG_CONF=/etc/syslog-on-ac-with-lm.conf NOLM_AC_SYSLOG_CONF=/etc/syslog-on-ac-without-lm.conf BATT_SYSLOG_CONF=/etc/syslog-on-battery.conf

  1. Signal this program when syslog.conf has been replaced.

SYSLOG_CONF_SIGNAL_PROGRAM=syslogd

  1. This is the syslog configuration file that should be replaced by a link to the
  2. other files.

SYSLOG_CONF=/etc/syslog.conf


  1. X display settings
  2. ------------------
  3. Using these settings, you can let laptop mode tools control the X display
  4. standby timeouts.
  1. Should laptop mode tools control DPMS standby settings for X displays?

CONTROL_DPMS_STANDBY=0

  1. These settings specify the standby timeout for the X display,
  2. in seconds. The suspend and poweroff timeouts are somewhat
  3. larger values derived from these values.

BATT_DPMS_STANDBY=300 LM_AC_DPMS_STANDBY=1200 NOLM_AC_DPMS_STANDBY=1200


  1. Terminal settings
  2. -----------------
  3. Using these settings, you can let laptop mode tools control the terminal
  4. blanking timeouts.
  1. Should laptop mode tools control terminal blanking settings?

CONTROL_TERMINAL=0

  1. These settings specify the blanking and powerdown timeouts. Note that
  2. the powerdown timeout is counted from the moment the screen is blanked,
  3. i.e. BLANK_MINUTES=2 and POWERDOWN_MINUTES=5 means the screen powers
  4. down after 7 minutes of inactivity. The range for all these settings is
  5. 1 to 60 minutes, or 0 to disable.

BATT_TERMINAL_BLANK_MINUTES=1 BATT_TERMINAL_POWERDOWN_MINUTES=2 LM_AC_TERMINAL_BLANK_MINUTES=10 LM_AC_TERMINAL_POWERDOWN_MINUTES=10 NOLM_AC_TERMINAL_BLANK_MINUTES=10 NOLM_AC_TERMINAL_POWERDOWN_MINUTES=50


  1. Auto-hibernation settings
  2. -------------------------
  3. Using these settings, you can make laptop mode tools automatically put your
  4. computer into hibernation when the battery level goes critically low.
  5. This feature only works on ACPI, and only works on computers whose batteries
  6. give off battery events often enough.
  1. Should laptop mode tools perform auto-hibernation?

ENABLE_AUTO_HIBERNATION=0

  1. The hibernation command that is to be executed when auto-hibernation
  2. is triggered.

HIBERNATE_COMMAND=/usr/sbin/hibernate

  1. Auto-hibernation battery level threshold, in percentage of the battery's
  2. total capacity.

AUTO_HIBERNATION_BATTERY_CHARGE_PERCENT=6

  1. Enable this to auto-hibernate if the battery reports that its level is
  2. "critical".

AUTO_HIBERNATION_ON_CRITICAL_BATTERY_LEVEL=5


  1. Start/Stop Programs settings
  2. ----------------------------
  3. Laptop mode tools can automatically start and stop programs when entering
  4. various power modes. Put scripts accepting "start" and "stop" parameters
  5. in the directories /etc/laptop-mode/batt-stop, batt-start, lm-ac-stop,
  6. lm-ac-start, nolm-ac-stop and nolm-ac-start. Laptop mode will call the
  7. scripts in a state-"stop" directory with the "stop" parameter when entering
  8. the state in question, and it will call the same scripts with the "start"
  9. parameter when leaving the state. Scripts in a state-"start" directory are
  10. called with the "start" parameter when the specified state is entered, and
  11. with the "stop" parameter when the specified state is left.
  1. Should laptop mode start and stop programs?

CONTROL_START_STOP=1


  1. Settings you probably don't want to touch
  2. -----------------------------------------
  3. It is usually not necessary to change these parameters. They are included
  4. for completeness' sake.
  1. Change mount options on partitions in PARTITIONS? You don't really want to
  2. disable this. If you do, then your hard drives will probably not spin down
  3. anymore.

CONTROL_MOUNT_OPTIONS=1

  1. Dirty synchronous ratio. At this percentage of dirty pages the process
  2. which calls write() does its own writeback.

LM_DIRTY_RATIO=60 NOLM_DIRTY_RATIO=40

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

LM_DIRTY_BACKGROUND_RATIO=1 NOLM_DIRTY_BACKGROUND_RATIO=10

  1. kernel default settings -- don't touch these unless you know what you're
  2. doing.

DEF_UPDATE=5 DEF_XFS_AGE_BUFFER=15 DEF_XFS_SYNC_INTERVAL=30 DEF_XFS_BUFD_INTERVAL=1 DEF_MAX_AGE=30

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

XFS_HZ=100

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

LM_SECONDS_BEFORE_SYNC=2


_End here---------------


Datorita unui bug in kernelele <2.6.22, urmatoarele scripturi (cu permisiuni de exec) au trebuit adaugate in /etc/acpi/{resume/suspend}.d ---Cut here--- florin@samflorin-laptop:/etc/acpi/suspend.d$ cat 20-i8042-input.sh

  1. !/bin/sh
  1. Unbind the AT keyboard interface.

if [ -f /sys/bus/platform/drivers/i8042/unbind ]; then

 echo -n "i8042" > /sys/bus/platform/drivers/i8042/unbind

fi


End here---

---Cut here---- florin@samflorin-laptop:/etc/acpi/suspend.d$ cat ../resume.d/80-i8042-input.sh

  1. !/bin/sh
  1. Rebind the AT keyboard interface.

if [ -f /sys/bus/platform/drivers/i8042/bind ]; then

 echo -n "i8042" > /sys/bus/platform/drivers/i8042/bind

fi


End here---------

Deoarece la suspend de foarte multe ori nu mi s-a mai activat partitia de swap, am modificat /etc/fstab si am trecut partitia de swap cu /dev/sdaX in loc de #UUID=97f25d87-fef3-41e1-82b1-3458e93d31e4 none swap sw 0 0

si am adaugat in /etc/acpi/resume.d/99-custom.sh urmatoarele:


Cut here----

/sbin/swapoff -a /sbin/swapon -a


End here---

Scripturi pentru power management (battery mode / ac mode):


florin@samflorin-laptop:/etc/acpi/battery.d$ls 10-vm_settings.sh 15-anacron.sh 20-wireless_power.sh 80-battery.sh 90-ati.sh florin@samflorin-laptop:/etc/acpi/battery.d$ cat 10-vm_settings.sh

  1. !/bin/bash
  2. Tweak virtual memory to conserve power when running on batteries.

echo 10 > /proc/sys/vm/swappiness echo 0 > /proc/sys/vm/dirty_expire_centisecs echo 0 > /proc/sys/vm/dirty_writeback_centisecs echo 60 > /proc/sys/vm/dirty_background_ratio echo 95 > /proc/sys/vm/dirty_ratio florin@samflorin-laptop:/etc/acpi/battery.d$ cat 20-wireless_power.sh

  1. !/bin/bash
  2. Change the wireless power mode to Battery.

for x in $(/bin/ls -d /sys/class/net/*/wireless | /usr/bin/cut -d'/' -f5); do

   /sbin/iwpriv $x set_power 7

done florin@samflorin-laptop:/etc/acpi/battery.d$ cat 90-ati.sh

  1. !/bin/bash
  2. Dirty hack, i know

. /usr/share/acpi-support/power-funcs

new_state=1 su - florin -c"DISPLAY=:0 /usr/bin/aticonfig --set-powerstate=$new_state"

In /etc/acpi.d am adaugat urmatoarele:

florin@samflorin-laptop:/etc/acpi/ac.d$ cat 10-vm_settings.sh

  1. !/bin/bash
  2. Tweak virtual memory for running on AC.

echo 60 > /proc/sys/vm/swappiness echo 3000 > /proc/sys/vm/dirty_expire_centisecs echo 500 > /proc/sys/vm/dirty_writeback_centisecs echo 10 > /proc/sys/vm/dirty_background_ratio echo 40 > /proc/sys/vm/dirty_ratio florin@samflorin-laptop:/etc/acpi/ac.d$ cat 20-wireless_power.sh

  1. !/bin/bash
  2. Change the wireless power mode to AC.
  3. This should work for most chipsets

for x in $(/bin/ls -d /sys/class/net/*/wireless | /usr/bin/cut -d'/' -f5); do

   /sbin/iwpriv $x set_power 6

done florin@samflorin-laptop:/etc/acpi/ac.d$ cat 80-ac.sh

  1. !/bin/bash

for x in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do

   echo "ondemand" > $x
   X=${x%/*}
   # The second column is the second from the highest freq most power savings / least slowdown
   awk '{print $2}' $X/scaling_available_frequencies > $X/scaling_max_freq

done florin@samflorin-laptop:/etc/acpi/ac.d$ cat 90-ati.sh

  1. !/bin/sh

. /usr/share/acpi-support/power-funcs

new_state=1 su - florin -c"DISPLAY=:0 /usr/bin/aticonfig --set-powerstate=$new_state"


De asemenea, in /etc/laptop-mode/batt-stop exista urmatoarele symlinkuri:

florin@samflorin-laptop:/etc/laptop-mode/batt-stop$ ls -als total 8 4 drwxr-xr-x 2 root root 4096 2007-07-05 00:00 . 4 drwxr-xr-x 8 root root 4096 2007-04-15 14:55 .. 0 lrwxrwxrwx 1 root root 19 2007-07-04 23:59 anacron -> /etc/init.d/anacron 0 lrwxrwxrwx 1 root root 15 2007-07-04 23:59 atd -> /etc/init.d/atd 0 lrwxrwxrwx 1 root root 16 2007-07-04 23:59 cron -> /etc/init.d/cron 0 lrwxrwxrwx 1 root root 18 2007-07-04 23:59 cupsys -> /etc/init.d/cupsys 0 lrwxrwxrwx 1 root root 17 2007-07-05 00:00 hplip -> /etc/init.d/hplip 0 lrwxrwxrwx 1 root root 17 2007-07-05 00:00 samba -> /etc/init.d/samba


respectiv serviciile care sunt oprite in battery mode.


Momentan atat, revin cu eventuale completari.