User Tools

Site Tools


notes:laptop_power_management

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
notes:laptop_power_management [2019/11/30 22:27] Sean Rhonenotes:laptop_power_management [2023/07/13 15:26] (current) Sean Rhone
Line 1: Line 1:
 ====== Laptop Power Management ====== ====== Laptop Power Management ======
- 
-===== Notes ===== 
- 
-  * This expects a laptop with a battery 
-  * Do not use this for desktops 
  
 ===== Testing ===== ===== Testing =====
Line 10: Line 5:
   * The following commands can be ran to see if they work on specific hardware   * The following commands can be ran to see if they work on specific hardware
  
-  watch -n 0.grep \'cpu MHz\' '/proc/cpuinfo'+  watch -n 0.grep \'cpu MHz\' '/proc/cpuinfo'
  
   sudo x86_energy_perf_policy --all 'performance' --turbo-enable '1' --force   sudo x86_energy_perf_policy --all 'performance' --turbo-enable '1' --force
Line 18: Line 13:
 ====== Dependencies ====== ====== Dependencies ======
  
-===== Fedora Workstation ===== +****
- +
-  ''kernel-tools'' provides ''x86_energy_perf_policy''+
  
   sudo dnf install 'kernel-tools'   sudo dnf install 'kernel-tools'
- 
-===== Ubuntu ===== 
- 
-  * ''linux-tools-common'' provides ''x86_energy_perf_policy'', and ''linux-tools-generic'' provides the module for it to actually work 
- 
-  linux-tools-common linux-tools-generic 
  
 ====== Scripts ====== ====== Scripts ======
Line 39: Line 26:
  
 <code> <code>
-#!/usr/bin/bash+#!/bin/bash
 # AC # AC
 echo "$(cat '/sys/class/backlight/'*'/max_brightness')" | tee '/sys/class/backlight/'*'/brightness' > '/dev/null' echo "$(cat '/sys/class/backlight/'*'/max_brightness')" | tee '/sys/class/backlight/'*'/brightness' > '/dev/null'
-x86_energy_perf_policy --all 'performance' --turbo-enable '1' --force+x86_energy_perf_policy --all 'balance-performance' --turbo-enable '1' --force
 # End</code> # End</code>
  
Line 52: Line 39:
  
 <code> <code>
-#!/usr/bin/bash+#!/bin/bash
 # Battery # Battery
 echo '60600' | tee '/sys/class/backlight/'*'/brightness' > '/dev/null' echo '60600' | tee '/sys/class/backlight/'*'/brightness' > '/dev/null'
-x86_energy_perf_policy --all 'power' --turbo-enable '0' --force+x86_energy_perf_policy --all 'balance-power' --turbo-enable '0' --force
 # End</code> # End</code>
  
/var/www/wiki/data/attic/notes/laptop_power_management.1575170843.txt.gz · Last modified: 2019/11/30 22:27 by Sean Rhone