Skip to content

Instantly share code, notes, and snippets.

@remimu

remimu/.bashrc

Last active Aug 29, 2015
Embed
What would you like to do?
n73sm - AHCI LCC Parade
# /etc/skel/.bashrc
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output. So make sure this doesn't display
# anything or bad things will happen !
# Test for an interactive shell. There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# outputting anything in those cases.
if [[ $- != *i* ]] ; then
# Shell is non-interactive. Be done now!
return
fi
# Put your fun stuff here.
# http://git.io/A4Ou
# https://gist.github.com/remimu/e7e79a8ad5fb80198f12
# /root/.bashrc
# n73sm-tz124v LCC Parade
if [[ ! ( -a /root/lcc-lowered ) ]]
then
for OUTPUT in $(dir /dev/sd?)
do
#echo $OUTPUT
hdparm -B 255 $OUTPUT 1> /dev/null
done
#gazeau ~ # hdparm -I `dir /dev/sd?` | grep -e '/dev/sd' -e '*u' -e 'mode=' -e 'Advanced Power Management' -e 'Power Management feature set'
#/dev/sda:
# DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
# * Power Management feature set
# Advanced Power Management feature set
#/dev/sdb:
# DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
# * Power Management feature set
# Advanced Power Management feature set
#/dev/sdc:
# DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
# * Power Management feature set
# Advanced Power Management feature set
sleep 20
# Pour attendre le WM
for OUTPUT in $(dir /sys/class/scsi_host/host?/link_power_management_policy)
do
#echo $OUTPUT
echo min_power > $OUTPUT 2> /dev/null
#echo max_performance > $OUTPUT 2> /dev/null
done
#gazeau ~ # cat `dir /sys/class/scsi_host/host?/link_power_management_policy`
#min_power
#min_power
#min_power
#min_power
#min_power
#min_power
touch /root/lcc-lowered
fi
# https://gist.github.com/remimu/e7e79a8ad5fb80198f12
# http://git.io/A4Ou
# /etc/local.d/rm-root-lcc-lowered.stop
sudo -u root rm /root/lcc-lowered 2> /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.