Salut.
Voici le script refait avec un start, stop et des commentaires.
@llaumgui
Je désactive le bluetooth par déchargement des modules concernés. Il suffit de les recharger pour que le bluetooth soit à nouveau OK. Le blacklisting est définitif...
++
#!/bin/sh
#
#####################################################################
# msi script for optimizing battery lifetime
# This script was based on lesswatts.org recommandations.
# See: http://www.lesswatts.org/
#####################################################################
#
# v1.0 Creation eddy33 2008/10/25 for fedora-fr.org
#
#####################################################################
. /etc/init.d/functions
umask 077
export PATH=/usr/local/bin:$PATH
#exec=
#prog=$(basename $exec)
# Source config
start() {
echo -n $"Starting MSI Wind Battery Lifetime Optimization: "
#
# Ethernet Optimization
#
# Ethernet : WOL off
ethtool -s eth0 wol d 1>/dev/null 2>/dev/null
#
# Wifi Optimization
#
# iwpriv ?
#
# Bluetooth Optimization
#
# Bluetooth off
hciconfig hci0 down 1>/dev/null 2>/dev/null
rmmod hci_usb 1>/dev/null 2>/dev/null
#
# Scheduling Optimization
#
# Multi threading optimization
echo 1 > /sys/devices/system/cpu/sched_smt_power_savings
#
# Hard disk Optimization
#
# Writeback to hard disk every 15 secondes
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
#
# I/O Optimization
#
# Laptop mode enabled for I/O
echo 5 > /proc/sys/vm/laptop_mode
#
# HAL CDROM Polling Optimization
#
# HAL CDROM polling disabled if external CDROM connected
hal-disable-polling --device /dev/scd0 1>/dev/null 2>/dev/null
RETVAL=0
RETVAL=$?
echo
return $RETVAL
}
stop() {
echo -n $"Stopping MSI Wind Battery Lifetime Optimization: "
#
# Normal Ethernet
#
# Ethernet : WOL disabled by default
ethtool -s eth0 wol d 1>/dev/null 2>/dev/null
#
# Normal Wifi
#
# iwpriv ?
#
# Normal Bluetooth
#
# Bluetooth on
modprobe hci_usb 1>/dev/null 2>/dev/null
hciconfig hci0 up 1>/dev/null 2>/dev/null
#
# Normal Scheduling
#
# Normal Multi threading
echo 0 > /sys/devices/system/cpu/sched_smt_power_savings
#
# Normal Hard disk
#
# Writeback to hard disk every 5 secondes
echo 500 > /proc/sys/vm/dirty_writeback_centisecs
#
# Normal I/O
#
echo 0 > /proc/sys/vm/laptop_mode
#
# Normal HAL CDROM Polling if external CDROM connected
#
# HAL CDROM polling enabled
hal-disable-polling --device /dev/scd0 --enable-polling 1>/dev/null 2>/dev/null
RETVAL=0
RETVAL=$?
echo
return $RETVAL
}
restart() {
stop
start
}
case "$1" in
start|stop|restart)
$1
;;
reload|force-reload)
restart
;;
status)
status $prog
;;
condrestart|try-restart)
[ ! -f $lockfile ] || restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
exit 2
esac