/etc/power/event.d/laptop-mode is in laptop-mode-tools 1.60-1ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #!/bin/sh
# name : laptop-mode
# author : Matthias Grimm <matthiasgrimm@users.sourceforge.net>
# description : toggle laptop mode in kernel and adjust
# memory management buffer flush timeouts
# requirements: laptop-mode support in kernel
# laptopmode.sh somewhere on your system
# limitations : none
#
# --- end of public part -- don't change below this line ---
set -e
LMODE=/usr/sbin/laptop_mode
[ -x $LMODE ] || exit 0
if [ -w /proc/sys/vm/laptop_mode ]; then
case "$1" in
powersave)
$LMODE "start"
echo "3 " $LMODE "start"
;;
custom)
$LMODE "auto"
;;
performance)
$LMODE "stop"
;;
esac
elif [ -x logger ]; then
logger -p daemon.error -t laptop-mode "Laptop-mode support missing in kernel."
fi
|