GithubHelp home page GithubHelp logo

gpiemont / laptop-mode-tools Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 21 KB

modules and configuration files for laptop-mode

License: GNU General Public License v2.0

Shell 100.00%
laptop-mode nouveau-performance pcie-aspm bash linux-shell laptop powersave video-card video

laptop-mode-tools's Introduction

laptop-mode-tools.nouveau

This git repository provides the proper configuration files and modules (modules/nouveau-performance and conf.d/nouveau-performance.conf), for power management of a nouveau-driven card (currently limited to performance level checking/switching, where possible). This files are meant to be used within the laptop-mode framework.

How to install and configure

Download the tarball of this git archive (or clone the git repository) and unpack it directly into / (or manually copy the two files as they are).

Edit /etc/laptop-mode/conf.d/nouveau-performance.conf and set the two most important parameters:

CONTROL_NOUVEAU_PERFORMANCE=1 # this enables the module

NOUVEAU_DRM_CARD=0 # 0 should be fine in most cases, check /sys/class/drm/cardX/device/name to be "nouveau"

and set the module behaviour in {BATT,[NO]LM_AC}_NOUVEAU_DRM_COMMANDS variables by substituting the [value] parameter with the desidered performance level number.

Consider that nVidia(C) cards can have up to 4 performance level: the first (and the lower) one is generally the "powersave" state; the second corresponds to the boot one and the remaining two are for higher performance requirements. For card with less performance levels things get obviously simpler. If you've got just one performance level on your card, you shouldn't be needing this module at all. Set the *_COMMANDS parameter to reasonable values, or in order to fit your needs.

laptop-mode-tools.pcie_aspm

This package provides also a simple module for the pcie-aspm link tuning. Your laptop can benefit from it, expecially when working aside the nouveau module, indeed.

How to install and configure

The installation procedure of the two files (etc/laptop-mode/conf.d/pcie_aspm.conf and usr/share/pcie_aspm/module/pcie_aspm) is the same as nouveau's.

Its working mechanism is simpler, as the ASPM comes up with 3 (2) performance states, performance, powersave and default, tunable via /sys/class/modules/pcie_aspm/policy

This module selects one of them, depeding on the state of your laptop.

BATT_PCIE_ASPM_COMMAND="echo powersave" # default values are usually fine

NOLM_PCIE_ASPM_COMMAND="echo performance"

LM_PCIE_ASPM_COMMAND="echo default"

CONTROL_PCIE_ASPM=[0,1] # Enables/disables the module

Enabling power management

Restart laptop-mode when the module is configured:

# systemctl restart laptop-mode.service

or

# /etc/rc.d/laptop-mode restart

Screen should "zap" for an instant (actually that's what nouveau does when recklocking the card), and that means that power management for the current laptop state has been started.

Debugging

You could increase verboseness of the laptop-mode subsystem by setting VERBOSE=1 in /etc/laptop-mode/laptop-mode.conf or enable module's debugging with DEBUG=1 in /etc/laptop-mode/conf.d/.conf

Check /var/log/boot.log for the output messages.

License

This package is distributed under the version 2 of the General Public License.

laptop-mode-tools's People

Contributors

gpiemont avatar sw-eng avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.