lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8737swtyus.fsf@gmail.com>
Date:	Sat, 13 Feb 2016 18:27:07 +0300
From:	moosotc@...il.com
To:	linux-kernel@...r.kernel.org
Subject: Re: Energy consumption oddity on a Mac-Mini

moosotc@...il.com writes:

> Hello,
>
> Trying to make Linux consume as little(or less) power as OS X does on
> this Mac mini (as measured by watt meter that sits between the box and
> the power outlet) led me to the following sequence of commands:
>

Here's a better one, the one that is actually beging used at this very
moment and that almost halves the Linux's power glut (on this particular
box, might be applicable to MBPros with i915 (then again might not)).

#!/bin/sh
set -e

test "$(id -u)" != "0" && exec sudo ${DISPLAY:+-A} "$0" "$@"
printf '\033[?17;0;0c\n' | tee >/dev/null $(seq -f '/dev/tty%g' 1 7)
echo 'powersave' >/sys/module/pcie_aspm/parameters/policy
echo '6000' >/proc/sys/vm/dirty_writeback_centisecs
echo '1' >/sys/module/snd_hda_intel/parameters/power_save
echo 'min_power' >/sys/class/scsi_host/host0/link_power_management_policy
cpupower frequency-set --governor powersave
x86_energy_perf_policy powersave
echo '0' >/proc/sys/kernel/nmi_watchdog
echo '1' | tee >/dev/null /sys/bus/usb/devices/*/power/autosuspend
echo 'auto' | tee >/dev/null /sys/devices/**/power/control
for f in $(find /sys/devices -name product -type f); do
    expr "$(cat $f)" : "USB.*\(Keyboard\|Mouse\)" >/dev/null && {
        echo '0' >$(dirname $f)/power/autosuspend
    } || true
done

# Mysterious part starts here
echo '+6' >/sys/class/rtc/rtc0/wakealarm
echo 'mem' >/sys/power/state
echo '-1' >/sys/class/rtc/rtc0/wakealarm

[..snip..]

-- 
mailto:moosotc@...il.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ