Giter VIP home page Giter VIP logo

powersave's Introduction

powersave

My configuration for maximizing the battery life on my Thinkpad T530.

Included here is a systemd service file, various config-lets and a few utilities to set or control certain power saving features. I set as much as I can statically on boot; I think its silly to increase power consumption simply because I'm on AC power.

Also look at my backlight utilities. The lightd daemon is useful to automatically manage/dim the backlight.

A PKGBUILD is included as a convenience.

modprobe.d/powersave.conf

Enable power_save=1 for snd_hda_intel

sysctl.d/powersave.conf

  • disable NMI watchdog
  • set laptop mode
  • increase the dirty writeback time

rules.d/50-network-powersave.rules

Set the powersaving features on network devices that must be enabled by 3rd-party commands. For every detected device:

ACTION=="add", SUBSYSTEM=="net", KERNEL=="eth*", RUN+="/usr/sbin/ethtool -s %k wol d"
ACTION=="add", SUBSYSTEM=="net", KERNEL=="wlan*", RUN+="/usr/sbin/iw dev %k set power_save on"

NOTE: this assumes modern Linux wireless drivers. There's no guarantee about naming of devices.

rules.d/50-pci-powersave.rules

Enable pci powersaving features:

ACTION=="add", SUBSYSTEM=="pci", ATTR{power/control}="auto"

rules.d/50-sata-powersave.rules

Enable sata powersaving features:

ACTION=="add", SUBSYSTEM=="scsi_host", ATTR{link_power_management_policy}="min_power"

rules.d/50-usb-powersave.rules

Enable powersaving and autosuspend on usb ports:

ACTION=="add", SUBSYSTEM=="usb", TEST=="power/autosuspend", ATTR{power/autosuspend}="1"
ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="auto"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.