Skip to content

Instantly share code, notes, and snippets.

@lholden lholden/rc.local
Created Apr 14, 2012

Embed
What would you like to do?
Samsung Series 9 Power Savings
#!/bin/sh
echo "noop" > /sys/block/sda/queue/scheduler
echo 5 > /proc/sys/vm/laptop_mode
echo 0 > /proc/sys/kernel/nmi_watchdog
echo 1 > /sys/devices/system/cpu/sched_mc_power_savings
for i in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo ondemand > $i; done
echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
for i in /sys/bus/usb/devices/*/power/autosuspend; do echo 1 > $i; done
for i in /sys/class/scsi_host/host*/link_power_management_policy; do echo min_power > $i; done
echo 24 > /sys/class/backlight/acpi_video0/brightness
exit 0
@johnteslade

This comment has been minimized.

Copy link

commented Apr 14, 2012

For this to work in Fedora 16 the first line needs to be

#!/bin/bash

Otherwise you get errors on system start

@lholden

This comment has been minimized.

Copy link
Owner Author

commented Apr 15, 2012

Ah yes, sorry. Fedora 17 moved everything to /usr/bin.

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.