GithubHelp home page GithubHelp logo

derekperrin / tlp-portage Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dywisor/tlp-portage

0.0 0.0 0.0 278 KB

portage overlay for TLP

Home Page: https://github.com/dywisor/tlp-gentoo-additions

Makefile 4.42% Shell 95.58%

tlp-portage's Introduction

tlp-portage

Overlay for installing TLP on Gentoo/Funtoo/... systems.

Setup Instructions

The following commands ($ <command...>) should be run as root. It is assumed that your package manager is sys-apps/portage.

  1. Add the tlp-portage repository

    1. Option A: manage repo via repos.conf

      1. Install git:

        $ emerge -a --noreplace "dev-vcs/git"
        
      2. Download the repos.conf file:

        $ mkdir -p -- /etc/portage/repos.conf
        $ wget "https://raw.github.com/dywisor/tlp-portage/maint/repos.conf" -O /etc/portage/repos.conf/tlp.conf
        

        The default repo location is /usr/portage-overlay/tlp, you may change that freely.

      3. Download the repo:

        $ emerge --sync tlp
        
    2. OR Option B: manage repo with layman

      1. Install layman

        1. Enable the git USE flag for layman:

          $ mkdir /etc/portage/package.use
          $ echo "app-portage/layman git" >> /etc/portage/package.use/layman
          
        2. Install layman:

          $ emerge -a --noreplace ">=app-portage/layman-2"
          

        See also Layman - Gentoo Wiki.

      2. layman versions prior to 2.1.0: make sure that /etc/portage/make.conf has the following line:

        source /var/lib/layman/make.conf
        

        If you've just installed layman, simply run:

        $ echo "source /var/lib/layman/make.conf" >> /etc/portage/make.conf
        
      3. Add the tlp-portage overlay with layman:

        $ wget "https://raw.github.com/dywisor/tlp-portage/maint/layman.xml" -O /etc/layman/overlays/tlp.xml
        $ layman -f -a tlp
        
  2. stable arch only (amd64, x86): unmask TLP:

    $ mkdir /etc/portage/package.accept_keywords
    $ echo "app-laptop/tlp" > /etc/portage/package.accept_keywords/tlp
    

    unmask sys-power/linux-x86-power-tools or sys-apps/linux-misc-apps:

    $ echo "sys-power/linux-x86-power-tools" >> /etc/portage/package.accept_keywords/tlp
    
  3. (optional) install/build kernel modules

    This is required for ThinkPad advanced battery functions.

    • Thinkpads up to the Sandy Bridge generation (T420, X220 et al.):

      $ emerge -a app-laptop/tp_smapi
      
    • Thinkpads beginning with the Sandy Bridge Generation (T420, X220 et al.):

      $ emerge -a sys-power/acpi_call
      
  4. (optional) choose USE flags, for example:

    $ echo "app-laptop/tlp tlp-suggests" > /etc/portage/package.use/tlp
    

    See USE flags below for a full listing.

  5. Install TLP:

    $ emerge -a app-laptop/tlp
    
  6. Edit TLP's configuration file /etc/tlp.conf

    In contrast to other distributions, you have to enable TLP explicitly by setting TLP_ENABLE=1.

    See the upstream documentation for details.

    Note

    Beginning with TLP 1.3, the configuration file format and handling has changed, users upgrading from TLP 1.2 should review their configuration.

  7. Enable the TLP service

    OpenRC (most Gentoo users):

    $ rc-update add tlp default
    

    systemd:

    $ systemctl enable tlp.service
    

    systemd-rfkill should be masked as it conflicts with RESTORE_DEVICE_STATE_ON_STARTUP/DEVICES_TO_{EN,DIS}ABLE_ON_STARTUP:

    $ systemctl mask systemd-rfkill.socket systemd-rfkill.service
    

    Users of systemd prior to v227 need to mask systemd-rfkill@ instead:

    $ systemctl mask [email protected]
    
  8. Reboot your system to apply the new settings (alternatively, you could reload the udev rules and start TLP)

  9. You might want to run tlp-stat to see if everything is OK so far

USE flags

USE flags accepted by app-laptop/tlp
flag recommended default description
tlp-suggests yes yes install all optional dependencies
rdw - no install TLP's radio device wizard
bluetooth - no install optional bluetooth dependencies (bluez)
tpacpi-bundled yes yes

use the bundled version of tpacpi-bat

Deselecting this flag disqualifies you from getting support upstream

pm-utils no no

use sys-power/pm-utils for handling system sleep/resume. Not supported upstream anymore.

Two more modern alternatives provide this functionality, sys-apps/systemd and sys-auth/elogind.

Random notes / FAQ

Kernel config considerations

The following kernel options should be set to y:

  • CONFIG_PM
  • CONFIG_PM_RUNTIME (Linux < 3.19 only)
  • CONFIG_DMIID
  • CONFIG_POWER_SUPPLY
  • CONFIG_ACPI_AC
  • CONFIG_SENSORS_CORETEMP
  • CONFIG_X86_MSR

tlp-portage's People

Contributors

dywisor avatar xp-vit avatar

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.