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/04/20 05:52] 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'
Line 47: Line 34:
 ===== Battery ===== ===== Battery =====
  
-  * Change the ''backlight'' sysfs as-needed (see [[#backlight1|backlight notes]]) or remove altogether+  * Change the ''backlight'' sysfs as-needed (see [[distros:fedora_workstation_gnome#backlight|Backlight notes]]) or remove altogether
  
   sudo mkdir -p '/etc/udev/scripts.d' && sudo -e '/etc/udev/scripts.d/battery-power.sh' && sudo chmod +x '/etc/udev/scripts.d/battery-power.sh'   sudo mkdir -p '/etc/udev/scripts.d' && sudo -e '/etc/udev/scripts.d/battery-power.sh' && sudo chmod +x '/etc/udev/scripts.d/battery-power.sh'
  
 <code> <code>
-#!/usr/bin/bash+#!/bin/bash
 # Battery # Battery
-echo '3750' | tee '/sys/class/backlight/'*'/brightness' > '/dev/null'+echo '60600' | tee '/sys/class/backlight/'*'/brightness' > '/dev/null'
 x86_energy_perf_policy --all 'balance-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.1555753939.txt.gz · Last modified: 2019/04/20 05:52 by Sean Rhone